1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE Definitions SYSTEM "widlprocxml.dtd">
4 <Module name="Vehicle" id="::Vehicle">
5 <webidl> module Vehicle {
7 interface VehicleManagerObject {
8 readonly attribute <ref>Vehicle</ref> vehicle;
11 <ref>Tizen</ref> implements <ref>VehicleManagerObject</ref>;
15 readonly attribute <ref>VehicleConfigurationInterface</ref> identification;
16 readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;
17 readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;
18 readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;
19 readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;
20 readonly attribute <ref>VehicleConfigurationInterface</ref> steeringWheelConfiguration;
22 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;
23 readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;
24 readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;
25 readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;
26 readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;
27 readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;
28 readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;
29 readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;
30 readonly attribute <ref>VehicleSignalInterface</ref> transmission;
31 readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;
32 readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;
33 readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;
34 readonly attribute <ref>VehicleSignalInterface</ref> chime;
35 readonly attribute <ref>VehicleSignalInterface</ref> fuel;
36 readonly attribute <ref>VehicleSignalInterface</ref> engineOil;
37 readonly attribute <ref>VehicleSignalInterface</ref> acceleration;
38 readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;
39 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
40 readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;
41 readonly attribute <ref>VehicleSignalInterface</ref> yawRate;
42 readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;
43 readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;
44 readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;
45 readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;
46 readonly attribute <ref>VehicleSignalInterface</ref> nightMode;
48 readonly attribute <ref>VehicleSignalInterface</ref> odometer;
49 readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;
50 readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;
51 readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;
52 readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;
53 readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;
54 readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;
55 readonly attribute <ref>VehicleSignalInterface</ref> tire;
56 readonly attribute <ref>VehicleInterface</ref> diagnostic;
58 readonly attribute <ref>VehicleSignalInterface</ref> driverIdentification;
59 readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;
60 readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;
61 readonly attribute <ref>VehicleSignalInterface</ref> mirror;
62 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
63 readonly attribute <ref>VehicleSignalInterface</ref> driveMode;
64 readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;
65 readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;
66 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;
68 readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;
69 readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;
70 readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;
71 readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;
72 readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;
73 readonly attribute <ref>VehicleSignalInterface</ref> door;
74 readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;
75 readonly attribute <ref>VehicleSignalInterface</ref> seat;
77 readonly attribute <ref>VehicleSignalInterface</ref> temperature;
78 readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;
79 readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;
80 readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;
81 readonly attribute <ref>VehicleSignalInterface</ref> defrost;
82 readonly attribute <ref>VehicleSignalInterface</ref> sunroof;
83 readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;
84 readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;
85 readonly attribute <ref>VehicleSignalInterface</ref> climateControl;
86 readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;
88 readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;
89 readonly attribute <ref>VehicleSignalInterface</ref> alarm;
90 readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;
91 readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;
94 [Callback=FunctionOnly, NoInterfaceObject]
95 interface VehicleInterfaceCallback {
96 void onsuccess(object value);
99 [Callback=FunctionOnly, NoInterfaceObject]
100 interface AvailableCallback {
101 void onsuccess(<ref>Availability</ref> available);
105 "available", "not_supported", "not_supported_yet", "not_supported_security_policy",
106 "not_supported_business_policy", "not_supported_other"
110 interface VehicleInterface {
111 <ref>Availability</ref> availableForRetrieval (DOMString attributeName);
112 short availabilityChangedListener (<ref>AvailableCallback</ref> callback);
113 void removeAvailabilityChangedListener (short handle);
114 <ref>Promise</ref> get (optional <ref>Zone</ref> zone);
115 <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);
116 readonly attribute boolean isLogged;
117 readonly attribute Date ? from;
118 readonly attribute Date ? to;
119 readonly attribute boolean supported;
120 readonly attribute <ref>Zone</ref>[] zones;
124 interface VehicleConfigurationInterface : <ref>VehicleInterface</ref> {};
127 interface VehicleSignalInterface : <ref>VehicleInterface</ref> {
128 <ref>Availability</ref> availableForSubscription (DOMString attributeName);
129 <ref>Availability</ref> availableForSetting (DOMString attributeName);
130 <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);
131 unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);
132 void unsubscribe (unsigned short handle);
135 enum ZonePosition {"Front", "Middle", "Right", "Left", "Rear", "Center"};
139 attribute DOMString[] value;
140 readonly attribute <ref>Zone</ref> driver;
141 boolean equals (<ref>Zone</ref> zone);
142 boolean contains (<ref>Zone</ref> zone);
145 enum VehicleError {"permission_denied", "invalid_operation", "timeout", "invalid_zone", "unknown"};
148 interface VehicleInterfaceError {
149 readonly attribute <ref>VehicleError</ref> error;
150 readonly attribute DOMString message;
154 interface VehicleCommonDataType {
155 readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;
159 enum VehicleTypeEnum {
160 "passengerCarMini", "passengerCarLight", "passengerCarCompact", "passengerCarMedium",
161 "passengerCarHeavy", "sportUtilityVehicle", "pickupTruck", "van"
165 interface Identification : <ref>VehicleCommonDataType</ref> {
166 readonly attribute DOMString? VIN;
167 readonly attribute DOMString? WMI;
168 readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;
169 readonly attribute DOMString? brand;
170 readonly attribute DOMString? model;
171 readonly attribute unsigned short? year;
175 interface SizeConfiguration : <ref>VehicleCommonDataType</ref> {
176 readonly attribute unsigned short? width;
177 readonly attribute unsigned short? height;
178 readonly attribute unsigned short? length;
179 readonly attribute unsigned short[]? doorsCount;
180 readonly attribute unsigned short? totalDoors;
184 "gasoline", "methanol", "ethanol", "diesel", "lpg", "cng", "electric"
188 interface FuelConfiguration : <ref>VehicleCommonDataType</ref> {
189 readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;
190 readonly attribute <ref>Zone</ref>? refuelPosition;
193 enum TransmissionGearTypeEnum {"auto", "manual"};
196 interface TransmissionConfiguration : <ref>VehicleCommonDataType</ref> {
197 readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;
201 interface WheelConfiguration : <ref>VehicleCommonDataType</ref> {
202 readonly attribute unsigned short? wheelRadius;
203 attribute <ref>Zone</ref>? zone;
207 interface SteeringWheelConfiguration : <ref>VehicleCommonDataType</ref> {
208 readonly attribute boolean? steeringWheelLeft;
212 interface VehicleSpeed : <ref>VehicleCommonDataType</ref> {
213 readonly attribute unsigned short speed;
217 interface WheelSpeed : <ref>VehicleCommonDataType</ref> {
218 readonly attribute unsigned short speed;
219 attribute <ref>Zone</ref>? zone;
223 interface EngineSpeed : <ref>VehicleCommonDataType</ref> {
224 readonly attribute unsigned long speed;
228 interface PowerTrainTorque : <ref>VehicleCommonDataType</ref> {
229 readonly attribute short value;
233 interface AcceleratorPedalPosition : <ref>VehicleCommonDataType</ref> {
234 readonly attribute unsigned short value;
238 interface ThrottlePosition : <ref>VehicleCommonDataType</ref> {
239 readonly attribute unsigned short value;
244 readonly attribute unsigned long distance;
245 readonly attribute unsigned short? averageSpeed;
246 readonly attribute unsigned short? fuelConsumption;
250 interface TripMeters : <ref>VehicleCommonDataType</ref> {
251 readonly attribute <ref>Trip</ref>[] meters;
255 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
256 readonly attribute unsigned long accumulatedEngineRuntime;
257 readonly attribute unsigned long distanceWithMILOn;
258 readonly attribute unsigned long distanceSinceCodeCleared;
259 readonly attribute unsigned long timeRunMILOn;
260 readonly attribute unsigned long timeTroubleCodeClear;
263 enum TransmissionMode {"park", "reverse", "neutral", "low", "drive", "overdrive"};
266 interface Transmission : <ref>VehicleCommonDataType</ref> {
267 readonly attribute octet? gear;
268 readonly attribute <ref>TransmissionMode</ref>? mode;
272 interface CruiseControlStatus : <ref>VehicleCommonDataType</ref> {
273 readonly attribute boolean status;
274 readonly attribute unsigned short speed;
278 interface LightStatus : <ref>VehicleCommonDataType</ref> {
279 attribute boolean head;
280 attribute boolean rightTurn;
281 attribute boolean leftTurn;
282 attribute boolean brake;
283 attribute boolean? fog;
284 attribute boolean hazard;
285 attribute boolean parking;
286 attribute boolean highBeam;
287 attribute boolean? automaticHeadlights;
288 attribute boolean? dynamicHighBeam;
289 attribute <ref>Zone</ref>? zone;
293 interface InteriorLightStatus : <ref>VehicleCommonDataType</ref> {
294 attribute boolean status;
295 attribute <ref>Zone</ref>? zone;
299 interface Horn : <ref>VehicleCommonDataType</ref> {
300 attribute boolean status;
304 interface Chime : <ref>VehicleCommonDataType</ref> {
305 readonly attribute boolean status;
309 interface Fuel : <ref>VehicleCommonDataType</ref> {
310 readonly attribute unsigned short level;
311 readonly attribute unsigned long range;
312 readonly attribute unsigned long instantConsumption;
313 readonly attribute unsigned long averageConsumption;
314 readonly attribute unsigned long fuelConsumedSinceRestart;
315 readonly attribute unsigned long vehicleTimeSinceRestart;
319 interface EngineOil : <ref>VehicleCommonDataType</ref> {
320 readonly attribute unsigned short level;
321 readonly attribute unsigned short lifeRemaining;
322 readonly attribute long temperature;
323 readonly attribute unsigned short pressure;
324 readonly attribute boolean change;
328 interface Acceleration : <ref>VehicleCommonDataType</ref> {
329 readonly attribute unsigned long x;
330 readonly attribute unsigned long y;
331 readonly attribute unsigned long z;
335 interface EngineCoolant : <ref>VehicleCommonDataType</ref> {
336 readonly attribute unsigned short level;
337 readonly attribute unsigned short temperature;
341 interface SteeringWheel : <ref>VehicleCommonDataType</ref> {
342 readonly attribute short angle;
346 interface IgnitionTime : <ref>VehicleCommonDataType</ref> {
347 readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;
348 readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;
352 interface YawRate : <ref>VehicleCommonDataType</ref> {
353 readonly attribute short value;
357 interface BrakeOperation : <ref>VehicleCommonDataType</ref> {
358 readonly attribute boolean brakePedalDepressed;
362 interface WheelTick : <ref>VehicleCommonDataType</ref> {
363 readonly attribute unsigned long value;
364 attribute <ref>Zone</ref>? zone;
368 "home", "back", "search", "call", "end_call", "media_play",
369 "media_next", "media_previous", "media_pause", "voice_recognize",
370 "enter", "left", "right", "up", "down"
373 enum PressType {"press", "long_press", "release"};
376 interface ButtonEvent : <ref>VehicleCommonDataType</ref> {
377 readonly attribute <ref>VehicleButton</ref>[] button;
378 readonly attribute <ref>PressType</ref> state;
382 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
383 readonly attribute boolean mode;
387 interface NightMode : <ref>VehicleCommonDataType</ref> {
388 readonly attribute boolean mode;
392 interface Odometer : <ref>VehicleCommonDataType</ref> {
393 readonly attribute unsigned long? distanceSinceStart;
394 readonly attribute unsigned long distanceTotal;
398 interface TransmissionOil : <ref>VehicleCommonDataType</ref> {
399 readonly attribute byte? wear;
400 readonly attribute short? temperature;
404 interface TransmissionClutch : <ref>VehicleCommonDataType</ref> {
405 readonly attribute byte wear;
409 interface BrakeMaintenance : <ref>VehicleCommonDataType</ref> {
410 readonly attribute unsigned short? fluidLevel;
411 readonly attribute boolean? fluidLevelLow;
412 readonly attribute byte? padWear;
413 readonly attribute boolean? brakesWorn;
414 attribute <ref>Zone</ref>? zone;
418 interface WasherFluid : <ref>VehicleCommonDataType</ref> {
419 readonly attribute unsigned short? level;
420 readonly attribute boolean? levelLow;
424 interface MalfunctionIndicator : <ref>VehicleCommonDataType</ref> {
425 readonly attribute boolean on;
429 interface BatteryStatus : <ref>VehicleCommonDataType</ref> {
430 readonly attribute unsigned short? chargeLevel;
431 readonly attribute unsigned short? voltage;
432 readonly attribute unsigned short? current;
433 attribute <ref>Zone</ref>? zone;
437 interface Tire : <ref>VehicleCommonDataType</ref> {
438 readonly attribute boolean? pressureLow;
439 readonly attribute unsigned short? pressure;
440 readonly attribute short? temperature;
441 attribute <ref>Zone</ref>? zone;
445 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
446 readonly attribute unsigned long accumulatedEngineRuntime;
447 readonly attribute unsigned long distanceWithMILOn;
448 readonly attribute unsigned long distanceSinceCodeCleared;
449 readonly attribute unsigned long timeRunMILOn;
450 readonly attribute unsigned long timeTroubleCodeClear;
454 interface LanguageConfiguration : <ref>VehicleCommonDataType</ref> {
455 attribute DOMString? language;
459 interface UnitsOfMeasure : <ref>VehicleCommonDataType</ref> {
460 attribute boolean? isMKSSystem;
461 attribute DOMString? unitsFuelVolume;
462 attribute DOMString? unitsDistance;
463 attribute DOMString? unitsSpeed;
464 attribute DOMString? unitsFuelConsumption;
468 interface Mirror : <ref>VehicleCommonDataType</ref> {
469 attribute unsigned short? mirrorTilt;
470 attribute unsigned short? mirrorPan;
471 attribute <ref>Zone</ref>? zone;
475 interface SeatAdjustment : <ref>VehicleCommonDataType</ref> {
476 attribute unsigned short? reclineSeatBack;
477 attribute unsigned short? seatSlide;
478 attribute unsigned short? seatCushionHeight;
479 attribute unsigned short? seatHeadrest;
480 attribute unsigned short? seatBackCushion;
481 attribute unsigned short? seatSideCushion;
482 attribute <ref>Zone</ref>? zone;
485 enum DriveModeEnum {"comfort", "auto", "sport", "eco", "manual", "winter"};
488 interface DriveMode : <ref>VehicleCommonDataType</ref> {
489 attribute <ref>DriveModeEnum</ref>? driveMode;
493 interface DashboardIllumination : <ref>VehicleCommonDataType</ref> {
494 attribute DOMString? dashboardIllumination;
498 interface VehicleSound : <ref>VehicleCommonDataType</ref> {
499 attribute boolean activeNoiseControlMode;
500 attribute DOMString? engineSoundEnhancementMode;
504 interface AntilockBrakingSystem : <ref>VehicleCommonDataType</ref> {
505 readonly attribute boolean enabled;
506 readonly attribute boolean engaged;
510 interface TractionControlSystem : <ref>VehicleCommonDataType</ref> {
511 readonly attribute boolean enabled;
512 readonly attribute boolean engaged;
516 interface ElectronicStabilityControl : <ref>VehicleCommonDataType</ref> {
517 readonly attribute boolean enabled;
518 readonly attribute boolean engaged;
522 interface TopSpeedLimit : <ref>VehicleCommonDataType</ref> {
523 readonly attribute unsigned short speed;
527 interface AirbagStatus : <ref>VehicleCommonDataType</ref> {
528 readonly attribute boolean activated;
529 readonly attribute boolean deployed;
530 attribute <ref>Zone</ref>? zone;
533 enum DoorOpenStatus {"open", "ajar", "closed"};
536 interface Door : <ref>VehicleCommonDataType</ref> {
537 readonly attribute <ref>DoorOpenStatus</ref> status;
538 attribute boolean lock;
539 attribute <ref>Zone</ref>? zone;
543 interface ChildSafetyLock : <ref>VehicleCommonDataType</ref> {
544 attribute boolean lock;
545 attribute <ref>Zone</ref>? zone;
548 enum OccupantStatus {"adult", "child", "vacant"};
550 enum IdentificationType {"pin", "keyfob", "Bluetooth", "NFC", "fingerprint", "camera", "voice"};
553 interface Seat : <ref>VehicleCommonDataType</ref> {
554 readonly attribute <ref>OccupantStatus</ref> occupant;
555 readonly attribute boolean seatbelt;
556 readonly attribute DOMString? occupantName;
557 readonly attribute <ref>IdentificationType</ref> identificationType;
558 attribute <ref>Zone</ref>? zone;
562 interface Temperature : <ref>VehicleCommonDataType</ref> {
563 readonly attribute float interiorTemperature;
564 readonly attribute float exteriorTemperature;
568 interface RainSensor : <ref>VehicleCommonDataType</ref> {
569 readonly attribute unsigned short rain;
570 attribute <ref>Zone</ref>? zone;
574 interface WiperStatus : <ref>VehicleCommonDataType</ref> {
575 readonly attribute unsigned short wiperSpeed;
576 attribute <ref>Zone</ref>? zone;
579 enum WiperControl {"off", "once", "slowest", "slow", "middle", "fast", "fastest", "auto"};
582 interface WiperSetting : <ref>VehicleCommonDataType</ref> {
583 attribute <ref>WiperControl</ref> wiperControl;
584 attribute <ref>Zone</ref>? zone;
588 interface Defrost : <ref>VehicleCommonDataType</ref> {
589 attribute boolean? defrostWindow;
590 attribute boolean? defrostMirrors;
591 attribute <ref>Zone</ref>? zone;
594 enum AirflowDirection {"frontpanel", "floorduct", "bilevel", "defrostfloor"};
597 interface ClimateControl : <ref>VehicleCommonDataType</ref> {
598 attribute <ref>AirflowDirection</ref> airflowDirection;
599 attribute unsigned short fanSpeedLevel;
600 attribute byte? targetTemperature;
601 attribute boolean airConditioning;
602 attribute boolean heater;
603 attribute unsigned short? seatHeater;
604 attribute unsigned short? seatCooler;
605 attribute boolean airRecirculation;
606 attribute unsigned short? steeringWheelHeater;
607 attribute <ref>Zone</ref>? zone;
611 interface Sunroof : <ref>VehicleCommonDataType</ref> {
612 attribute unsigned short openness;
613 attribute unsigned short tilt;
614 attribute <ref>Zone</ref>? zone;
617 enum ConvertibleRoofStatus {"closed", "closing", "opening", "opened"};
620 interface ConvertibleRoof : <ref>VehicleCommonDataType</ref> {
621 attribute <ref>ConvertibleRoofStatus</ref> status;
625 interface SideWindow : <ref>VehicleCommonDataType</ref> {
626 attribute boolean? lock;
627 attribute unsigned short? openness;
628 attribute <ref>Zone</ref>? zone;
632 interface AtmosphericPressure : <ref>VehicleCommonDataType</ref> {
633 readonly attribute unsigned short pressure;
636 enum LaneDepartureStatus {"off", "pause", "running"};
639 interface LaneDepartureDetection : <ref>VehicleCommonDataType</ref> {
640 readonly attribute <ref>LaneDepartureStatus</ref> status;
643 enum AlarmStatus {"disarmed", "preArmed", "armed", "alarmed"};
646 interface Alarm : <ref>VehicleCommonDataType</ref> {
647 attribute <ref>AlarmStatus</ref> status;
650 enum ParkingBrakeStatus {"inactive", "active", "error"};
653 interface ParkingBrake : <ref>VehicleCommonDataType</ref> {
654 readonly attribute <ref>ParkingBrakeStatus</ref> status;
658 interface ParkingLights : <ref>VehicleCommonDataType</ref> {
659 readonly attribute boolean status;
660 attribute boolean setting;
662 <Interface name="VehicleManagerObject" id="::VehicleManagerObject">
663 <webidl> [NoInterfaceObject]
664 interface VehicleManagerObject {
665 readonly attribute <ref>Vehicle</ref> vehicle;
667 <ExtendedAttributeList>
668 <ExtendedAttribute name="NoInterfaceObject">
669 <webidl>NoInterfaceObject</webidl>
671 </ExtendedAttributeList>
672 <Attribute readonly="readonly" name="vehicle" id="::VehicleManagerObject::vehicle">
673 <webidl> readonly attribute <ref>Vehicle</ref> vehicle;</webidl>
674 <Type name="Vehicle"/>
677 <Implements name1="Tizen" name2="VehicleManagerObject">
678 <webidl><ref>Tizen</ref> implements <ref>VehicleManagerObject</ref>;</webidl>
680 <Interface name="Vehicle" id="::Vehicle">
681 <webidl>[NoInterfaceObject]
683 readonly attribute <ref>VehicleConfigurationInterface</ref> identification;
684 readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;
685 readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;
686 readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;
687 readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;
688 readonly attribute <ref>VehicleConfigurationInterface</ref> steeringWheelConfiguration;
690 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;
691 readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;
692 readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;
693 readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;
694 readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;
695 readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;
696 readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;
697 readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;
698 readonly attribute <ref>VehicleSignalInterface</ref> transmission;
699 readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;
700 readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;
701 readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;
702 readonly attribute <ref>VehicleSignalInterface</ref> chime;
703 readonly attribute <ref>VehicleSignalInterface</ref> fuel;
704 readonly attribute <ref>VehicleSignalInterface</ref> engineOil;
705 readonly attribute <ref>VehicleSignalInterface</ref> acceleration;
706 readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;
707 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
708 readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;
709 readonly attribute <ref>VehicleSignalInterface</ref> yawRate;
710 readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;
711 readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;
712 readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;
713 readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;
714 readonly attribute <ref>VehicleSignalInterface</ref> nightMode;
716 readonly attribute <ref>VehicleSignalInterface</ref> odometer;
717 readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;
718 readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;
719 readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;
720 readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;
721 readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;
722 readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;
723 readonly attribute <ref>VehicleSignalInterface</ref> tire;
724 readonly attribute <ref>VehicleInterface</ref> diagnostic;
726 readonly attribute <ref>VehicleSignalInterface</ref> driverIdentification;
727 readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;
728 readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;
729 readonly attribute <ref>VehicleSignalInterface</ref> mirror;
730 readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;
731 readonly attribute <ref>VehicleSignalInterface</ref> driveMode;
732 readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;
733 readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;
734 readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;
736 readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;
737 readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;
738 readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;
739 readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;
740 readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;
741 readonly attribute <ref>VehicleSignalInterface</ref> door;
742 readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;
743 readonly attribute <ref>VehicleSignalInterface</ref> seat;
745 readonly attribute <ref>VehicleSignalInterface</ref> temperature;
746 readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;
747 readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;
748 readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;
749 readonly attribute <ref>VehicleSignalInterface</ref> defrost;
750 readonly attribute <ref>VehicleSignalInterface</ref> sunroof;
751 readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;
752 readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;
753 readonly attribute <ref>VehicleSignalInterface</ref> climateControl;
754 readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;
756 readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;
757 readonly attribute <ref>VehicleSignalInterface</ref> alarm;
758 readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;
759 readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;
761 <ExtendedAttributeList>
762 <ExtendedAttribute name="NoInterfaceObject">
763 <webidl>NoInterfaceObject</webidl>
765 </ExtendedAttributeList>
766 <Attribute readonly="readonly" name="identification" id="::Vehicle::identification">
767 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> identification;</webidl>
768 <Type name="VehicleConfigurationInterface"/>
770 <Attribute readonly="readonly" name="sizeConfiguration" id="::Vehicle::sizeConfiguration">
771 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> sizeConfiguration;</webidl>
772 <Type name="VehicleConfigurationInterface"/>
774 <Attribute readonly="readonly" name="fuelConfiguration" id="::Vehicle::fuelConfiguration">
775 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> fuelConfiguration;</webidl>
776 <Type name="VehicleConfigurationInterface"/>
778 <Attribute readonly="readonly" name="transmissionConfiguration" id="::Vehicle::transmissionConfiguration">
779 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> transmissionConfiguration;</webidl>
780 <Type name="VehicleConfigurationInterface"/>
782 <Attribute readonly="readonly" name="wheelConfiguration" id="::Vehicle::wheelConfiguration">
783 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> wheelConfiguration;</webidl>
784 <Type name="VehicleConfigurationInterface"/>
786 <Attribute readonly="readonly" name="steeringWheelConfiguration" id="::Vehicle::steeringWheelConfiguration">
787 <webidl> readonly attribute <ref>VehicleConfigurationInterface</ref> steeringWheelConfiguration;</webidl>
788 <Type name="VehicleConfigurationInterface"/>
790 <Attribute readonly="readonly" name="vehicleSpeed" id="::Vehicle::vehicleSpeed">
791 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> vehicleSpeed;</webidl>
792 <Type name="VehicleSignalInterface"/>
794 <Attribute readonly="readonly" name="wheelSpeed" id="::Vehicle::wheelSpeed">
795 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wheelSpeed;</webidl>
796 <Type name="VehicleSignalInterface"/>
798 <Attribute readonly="readonly" name="engineSpeed" id="::Vehicle::engineSpeed">
799 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineSpeed;</webidl>
800 <Type name="VehicleSignalInterface"/>
802 <Attribute readonly="readonly" name="powerTrainTorque" id="::Vehicle::powerTrainTorque">
803 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> powerTrainTorque;</webidl>
804 <Type name="VehicleSignalInterface"/>
806 <Attribute readonly="readonly" name="acceleratorPedalPosition" id="::Vehicle::acceleratorPedalPosition">
807 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> acceleratorPedalPosition;</webidl>
808 <Type name="VehicleSignalInterface"/>
810 <Attribute readonly="readonly" name="throttlePosition" id="::Vehicle::throttlePosition">
811 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> throttlePosition;</webidl>
812 <Type name="VehicleSignalInterface"/>
814 <Attribute readonly="readonly" name="tripMeters" id="::Vehicle::tripMeters">
815 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tripMeters;</webidl>
816 <Type name="VehicleSignalInterface"/>
818 <Attribute readonly="readonly" name="diagnostic" id="::Vehicle::diagnostic">
819 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> diagnostic;</webidl>
820 <Type name="VehicleSignalInterface"/>
822 <Attribute readonly="readonly" name="transmission" id="::Vehicle::transmission">
823 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmission;</webidl>
824 <Type name="VehicleSignalInterface"/>
826 <Attribute readonly="readonly" name="cruiseControlStatus" id="::Vehicle::cruiseControlStatus">
827 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> cruiseControlStatus;</webidl>
828 <Type name="VehicleSignalInterface"/>
830 <Attribute readonly="readonly" name="lightStatus" id="::Vehicle::lightStatus">
831 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> lightStatus;</webidl>
832 <Type name="VehicleSignalInterface"/>
834 <Attribute readonly="readonly" name="interiorLightStatus" id="::Vehicle::interiorLightStatus">
835 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> interiorLightStatus;</webidl>
836 <Type name="VehicleSignalInterface"/>
838 <Attribute readonly="readonly" name="chime" id="::Vehicle::chime">
839 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> chime;</webidl>
840 <Type name="VehicleSignalInterface"/>
842 <Attribute readonly="readonly" name="fuel" id="::Vehicle::fuel">
843 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> fuel;</webidl>
844 <Type name="VehicleSignalInterface"/>
846 <Attribute readonly="readonly" name="engineOil" id="::Vehicle::engineOil">
847 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineOil;</webidl>
848 <Type name="VehicleSignalInterface"/>
850 <Attribute readonly="readonly" name="acceleration" id="::Vehicle::acceleration">
851 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> acceleration;</webidl>
852 <Type name="VehicleSignalInterface"/>
854 <Attribute readonly="readonly" name="engineCoolant" id="::Vehicle::engineCoolant">
855 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> engineCoolant;</webidl>
856 <Type name="VehicleSignalInterface"/>
858 <Attribute readonly="readonly" name="steeringWheel" id="::Vehicle::steeringWheel">
859 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;</webidl>
860 <Type name="VehicleSignalInterface"/>
862 <Attribute readonly="readonly" name="ignitionTime" id="::Vehicle::ignitionTime">
863 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> ignitionTime;</webidl>
864 <Type name="VehicleSignalInterface"/>
866 <Attribute readonly="readonly" name="yawRate" id="::Vehicle::yawRate">
867 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> yawRate;</webidl>
868 <Type name="VehicleSignalInterface"/>
870 <Attribute readonly="readonly" name="brakeOperation" id="::Vehicle::brakeOperation">
871 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> brakeOperation;</webidl>
872 <Type name="VehicleSignalInterface"/>
874 <Attribute readonly="readonly" name="wheelTick" id="::Vehicle::wheelTick">
875 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wheelTick;</webidl>
876 <Type name="VehicleSignalInterface"/>
878 <Attribute readonly="readonly" name="buttonEvent" id="::Vehicle::buttonEvent">
879 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> buttonEvent;</webidl>
880 <Type name="VehicleSignalInterface"/>
882 <Attribute readonly="readonly" name="drivingMode" id="::Vehicle::drivingMode">
883 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> drivingMode;</webidl>
884 <Type name="VehicleSignalInterface"/>
886 <Attribute readonly="readonly" name="nightMode" id="::Vehicle::nightMode">
887 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> nightMode;</webidl>
888 <Type name="VehicleSignalInterface"/>
890 <Attribute readonly="readonly" name="odometer" id="::Vehicle::odometer">
891 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> odometer;</webidl>
892 <Type name="VehicleSignalInterface"/>
894 <Attribute readonly="readonly" name="transmissionOil" id="::Vehicle::transmissionOil">
895 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmissionOil;</webidl>
896 <Type name="VehicleSignalInterface"/>
898 <Attribute readonly="readonly" name="transmissionClutch" id="::Vehicle::transmissionClutch">
899 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> transmissionClutch;</webidl>
900 <Type name="VehicleSignalInterface"/>
902 <Attribute readonly="readonly" name="brakeMaintenance" id="::Vehicle::brakeMaintenance">
903 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> brakeMaintenance;</webidl>
904 <Type name="VehicleSignalInterface"/>
906 <Attribute readonly="readonly" name="washerFluid" id="::Vehicle::washerFluid">
907 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> washerFluid;</webidl>
908 <Type name="VehicleSignalInterface"/>
910 <Attribute readonly="readonly" name="malfunctionIndicator" id="::Vehicle::malfunctionIndicator">
911 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> malfunctionIndicator;</webidl>
912 <Type name="VehicleSignalInterface"/>
914 <Attribute readonly="readonly" name="batteryStatus" id="::Vehicle::batteryStatus">
915 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> batteryStatus;</webidl>
916 <Type name="VehicleSignalInterface"/>
918 <Attribute readonly="readonly" name="tire" id="::Vehicle::tire">
919 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tire;</webidl>
920 <Type name="VehicleSignalInterface"/>
922 <Attribute readonly="readonly" name="diagnostic" id="::Vehicle::diagnostic">
923 <webidl> readonly attribute <ref>VehicleInterface</ref> diagnostic;</webidl>
924 <Type name="VehicleInterface"/>
926 <Attribute readonly="readonly" name="driverIdentification" id="::Vehicle::driverIdentification">
927 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> driverIdentification;</webidl>
928 <Type name="VehicleSignalInterface"/>
930 <Attribute readonly="readonly" name="languageConfiguration" id="::Vehicle::languageConfiguration">
931 <webidl> readonly attribute <ref>VehicleSignalInterface</ref>? languageConfiguration;</webidl>
932 <Type name="VehicleSignalInterface" nullable="nullable"/>
934 <Attribute readonly="readonly" name="unitsOfMeasure" id="::Vehicle::unitsOfMeasure">
935 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> unitsOfMeasure;</webidl>
936 <Type name="VehicleSignalInterface"/>
938 <Attribute readonly="readonly" name="mirror" id="::Vehicle::mirror">
939 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> mirror;</webidl>
940 <Type name="VehicleSignalInterface"/>
942 <Attribute readonly="readonly" name="steeringWheel" id="::Vehicle::steeringWheel">
943 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> steeringWheel;</webidl>
944 <Type name="VehicleSignalInterface"/>
946 <Attribute readonly="readonly" name="driveMode" id="::Vehicle::driveMode">
947 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> driveMode;</webidl>
948 <Type name="VehicleSignalInterface"/>
950 <Attribute readonly="readonly" name="seatAdjustment" id="::Vehicle::seatAdjustment">
951 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> seatAdjustment;</webidl>
952 <Type name="VehicleSignalInterface"/>
954 <Attribute readonly="readonly" name="dashboardIllumination" id="::Vehicle::dashboardIllumination">
955 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> dashboardIllumination;</webidl>
956 <Type name="VehicleSignalInterface"/>
958 <Attribute readonly="readonly" name="vehicleSound" id="::Vehicle::vehicleSound">
959 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> vehicleSound;</webidl>
960 <Type name="VehicleSignalInterface"/>
962 <Attribute readonly="readonly" name="antilockBrakingSystem" id="::Vehicle::antilockBrakingSystem">
963 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> antilockBrakingSystem;</webidl>
964 <Type name="VehicleSignalInterface"/>
966 <Attribute readonly="readonly" name="tractionControlSystem" id="::Vehicle::tractionControlSystem">
967 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> tractionControlSystem;</webidl>
968 <Type name="VehicleSignalInterface"/>
970 <Attribute readonly="readonly" name="electronicStabilityControl" id="::Vehicle::electronicStabilityControl">
971 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> electronicStabilityControl;</webidl>
972 <Type name="VehicleSignalInterface"/>
974 <Attribute readonly="readonly" name="topSpeedLimit" id="::Vehicle::topSpeedLimit">
975 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> topSpeedLimit;</webidl>
976 <Type name="VehicleSignalInterface"/>
978 <Attribute readonly="readonly" name="airbagStatus" id="::Vehicle::airbagStatus">
979 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> airbagStatus;</webidl>
980 <Type name="VehicleSignalInterface"/>
982 <Attribute readonly="readonly" name="door" id="::Vehicle::door">
983 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> door;</webidl>
984 <Type name="VehicleSignalInterface"/>
986 <Attribute readonly="readonly" name="childSafetyLock" id="::Vehicle::childSafetyLock">
987 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> childSafetyLock;</webidl>
988 <Type name="VehicleSignalInterface"/>
990 <Attribute readonly="readonly" name="seat" id="::Vehicle::seat">
991 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> seat;</webidl>
992 <Type name="VehicleSignalInterface"/>
994 <Attribute readonly="readonly" name="temperature" id="::Vehicle::temperature">
995 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> temperature;</webidl>
996 <Type name="VehicleSignalInterface"/>
998 <Attribute readonly="readonly" name="rainSensor" id="::Vehicle::rainSensor">
999 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> rainSensor;</webidl>
1000 <Type name="VehicleSignalInterface"/>
1002 <Attribute readonly="readonly" name="wiperStatus" id="::Vehicle::wiperStatus">
1003 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wiperStatus;</webidl>
1004 <Type name="VehicleSignalInterface"/>
1006 <Attribute readonly="readonly" name="wiperSetting" id="::Vehicle::wiperSetting">
1007 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> wiperSetting;</webidl>
1008 <Type name="VehicleSignalInterface"/>
1010 <Attribute readonly="readonly" name="defrost" id="::Vehicle::defrost">
1011 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> defrost;</webidl>
1012 <Type name="VehicleSignalInterface"/>
1014 <Attribute readonly="readonly" name="sunroof" id="::Vehicle::sunroof">
1015 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> sunroof;</webidl>
1016 <Type name="VehicleSignalInterface"/>
1018 <Attribute readonly="readonly" name="convertibleRoof" id="::Vehicle::convertibleRoof">
1019 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> convertibleRoof;</webidl>
1020 <Type name="VehicleSignalInterface"/>
1022 <Attribute readonly="readonly" name="sideWindow" id="::Vehicle::sideWindow">
1023 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> sideWindow;</webidl>
1024 <Type name="VehicleSignalInterface"/>
1026 <Attribute readonly="readonly" name="climateControl" id="::Vehicle::climateControl">
1027 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> climateControl;</webidl>
1028 <Type name="VehicleSignalInterface"/>
1030 <Attribute readonly="readonly" name="atmosphericPressure" id="::Vehicle::atmosphericPressure">
1031 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> atmosphericPressure;</webidl>
1032 <Type name="VehicleSignalInterface"/>
1034 <Attribute readonly="readonly" name="laneDepartureStatus" id="::Vehicle::laneDepartureStatus">
1035 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> laneDepartureStatus;</webidl>
1036 <Type name="VehicleSignalInterface"/>
1038 <Attribute readonly="readonly" name="alarm" id="::Vehicle::alarm">
1039 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> alarm;</webidl>
1040 <Type name="VehicleSignalInterface"/>
1042 <Attribute readonly="readonly" name="parkingBrake" id="::Vehicle::parkingBrake">
1043 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> parkingBrake;</webidl>
1044 <Type name="VehicleSignalInterface"/>
1046 <Attribute readonly="readonly" name="parkingLights" id="::Vehicle::parkingLights">
1047 <webidl> readonly attribute <ref>VehicleSignalInterface</ref> parkingLights;</webidl>
1048 <Type name="VehicleSignalInterface"/>
1051 <Interface name="VehicleInterfaceCallback" id="::VehicleInterfaceCallback">
1052 <webidl>[Callback=FunctionOnly, NoInterfaceObject]
1053 interface VehicleInterfaceCallback {
1054 void onsuccess(object value);
1056 <ExtendedAttributeList>
1057 <ExtendedAttribute name="Callback" value="FunctionOnly">
1058 <webidl>Callback</webidl>
1059 </ExtendedAttribute>
1060 <ExtendedAttribute name="NoInterfaceObject">
1061 <webidl> NoInterfaceObject</webidl>
1062 </ExtendedAttribute>
1063 </ExtendedAttributeList>
1064 <Operation name="onsuccess" id="::VehicleInterfaceCallback::onsuccess">
1065 <webidl> void onsuccess(object value);</webidl>
1068 <Argument name="value">
1069 <Type type="object"/>
1074 <Interface name="AvailableCallback" id="::AvailableCallback">
1075 <webidl>[Callback=FunctionOnly, NoInterfaceObject]
1076 interface AvailableCallback {
1077 void onsuccess(<ref>Availability</ref> available);
1079 <ExtendedAttributeList>
1080 <ExtendedAttribute name="Callback" value="FunctionOnly">
1081 <webidl>Callback</webidl>
1082 </ExtendedAttribute>
1083 <ExtendedAttribute name="NoInterfaceObject">
1084 <webidl> NoInterfaceObject</webidl>
1085 </ExtendedAttribute>
1086 </ExtendedAttributeList>
1087 <Operation name="onsuccess" id="::AvailableCallback::onsuccess">
1088 <webidl> void onsuccess(<ref>Availability</ref> available);</webidl>
1091 <Argument name="available">
1092 <Type name="Availability"/>
1097 <Enum name="Availability" id="::Availability">
1098 <webidl>enum Availability {
1099 "available", "not_supported", "not_supported_yet", "not_supported_security_policy",
1100 "not_supported_business_policy", "not_supported_other"
1102 <EnumValue stringvalue="available">
1103 <webidl> "available</webidl>
1105 <EnumValue stringvalue="not_supported">
1106 <webidl> "not_supported</webidl>
1108 <EnumValue stringvalue="not_supported_yet">
1109 <webidl> "not_supported_yet</webidl>
1111 <EnumValue stringvalue="not_supported_security_policy">
1112 <webidl> "not_supported_security_policy</webidl>
1114 <EnumValue stringvalue="not_supported_business_policy">
1115 <webidl> "not_supported_business_policy</webidl>
1117 <EnumValue stringvalue="not_supported_other">
1118 <webidl> "not_supported_other</webidl>
1121 <Interface name="VehicleInterface" id="::VehicleInterface">
1122 <webidl>[NoInterfaceObject]
1123 interface VehicleInterface {
1124 <ref>Availability</ref> availableForRetrieval (DOMString attributeName);
1125 short availabilityChangedListener (<ref>AvailableCallback</ref> callback);
1126 void removeAvailabilityChangedListener (short handle);
1127 <ref>Promise</ref> get (optional <ref>Zone</ref> zone);
1128 <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);
1129 readonly attribute boolean isLogged;
1130 readonly attribute Date ? from;
1131 readonly attribute Date ? to;
1132 readonly attribute boolean supported;
1133 readonly attribute <ref>Zone</ref>[] zones;
1135 <ExtendedAttributeList>
1136 <ExtendedAttribute name="NoInterfaceObject">
1137 <webidl>NoInterfaceObject</webidl>
1138 </ExtendedAttribute>
1139 </ExtendedAttributeList>
1140 <Operation name="availableForRetrieval" id="::VehicleInterface::availableForRetrieval">
1141 <webidl> <ref>Availability</ref> availableForRetrieval (DOMString attributeName);</webidl>
1142 <Type name="Availability"/>
1144 <Argument name="attributeName">
1145 <Type type="DOMString"/>
1149 <Operation name="availabilityChangedListener" id="::VehicleInterface::availabilityChangedListener">
1150 <webidl> short availabilityChangedListener (<ref>AvailableCallback</ref> callback);</webidl>
1151 <Type type="short"/>
1153 <Argument name="callback">
1154 <Type name="AvailableCallback"/>
1158 <Operation name="removeAvailabilityChangedListener" id="::VehicleInterface::removeAvailabilityChangedListener">
1159 <webidl> void removeAvailabilityChangedListener (short handle);</webidl>
1162 <Argument name="handle">
1163 <Type type="short"/>
1167 <Operation name="get" id="::VehicleInterface::get">
1168 <webidl> <ref>Promise</ref> get (optional <ref>Zone</ref> zone);</webidl>
1169 <Type name="Promise"/>
1171 <Argument optional="optional" name="zone">
1176 <Operation name="getHistory" id="::VehicleInterface::getHistory">
1177 <webidl> <ref>Promise</ref> getHistory (Date begin, Date end, optional <ref>Zone</ref> zone);</webidl>
1178 <Type name="Promise"/>
1180 <Argument name="begin">
1183 <Argument name="end">
1186 <Argument optional="optional" name="zone">
1191 <Attribute readonly="readonly" name="isLogged" id="::VehicleInterface::isLogged">
1192 <webidl> readonly attribute boolean isLogged;</webidl>
1193 <Type type="boolean"/>
1195 <Attribute readonly="readonly" name="from" id="::VehicleInterface::from">
1196 <webidl> readonly attribute Date ? from;</webidl>
1197 <Type type="Date" nullable="nullable"/>
1199 <Attribute readonly="readonly" name="to" id="::VehicleInterface::to">
1200 <webidl> readonly attribute Date ? to;</webidl>
1201 <Type type="Date" nullable="nullable"/>
1203 <Attribute readonly="readonly" name="supported" id="::VehicleInterface::supported">
1204 <webidl> readonly attribute boolean supported;</webidl>
1205 <Type type="boolean"/>
1207 <Attribute readonly="readonly" name="zones" id="::VehicleInterface::zones">
1208 <webidl> readonly attribute <ref>Zone</ref>[] zones;</webidl>
1214 <Interface name="VehicleConfigurationInterface" id="::VehicleConfigurationInterface">
1215 <webidl>[NoInterfaceObject]
1216 interface VehicleConfigurationInterface : <ref>VehicleInterface</ref> {};</webidl>
1217 <ExtendedAttributeList>
1218 <ExtendedAttribute name="NoInterfaceObject">
1219 <webidl>NoInterfaceObject</webidl>
1220 </ExtendedAttribute>
1221 </ExtendedAttributeList>
1222 <InterfaceInheritance>
1223 <Name name="VehicleInterface"/>
1224 </InterfaceInheritance>
1226 <Interface name="VehicleSignalInterface" id="::VehicleSignalInterface">
1227 <webidl>[NoInterfaceObject]
1228 interface VehicleSignalInterface : <ref>VehicleInterface</ref> {
1229 <ref>Availability</ref> availableForSubscription (DOMString attributeName);
1230 <ref>Availability</ref> availableForSetting (DOMString attributeName);
1231 <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);
1232 unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);
1233 void unsubscribe (unsigned short handle);
1235 <ExtendedAttributeList>
1236 <ExtendedAttribute name="NoInterfaceObject">
1237 <webidl>NoInterfaceObject</webidl>
1238 </ExtendedAttribute>
1239 </ExtendedAttributeList>
1240 <InterfaceInheritance>
1241 <Name name="VehicleInterface"/>
1242 </InterfaceInheritance>
1243 <Operation name="availableForSubscription" id="::VehicleSignalInterface::availableForSubscription">
1244 <webidl> <ref>Availability</ref> availableForSubscription (DOMString attributeName);</webidl>
1245 <Type name="Availability"/>
1247 <Argument name="attributeName">
1248 <Type type="DOMString"/>
1252 <Operation name="availableForSetting" id="::VehicleSignalInterface::availableForSetting">
1253 <webidl> <ref>Availability</ref> availableForSetting (DOMString attributeName);</webidl>
1254 <Type name="Availability"/>
1256 <Argument name="attributeName">
1257 <Type type="DOMString"/>
1261 <Operation name="set" id="::VehicleSignalInterface::set">
1262 <webidl> <ref>Promise</ref> set (object value, optional <ref>Zone</ref> zone);</webidl>
1263 <Type name="Promise"/>
1265 <Argument name="value">
1266 <Type type="object"/>
1268 <Argument optional="optional" name="zone">
1273 <Operation name="subscribe" id="::VehicleSignalInterface::subscribe">
1274 <webidl> unsigned short subscribe (<ref>VehicleInterfaceCallback</ref> callback, optional <ref>Zone</ref> zone);</webidl>
1275 <Type type="unsigned short"/>
1277 <Argument name="callback">
1278 <Type name="VehicleInterfaceCallback"/>
1280 <Argument optional="optional" name="zone">
1285 <Operation name="unsubscribe" id="::VehicleSignalInterface::unsubscribe">
1286 <webidl> void unsubscribe (unsigned short handle);</webidl>
1289 <Argument name="handle">
1290 <Type type="unsigned short"/>
1295 <Enum name="ZonePosition" id="::ZonePosition">
1296 <webidl>enum ZonePosition {"Front", "Middle", "Right", "Left", "Rear", "Center"};</webidl>
1297 <EnumValue stringvalue="Front">
1298 <webidl>"Front</webidl>
1300 <EnumValue stringvalue="Middle">
1301 <webidl> "Middle</webidl>
1303 <EnumValue stringvalue="Right">
1304 <webidl> "Right</webidl>
1306 <EnumValue stringvalue="Left">
1307 <webidl> "Left</webidl>
1309 <EnumValue stringvalue="Rear">
1310 <webidl> "Rear</webidl>
1312 <EnumValue stringvalue="Center">
1313 <webidl> "Center</webidl>
1316 <Interface name="Zone" id="::Zone">
1317 <webidl>[NoInterfaceObject]
1319 attribute DOMString[] value;
1320 readonly attribute <ref>Zone</ref> driver;
1321 boolean equals (<ref>Zone</ref> zone);
1322 boolean contains (<ref>Zone</ref> zone);
1324 <ExtendedAttributeList>
1325 <ExtendedAttribute name="NoInterfaceObject">
1326 <webidl>NoInterfaceObject</webidl>
1327 </ExtendedAttribute>
1328 </ExtendedAttributeList>
1329 <Attribute name="value" id="::Zone::value">
1330 <webidl> attribute DOMString[] value;</webidl>
1332 <Type type="DOMString"/>
1335 <Attribute readonly="readonly" name="driver" id="::Zone::driver">
1336 <webidl> readonly attribute <ref>Zone</ref> driver;</webidl>
1339 <Operation name="equals" id="::Zone::equals">
1340 <webidl> boolean equals (<ref>Zone</ref> zone);</webidl>
1341 <Type type="boolean"/>
1343 <Argument name="zone">
1348 <Operation name="contains" id="::Zone::contains">
1349 <webidl> boolean contains (<ref>Zone</ref> zone);</webidl>
1350 <Type type="boolean"/>
1352 <Argument name="zone">
1358 <Enum name="VehicleError" id="::VehicleError">
1359 <webidl>enum VehicleError {"permission_denied", "invalid_operation", "timeout", "invalid_zone", "unknown"};</webidl>
1360 <EnumValue stringvalue="permission_denied">
1361 <webidl>"permission_denied</webidl>
1363 <EnumValue stringvalue="invalid_operation">
1364 <webidl> "invalid_operation</webidl>
1366 <EnumValue stringvalue="timeout">
1367 <webidl> "timeout</webidl>
1369 <EnumValue stringvalue="invalid_zone">
1370 <webidl> "invalid_zone</webidl>
1372 <EnumValue stringvalue="unknown">
1373 <webidl> "unknown</webidl>
1376 <Interface name="VehicleInterfaceError" id="::VehicleInterfaceError">
1377 <webidl>[NoInterfaceObject]
1378 interface VehicleInterfaceError {
1379 readonly attribute <ref>VehicleError</ref> error;
1380 readonly attribute DOMString message;
1382 <ExtendedAttributeList>
1383 <ExtendedAttribute name="NoInterfaceObject">
1384 <webidl>NoInterfaceObject</webidl>
1385 </ExtendedAttribute>
1386 </ExtendedAttributeList>
1387 <Attribute readonly="readonly" name="error" id="::VehicleInterfaceError::error">
1388 <webidl> readonly attribute <ref>VehicleError</ref> error;</webidl>
1389 <Type name="VehicleError"/>
1391 <Attribute readonly="readonly" name="message" id="::VehicleInterfaceError::message">
1392 <webidl> readonly attribute DOMString message;</webidl>
1393 <Type type="DOMString"/>
1396 <Interface name="VehicleCommonDataType" id="::VehicleCommonDataType">
1397 <webidl>[NoInterfaceObject]
1398 interface VehicleCommonDataType {
1399 readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;
1401 <ExtendedAttributeList>
1402 <ExtendedAttribute name="NoInterfaceObject">
1403 <webidl>NoInterfaceObject</webidl>
1404 </ExtendedAttribute>
1405 </ExtendedAttributeList>
1406 <Attribute readonly="readonly" name="timeStamp" id="::VehicleCommonDataType::timeStamp">
1407 <webidl> readonly attribute <ref>DOMTimeStamp</ref>? timeStamp;</webidl>
1408 <Type name="DOMTimeStamp" nullable="nullable"/>
1411 <Enum name="VehicleTypeEnum" id="::VehicleTypeEnum">
1412 <webidl>enum VehicleTypeEnum {
1413 "passengerCarMini", "passengerCarLight", "passengerCarCompact", "passengerCarMedium",
1414 "passengerCarHeavy", "sportUtilityVehicle", "pickupTruck", "van"
1416 <EnumValue stringvalue="passengerCarMini">
1417 <webidl> "passengerCarMini</webidl>
1419 <EnumValue stringvalue="passengerCarLight">
1420 <webidl> "passengerCarLight</webidl>
1422 <EnumValue stringvalue="passengerCarCompact">
1423 <webidl> "passengerCarCompact</webidl>
1425 <EnumValue stringvalue="passengerCarMedium">
1426 <webidl> "passengerCarMedium</webidl>
1428 <EnumValue stringvalue="passengerCarHeavy">
1429 <webidl> "passengerCarHeavy</webidl>
1431 <EnumValue stringvalue="sportUtilityVehicle">
1432 <webidl> "sportUtilityVehicle</webidl>
1434 <EnumValue stringvalue="pickupTruck">
1435 <webidl> "pickupTruck</webidl>
1437 <EnumValue stringvalue="van">
1438 <webidl> "van</webidl>
1441 <Interface name="Identification" id="::Identification">
1442 <webidl>[NoInterfaceObject]
1443 interface Identification : <ref>VehicleCommonDataType</ref> {
1444 readonly attribute DOMString? VIN;
1445 readonly attribute DOMString? WMI;
1446 readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;
1447 readonly attribute DOMString? brand;
1448 readonly attribute DOMString? model;
1449 readonly attribute unsigned short? year;
1451 <ExtendedAttributeList>
1452 <ExtendedAttribute name="NoInterfaceObject">
1453 <webidl>NoInterfaceObject</webidl>
1454 </ExtendedAttribute>
1455 </ExtendedAttributeList>
1456 <InterfaceInheritance>
1457 <Name name="VehicleCommonDataType"/>
1458 </InterfaceInheritance>
1459 <Attribute readonly="readonly" name="VIN" id="::Identification::VIN">
1460 <webidl> readonly attribute DOMString? VIN;</webidl>
1461 <Type type="DOMString" nullable="nullable"/>
1463 <Attribute readonly="readonly" name="WMI" id="::Identification::WMI">
1464 <webidl> readonly attribute DOMString? WMI;</webidl>
1465 <Type type="DOMString" nullable="nullable"/>
1467 <Attribute readonly="readonly" name="vehicleType" id="::Identification::vehicleType">
1468 <webidl> readonly attribute <ref>VehicleTypeEnum</ref>? vehicleType;</webidl>
1469 <Type name="VehicleTypeEnum" nullable="nullable"/>
1471 <Attribute readonly="readonly" name="brand" id="::Identification::brand">
1472 <webidl> readonly attribute DOMString? brand;</webidl>
1473 <Type type="DOMString" nullable="nullable"/>
1475 <Attribute readonly="readonly" name="model" id="::Identification::model">
1476 <webidl> readonly attribute DOMString? model;</webidl>
1477 <Type type="DOMString" nullable="nullable"/>
1479 <Attribute readonly="readonly" name="year" id="::Identification::year">
1480 <webidl> readonly attribute unsigned short? year;</webidl>
1481 <Type type="unsigned short" nullable="nullable"/>
1484 <Interface name="SizeConfiguration" id="::SizeConfiguration">
1485 <webidl>[NoInterfaceObject]
1486 interface SizeConfiguration : <ref>VehicleCommonDataType</ref> {
1487 readonly attribute unsigned short? width;
1488 readonly attribute unsigned short? height;
1489 readonly attribute unsigned short? length;
1490 readonly attribute unsigned short[]? doorsCount;
1491 readonly attribute unsigned short? totalDoors;
1493 <ExtendedAttributeList>
1494 <ExtendedAttribute name="NoInterfaceObject">
1495 <webidl>NoInterfaceObject</webidl>
1496 </ExtendedAttribute>
1497 </ExtendedAttributeList>
1498 <InterfaceInheritance>
1499 <Name name="VehicleCommonDataType"/>
1500 </InterfaceInheritance>
1501 <Attribute readonly="readonly" name="width" id="::SizeConfiguration::width">
1502 <webidl> readonly attribute unsigned short? width;</webidl>
1503 <Type type="unsigned short" nullable="nullable"/>
1505 <Attribute readonly="readonly" name="height" id="::SizeConfiguration::height">
1506 <webidl> readonly attribute unsigned short? height;</webidl>
1507 <Type type="unsigned short" nullable="nullable"/>
1509 <Attribute readonly="readonly" name="length" id="::SizeConfiguration::length">
1510 <webidl> readonly attribute unsigned short? length;</webidl>
1511 <Type type="unsigned short" nullable="nullable"/>
1513 <Attribute readonly="readonly" name="doorsCount" id="::SizeConfiguration::doorsCount">
1514 <webidl> readonly attribute unsigned short[]? doorsCount;</webidl>
1515 <Type type="array" nullable="nullable">
1516 <Type type="unsigned short"/>
1519 <Attribute readonly="readonly" name="totalDoors" id="::SizeConfiguration::totalDoors">
1520 <webidl> readonly attribute unsigned short? totalDoors;</webidl>
1521 <Type type="unsigned short" nullable="nullable"/>
1524 <Enum name="FuelTypeEnum" id="::FuelTypeEnum">
1525 <webidl>enum FuelTypeEnum {
1526 "gasoline", "methanol", "ethanol", "diesel", "lpg", "cng", "electric"
1528 <EnumValue stringvalue="gasoline">
1529 <webidl> "gasoline</webidl>
1531 <EnumValue stringvalue="methanol">
1532 <webidl> "methanol</webidl>
1534 <EnumValue stringvalue="ethanol">
1535 <webidl> "ethanol</webidl>
1537 <EnumValue stringvalue="diesel">
1538 <webidl> "diesel</webidl>
1540 <EnumValue stringvalue="lpg">
1541 <webidl> "lpg</webidl>
1543 <EnumValue stringvalue="cng">
1544 <webidl> "cng</webidl>
1546 <EnumValue stringvalue="electric">
1547 <webidl> "electric</webidl>
1550 <Interface name="FuelConfiguration" id="::FuelConfiguration">
1551 <webidl>[NoInterfaceObject]
1552 interface FuelConfiguration : <ref>VehicleCommonDataType</ref> {
1553 readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;
1554 readonly attribute <ref>Zone</ref>? refuelPosition;
1556 <ExtendedAttributeList>
1557 <ExtendedAttribute name="NoInterfaceObject">
1558 <webidl>NoInterfaceObject</webidl>
1559 </ExtendedAttribute>
1560 </ExtendedAttributeList>
1561 <InterfaceInheritance>
1562 <Name name="VehicleCommonDataType"/>
1563 </InterfaceInheritance>
1564 <Attribute readonly="readonly" name="fuelType" id="::FuelConfiguration::fuelType">
1565 <webidl> readonly attribute <ref>FuelTypeEnum</ref>[]? fuelType;</webidl>
1566 <Type type="array" nullable="nullable">
1567 <Type name="FuelTypeEnum"/>
1570 <Attribute readonly="readonly" name="refuelPosition" id="::FuelConfiguration::refuelPosition">
1571 <webidl> readonly attribute <ref>Zone</ref>? refuelPosition;</webidl>
1572 <Type name="Zone" nullable="nullable"/>
1575 <Enum name="TransmissionGearTypeEnum" id="::TransmissionGearTypeEnum">
1576 <webidl>enum TransmissionGearTypeEnum {"auto", "manual"};</webidl>
1577 <EnumValue stringvalue="auto">
1578 <webidl>"auto</webidl>
1580 <EnumValue stringvalue="manual">
1581 <webidl> "manual</webidl>
1584 <Interface name="TransmissionConfiguration" id="::TransmissionConfiguration">
1585 <webidl>[NoInterfaceObject]
1586 interface TransmissionConfiguration : <ref>VehicleCommonDataType</ref> {
1587 readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;
1589 <ExtendedAttributeList>
1590 <ExtendedAttribute name="NoInterfaceObject">
1591 <webidl>NoInterfaceObject</webidl>
1592 </ExtendedAttribute>
1593 </ExtendedAttributeList>
1594 <InterfaceInheritance>
1595 <Name name="VehicleCommonDataType"/>
1596 </InterfaceInheritance>
1597 <Attribute readonly="readonly" name="transmissionGearType" id="::TransmissionConfiguration::transmissionGearType">
1598 <webidl> readonly attribute <ref>TransmissionGearTypeEnum</ref>? transmissionGearType;</webidl>
1599 <Type name="TransmissionGearTypeEnum" nullable="nullable"/>
1602 <Interface name="WheelConfiguration" id="::WheelConfiguration">
1603 <webidl>[NoInterfaceObject]
1604 interface WheelConfiguration : <ref>VehicleCommonDataType</ref> {
1605 readonly attribute unsigned short? wheelRadius;
1606 attribute <ref>Zone</ref>? zone;
1608 <ExtendedAttributeList>
1609 <ExtendedAttribute name="NoInterfaceObject">
1610 <webidl>NoInterfaceObject</webidl>
1611 </ExtendedAttribute>
1612 </ExtendedAttributeList>
1613 <InterfaceInheritance>
1614 <Name name="VehicleCommonDataType"/>
1615 </InterfaceInheritance>
1616 <Attribute readonly="readonly" name="wheelRadius" id="::WheelConfiguration::wheelRadius">
1617 <webidl> readonly attribute unsigned short? wheelRadius;</webidl>
1618 <Type type="unsigned short" nullable="nullable"/>
1620 <Attribute name="zone" id="::WheelConfiguration::zone">
1621 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
1622 <Type name="Zone" nullable="nullable"/>
1625 <Interface name="SteeringWheelConfiguration" id="::SteeringWheelConfiguration">
1626 <webidl>[NoInterfaceObject]
1627 interface SteeringWheelConfiguration : <ref>VehicleCommonDataType</ref> {
1628 readonly attribute boolean? steeringWheelLeft;
1630 <ExtendedAttributeList>
1631 <ExtendedAttribute name="NoInterfaceObject">
1632 <webidl>NoInterfaceObject</webidl>
1633 </ExtendedAttribute>
1634 </ExtendedAttributeList>
1635 <InterfaceInheritance>
1636 <Name name="VehicleCommonDataType"/>
1637 </InterfaceInheritance>
1638 <Attribute readonly="readonly" name="steeringWheelLeft" id="::SteeringWheelConfiguration::steeringWheelLeft">
1639 <webidl> readonly attribute boolean? steeringWheelLeft;</webidl>
1640 <Type type="boolean" nullable="nullable"/>
1643 <Interface name="VehicleSpeed" id="::VehicleSpeed">
1644 <webidl>[NoInterfaceObject]
1645 interface VehicleSpeed : <ref>VehicleCommonDataType</ref> {
1646 readonly attribute unsigned short speed;
1648 <ExtendedAttributeList>
1649 <ExtendedAttribute name="NoInterfaceObject">
1650 <webidl>NoInterfaceObject</webidl>
1651 </ExtendedAttribute>
1652 </ExtendedAttributeList>
1653 <InterfaceInheritance>
1654 <Name name="VehicleCommonDataType"/>
1655 </InterfaceInheritance>
1656 <Attribute readonly="readonly" name="speed" id="::VehicleSpeed::speed">
1657 <webidl> readonly attribute unsigned short speed;</webidl>
1658 <Type type="unsigned short"/>
1661 <Interface name="WheelSpeed" id="::WheelSpeed">
1662 <webidl>[NoInterfaceObject]
1663 interface WheelSpeed : <ref>VehicleCommonDataType</ref> {
1664 readonly attribute unsigned short speed;
1665 attribute <ref>Zone</ref>? zone;
1667 <ExtendedAttributeList>
1668 <ExtendedAttribute name="NoInterfaceObject">
1669 <webidl>NoInterfaceObject</webidl>
1670 </ExtendedAttribute>
1671 </ExtendedAttributeList>
1672 <InterfaceInheritance>
1673 <Name name="VehicleCommonDataType"/>
1674 </InterfaceInheritance>
1675 <Attribute readonly="readonly" name="speed" id="::WheelSpeed::speed">
1676 <webidl> readonly attribute unsigned short speed;</webidl>
1677 <Type type="unsigned short"/>
1679 <Attribute name="zone" id="::WheelSpeed::zone">
1680 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
1681 <Type name="Zone" nullable="nullable"/>
1684 <Interface name="EngineSpeed" id="::EngineSpeed">
1685 <webidl>[NoInterfaceObject]
1686 interface EngineSpeed : <ref>VehicleCommonDataType</ref> {
1687 readonly attribute unsigned long speed;
1689 <ExtendedAttributeList>
1690 <ExtendedAttribute name="NoInterfaceObject">
1691 <webidl>NoInterfaceObject</webidl>
1692 </ExtendedAttribute>
1693 </ExtendedAttributeList>
1694 <InterfaceInheritance>
1695 <Name name="VehicleCommonDataType"/>
1696 </InterfaceInheritance>
1697 <Attribute readonly="readonly" name="speed" id="::EngineSpeed::speed">
1698 <webidl> readonly attribute unsigned long speed;</webidl>
1699 <Type type="unsigned long"/>
1702 <Interface name="PowerTrainTorque" id="::PowerTrainTorque">
1703 <webidl>[NoInterfaceObject]
1704 interface PowerTrainTorque : <ref>VehicleCommonDataType</ref> {
1705 readonly attribute short value;
1707 <ExtendedAttributeList>
1708 <ExtendedAttribute name="NoInterfaceObject">
1709 <webidl>NoInterfaceObject</webidl>
1710 </ExtendedAttribute>
1711 </ExtendedAttributeList>
1712 <InterfaceInheritance>
1713 <Name name="VehicleCommonDataType"/>
1714 </InterfaceInheritance>
1715 <Attribute readonly="readonly" name="value" id="::PowerTrainTorque::value">
1716 <webidl> readonly attribute short value;</webidl>
1717 <Type type="short"/>
1720 <Interface name="AcceleratorPedalPosition" id="::AcceleratorPedalPosition">
1721 <webidl>[NoInterfaceObject]
1722 interface AcceleratorPedalPosition : <ref>VehicleCommonDataType</ref> {
1723 readonly attribute unsigned short value;
1725 <ExtendedAttributeList>
1726 <ExtendedAttribute name="NoInterfaceObject">
1727 <webidl>NoInterfaceObject</webidl>
1728 </ExtendedAttribute>
1729 </ExtendedAttributeList>
1730 <InterfaceInheritance>
1731 <Name name="VehicleCommonDataType"/>
1732 </InterfaceInheritance>
1733 <Attribute readonly="readonly" name="value" id="::AcceleratorPedalPosition::value">
1734 <webidl> readonly attribute unsigned short value;</webidl>
1735 <Type type="unsigned short"/>
1738 <Interface name="ThrottlePosition" id="::ThrottlePosition">
1739 <webidl>[NoInterfaceObject]
1740 interface ThrottlePosition : <ref>VehicleCommonDataType</ref> {
1741 readonly attribute unsigned short value;
1743 <ExtendedAttributeList>
1744 <ExtendedAttribute name="NoInterfaceObject">
1745 <webidl>NoInterfaceObject</webidl>
1746 </ExtendedAttribute>
1747 </ExtendedAttributeList>
1748 <InterfaceInheritance>
1749 <Name name="VehicleCommonDataType"/>
1750 </InterfaceInheritance>
1751 <Attribute readonly="readonly" name="value" id="::ThrottlePosition::value">
1752 <webidl> readonly attribute unsigned short value;</webidl>
1753 <Type type="unsigned short"/>
1756 <Interface name="Trip" id="::Trip">
1757 <webidl>[NoInterfaceObject]
1759 readonly attribute unsigned long distance;
1760 readonly attribute unsigned short? averageSpeed;
1761 readonly attribute unsigned short? fuelConsumption;
1763 <ExtendedAttributeList>
1764 <ExtendedAttribute name="NoInterfaceObject">
1765 <webidl>NoInterfaceObject</webidl>
1766 </ExtendedAttribute>
1767 </ExtendedAttributeList>
1768 <Attribute readonly="readonly" name="distance" id="::Trip::distance">
1769 <webidl> readonly attribute unsigned long distance;</webidl>
1770 <Type type="unsigned long"/>
1772 <Attribute readonly="readonly" name="averageSpeed" id="::Trip::averageSpeed">
1773 <webidl> readonly attribute unsigned short? averageSpeed;</webidl>
1774 <Type type="unsigned short" nullable="nullable"/>
1776 <Attribute readonly="readonly" name="fuelConsumption" id="::Trip::fuelConsumption">
1777 <webidl> readonly attribute unsigned short? fuelConsumption;</webidl>
1778 <Type type="unsigned short" nullable="nullable"/>
1781 <Interface name="TripMeters" id="::TripMeters">
1782 <webidl>[NoInterfaceObject]
1783 interface TripMeters : <ref>VehicleCommonDataType</ref> {
1784 readonly attribute <ref>Trip</ref>[] meters;
1786 <ExtendedAttributeList>
1787 <ExtendedAttribute name="NoInterfaceObject">
1788 <webidl>NoInterfaceObject</webidl>
1789 </ExtendedAttribute>
1790 </ExtendedAttributeList>
1791 <InterfaceInheritance>
1792 <Name name="VehicleCommonDataType"/>
1793 </InterfaceInheritance>
1794 <Attribute readonly="readonly" name="meters" id="::TripMeters::meters">
1795 <webidl> readonly attribute <ref>Trip</ref>[] meters;</webidl>
1801 <Interface name="Diagnostic" id="::Diagnostic">
1802 <webidl>[NoInterfaceObject]
1803 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
1804 readonly attribute unsigned long accumulatedEngineRuntime;
1805 readonly attribute unsigned long distanceWithMILOn;
1806 readonly attribute unsigned long distanceSinceCodeCleared;
1807 readonly attribute unsigned long timeRunMILOn;
1808 readonly attribute unsigned long timeTroubleCodeClear;
1810 <ExtendedAttributeList>
1811 <ExtendedAttribute name="NoInterfaceObject">
1812 <webidl>NoInterfaceObject</webidl>
1813 </ExtendedAttribute>
1814 </ExtendedAttributeList>
1815 <InterfaceInheritance>
1816 <Name name="VehicleCommonDataType"/>
1817 </InterfaceInheritance>
1818 <Attribute readonly="readonly" name="accumulatedEngineRuntime" id="::Diagnostic::accumulatedEngineRuntime">
1819 <webidl> readonly attribute unsigned long accumulatedEngineRuntime;</webidl>
1820 <Type type="unsigned long"/>
1822 <Attribute readonly="readonly" name="distanceWithMILOn" id="::Diagnostic::distanceWithMILOn">
1823 <webidl> readonly attribute unsigned long distanceWithMILOn;</webidl>
1824 <Type type="unsigned long"/>
1826 <Attribute readonly="readonly" name="distanceSinceCodeCleared" id="::Diagnostic::distanceSinceCodeCleared">
1827 <webidl> readonly attribute unsigned long distanceSinceCodeCleared;</webidl>
1828 <Type type="unsigned long"/>
1830 <Attribute readonly="readonly" name="timeRunMILOn" id="::Diagnostic::timeRunMILOn">
1831 <webidl> readonly attribute unsigned long timeRunMILOn;</webidl>
1832 <Type type="unsigned long"/>
1834 <Attribute readonly="readonly" name="timeTroubleCodeClear" id="::Diagnostic::timeTroubleCodeClear">
1835 <webidl> readonly attribute unsigned long timeTroubleCodeClear;</webidl>
1836 <Type type="unsigned long"/>
1839 <Enum name="TransmissionMode" id="::TransmissionMode">
1840 <webidl>enum TransmissionMode {"park", "reverse", "neutral", "low", "drive", "overdrive"};</webidl>
1841 <EnumValue stringvalue="park">
1842 <webidl>"park</webidl>
1844 <EnumValue stringvalue="reverse">
1845 <webidl> "reverse</webidl>
1847 <EnumValue stringvalue="neutral">
1848 <webidl> "neutral</webidl>
1850 <EnumValue stringvalue="low">
1851 <webidl> "low</webidl>
1853 <EnumValue stringvalue="drive">
1854 <webidl> "drive</webidl>
1856 <EnumValue stringvalue="overdrive">
1857 <webidl> "overdrive</webidl>
1860 <Interface name="Transmission" id="::Transmission">
1861 <webidl>[NoInterfaceObject]
1862 interface Transmission : <ref>VehicleCommonDataType</ref> {
1863 readonly attribute octet? gear;
1864 readonly attribute <ref>TransmissionMode</ref>? mode;
1866 <ExtendedAttributeList>
1867 <ExtendedAttribute name="NoInterfaceObject">
1868 <webidl>NoInterfaceObject</webidl>
1869 </ExtendedAttribute>
1870 </ExtendedAttributeList>
1871 <InterfaceInheritance>
1872 <Name name="VehicleCommonDataType"/>
1873 </InterfaceInheritance>
1874 <Attribute readonly="readonly" name="gear" id="::Transmission::gear">
1875 <webidl> readonly attribute octet? gear;</webidl>
1876 <Type type="octet" nullable="nullable"/>
1878 <Attribute readonly="readonly" name="mode" id="::Transmission::mode">
1879 <webidl> readonly attribute <ref>TransmissionMode</ref>? mode;</webidl>
1880 <Type name="TransmissionMode" nullable="nullable"/>
1883 <Interface name="CruiseControlStatus" id="::CruiseControlStatus">
1884 <webidl>[NoInterfaceObject]
1885 interface CruiseControlStatus : <ref>VehicleCommonDataType</ref> {
1886 readonly attribute boolean status;
1887 readonly attribute unsigned short speed;
1889 <ExtendedAttributeList>
1890 <ExtendedAttribute name="NoInterfaceObject">
1891 <webidl>NoInterfaceObject</webidl>
1892 </ExtendedAttribute>
1893 </ExtendedAttributeList>
1894 <InterfaceInheritance>
1895 <Name name="VehicleCommonDataType"/>
1896 </InterfaceInheritance>
1897 <Attribute readonly="readonly" name="status" id="::CruiseControlStatus::status">
1898 <webidl> readonly attribute boolean status;</webidl>
1899 <Type type="boolean"/>
1901 <Attribute readonly="readonly" name="speed" id="::CruiseControlStatus::speed">
1902 <webidl> readonly attribute unsigned short speed;</webidl>
1903 <Type type="unsigned short"/>
1906 <Interface name="LightStatus" id="::LightStatus">
1907 <webidl>[NoInterfaceObject]
1908 interface LightStatus : <ref>VehicleCommonDataType</ref> {
1909 attribute boolean head;
1910 attribute boolean rightTurn;
1911 attribute boolean leftTurn;
1912 attribute boolean brake;
1913 attribute boolean? fog;
1914 attribute boolean hazard;
1915 attribute boolean parking;
1916 attribute boolean highBeam;
1917 attribute boolean? automaticHeadlights;
1918 attribute boolean? dynamicHighBeam;
1919 attribute <ref>Zone</ref>? zone;
1921 <ExtendedAttributeList>
1922 <ExtendedAttribute name="NoInterfaceObject">
1923 <webidl>NoInterfaceObject</webidl>
1924 </ExtendedAttribute>
1925 </ExtendedAttributeList>
1926 <InterfaceInheritance>
1927 <Name name="VehicleCommonDataType"/>
1928 </InterfaceInheritance>
1929 <Attribute name="head" id="::LightStatus::head">
1930 <webidl> attribute boolean head;</webidl>
1931 <Type type="boolean"/>
1933 <Attribute name="rightTurn" id="::LightStatus::rightTurn">
1934 <webidl> attribute boolean rightTurn;</webidl>
1935 <Type type="boolean"/>
1937 <Attribute name="leftTurn" id="::LightStatus::leftTurn">
1938 <webidl> attribute boolean leftTurn;</webidl>
1939 <Type type="boolean"/>
1941 <Attribute name="brake" id="::LightStatus::brake">
1942 <webidl> attribute boolean brake;</webidl>
1943 <Type type="boolean"/>
1945 <Attribute name="fog" id="::LightStatus::fog">
1946 <webidl> attribute boolean? fog;</webidl>
1947 <Type type="boolean" nullable="nullable"/>
1949 <Attribute name="hazard" id="::LightStatus::hazard">
1950 <webidl> attribute boolean hazard;</webidl>
1951 <Type type="boolean"/>
1953 <Attribute name="parking" id="::LightStatus::parking">
1954 <webidl> attribute boolean parking;</webidl>
1955 <Type type="boolean"/>
1957 <Attribute name="highBeam" id="::LightStatus::highBeam">
1958 <webidl> attribute boolean highBeam;</webidl>
1959 <Type type="boolean"/>
1961 <Attribute name="automaticHeadlights" id="::LightStatus::automaticHeadlights">
1962 <webidl> attribute boolean? automaticHeadlights;</webidl>
1963 <Type type="boolean" nullable="nullable"/>
1965 <Attribute name="dynamicHighBeam" id="::LightStatus::dynamicHighBeam">
1966 <webidl> attribute boolean? dynamicHighBeam;</webidl>
1967 <Type type="boolean" nullable="nullable"/>
1969 <Attribute name="zone" id="::LightStatus::zone">
1970 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
1971 <Type name="Zone" nullable="nullable"/>
1974 <Interface name="InteriorLightStatus" id="::InteriorLightStatus">
1975 <webidl>[NoInterfaceObject]
1976 interface InteriorLightStatus : <ref>VehicleCommonDataType</ref> {
1977 attribute boolean status;
1978 attribute <ref>Zone</ref>? zone;
1980 <ExtendedAttributeList>
1981 <ExtendedAttribute name="NoInterfaceObject">
1982 <webidl>NoInterfaceObject</webidl>
1983 </ExtendedAttribute>
1984 </ExtendedAttributeList>
1985 <InterfaceInheritance>
1986 <Name name="VehicleCommonDataType"/>
1987 </InterfaceInheritance>
1988 <Attribute name="status" id="::InteriorLightStatus::status">
1989 <webidl> attribute boolean status;</webidl>
1990 <Type type="boolean"/>
1992 <Attribute name="zone" id="::InteriorLightStatus::zone">
1993 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
1994 <Type name="Zone" nullable="nullable"/>
1997 <Interface name="Horn" id="::Horn">
1998 <webidl>[NoInterfaceObject]
1999 interface Horn : <ref>VehicleCommonDataType</ref> {
2000 attribute boolean status;
2002 <ExtendedAttributeList>
2003 <ExtendedAttribute name="NoInterfaceObject">
2004 <webidl>NoInterfaceObject</webidl>
2005 </ExtendedAttribute>
2006 </ExtendedAttributeList>
2007 <InterfaceInheritance>
2008 <Name name="VehicleCommonDataType"/>
2009 </InterfaceInheritance>
2010 <Attribute name="status" id="::Horn::status">
2011 <webidl> attribute boolean status;</webidl>
2012 <Type type="boolean"/>
2015 <Interface name="Chime" id="::Chime">
2016 <webidl>[NoInterfaceObject]
2017 interface Chime : <ref>VehicleCommonDataType</ref> {
2018 readonly attribute boolean status;
2020 <ExtendedAttributeList>
2021 <ExtendedAttribute name="NoInterfaceObject">
2022 <webidl>NoInterfaceObject</webidl>
2023 </ExtendedAttribute>
2024 </ExtendedAttributeList>
2025 <InterfaceInheritance>
2026 <Name name="VehicleCommonDataType"/>
2027 </InterfaceInheritance>
2028 <Attribute readonly="readonly" name="status" id="::Chime::status">
2029 <webidl> readonly attribute boolean status;</webidl>
2030 <Type type="boolean"/>
2033 <Interface name="Fuel" id="::Fuel">
2034 <webidl>[NoInterfaceObject]
2035 interface Fuel : <ref>VehicleCommonDataType</ref> {
2036 readonly attribute unsigned short level;
2037 readonly attribute unsigned long range;
2038 readonly attribute unsigned long instantConsumption;
2039 readonly attribute unsigned long averageConsumption;
2040 readonly attribute unsigned long fuelConsumedSinceRestart;
2041 readonly attribute unsigned long vehicleTimeSinceRestart;
2043 <ExtendedAttributeList>
2044 <ExtendedAttribute name="NoInterfaceObject">
2045 <webidl>NoInterfaceObject</webidl>
2046 </ExtendedAttribute>
2047 </ExtendedAttributeList>
2048 <InterfaceInheritance>
2049 <Name name="VehicleCommonDataType"/>
2050 </InterfaceInheritance>
2051 <Attribute readonly="readonly" name="level" id="::Fuel::level">
2052 <webidl> readonly attribute unsigned short level;</webidl>
2053 <Type type="unsigned short"/>
2055 <Attribute readonly="readonly" name="range" id="::Fuel::range">
2056 <webidl> readonly attribute unsigned long range;</webidl>
2057 <Type type="unsigned long"/>
2059 <Attribute readonly="readonly" name="instantConsumption" id="::Fuel::instantConsumption">
2060 <webidl> readonly attribute unsigned long instantConsumption;</webidl>
2061 <Type type="unsigned long"/>
2063 <Attribute readonly="readonly" name="averageConsumption" id="::Fuel::averageConsumption">
2064 <webidl> readonly attribute unsigned long averageConsumption;</webidl>
2065 <Type type="unsigned long"/>
2067 <Attribute readonly="readonly" name="fuelConsumedSinceRestart" id="::Fuel::fuelConsumedSinceRestart">
2068 <webidl> readonly attribute unsigned long fuelConsumedSinceRestart;</webidl>
2069 <Type type="unsigned long"/>
2071 <Attribute readonly="readonly" name="vehicleTimeSinceRestart" id="::Fuel::vehicleTimeSinceRestart">
2072 <webidl> readonly attribute unsigned long vehicleTimeSinceRestart;</webidl>
2073 <Type type="unsigned long"/>
2076 <Interface name="EngineOil" id="::EngineOil">
2077 <webidl>[NoInterfaceObject]
2078 interface EngineOil : <ref>VehicleCommonDataType</ref> {
2079 readonly attribute unsigned short level;
2080 readonly attribute unsigned short lifeRemaining;
2081 readonly attribute long temperature;
2082 readonly attribute unsigned short pressure;
2083 readonly attribute boolean change;
2085 <ExtendedAttributeList>
2086 <ExtendedAttribute name="NoInterfaceObject">
2087 <webidl>NoInterfaceObject</webidl>
2088 </ExtendedAttribute>
2089 </ExtendedAttributeList>
2090 <InterfaceInheritance>
2091 <Name name="VehicleCommonDataType"/>
2092 </InterfaceInheritance>
2093 <Attribute readonly="readonly" name="level" id="::EngineOil::level">
2094 <webidl> readonly attribute unsigned short level;</webidl>
2095 <Type type="unsigned short"/>
2097 <Attribute readonly="readonly" name="lifeRemaining" id="::EngineOil::lifeRemaining">
2098 <webidl> readonly attribute unsigned short lifeRemaining;</webidl>
2099 <Type type="unsigned short"/>
2101 <Attribute readonly="readonly" name="temperature" id="::EngineOil::temperature">
2102 <webidl> readonly attribute long temperature;</webidl>
2105 <Attribute readonly="readonly" name="pressure" id="::EngineOil::pressure">
2106 <webidl> readonly attribute unsigned short pressure;</webidl>
2107 <Type type="unsigned short"/>
2109 <Attribute readonly="readonly" name="change" id="::EngineOil::change">
2110 <webidl> readonly attribute boolean change;</webidl>
2111 <Type type="boolean"/>
2114 <Interface name="Acceleration" id="::Acceleration">
2115 <webidl>[NoInterfaceObject]
2116 interface Acceleration : <ref>VehicleCommonDataType</ref> {
2117 readonly attribute unsigned long x;
2118 readonly attribute unsigned long y;
2119 readonly attribute unsigned long z;
2121 <ExtendedAttributeList>
2122 <ExtendedAttribute name="NoInterfaceObject">
2123 <webidl>NoInterfaceObject</webidl>
2124 </ExtendedAttribute>
2125 </ExtendedAttributeList>
2126 <InterfaceInheritance>
2127 <Name name="VehicleCommonDataType"/>
2128 </InterfaceInheritance>
2129 <Attribute readonly="readonly" name="x" id="::Acceleration::x">
2130 <webidl> readonly attribute unsigned long x;</webidl>
2131 <Type type="unsigned long"/>
2133 <Attribute readonly="readonly" name="y" id="::Acceleration::y">
2134 <webidl> readonly attribute unsigned long y;</webidl>
2135 <Type type="unsigned long"/>
2137 <Attribute readonly="readonly" name="z" id="::Acceleration::z">
2138 <webidl> readonly attribute unsigned long z;</webidl>
2139 <Type type="unsigned long"/>
2142 <Interface name="EngineCoolant" id="::EngineCoolant">
2143 <webidl>[NoInterfaceObject]
2144 interface EngineCoolant : <ref>VehicleCommonDataType</ref> {
2145 readonly attribute unsigned short level;
2146 readonly attribute unsigned short temperature;
2148 <ExtendedAttributeList>
2149 <ExtendedAttribute name="NoInterfaceObject">
2150 <webidl>NoInterfaceObject</webidl>
2151 </ExtendedAttribute>
2152 </ExtendedAttributeList>
2153 <InterfaceInheritance>
2154 <Name name="VehicleCommonDataType"/>
2155 </InterfaceInheritance>
2156 <Attribute readonly="readonly" name="level" id="::EngineCoolant::level">
2157 <webidl> readonly attribute unsigned short level;</webidl>
2158 <Type type="unsigned short"/>
2160 <Attribute readonly="readonly" name="temperature" id="::EngineCoolant::temperature">
2161 <webidl> readonly attribute unsigned short temperature;</webidl>
2162 <Type type="unsigned short"/>
2165 <Interface name="SteeringWheel" id="::SteeringWheel">
2166 <webidl>[NoInterfaceObject]
2167 interface SteeringWheel : <ref>VehicleCommonDataType</ref> {
2168 readonly attribute short angle;
2170 <ExtendedAttributeList>
2171 <ExtendedAttribute name="NoInterfaceObject">
2172 <webidl>NoInterfaceObject</webidl>
2173 </ExtendedAttribute>
2174 </ExtendedAttributeList>
2175 <InterfaceInheritance>
2176 <Name name="VehicleCommonDataType"/>
2177 </InterfaceInheritance>
2178 <Attribute readonly="readonly" name="angle" id="::SteeringWheel::angle">
2179 <webidl> readonly attribute short angle;</webidl>
2180 <Type type="short"/>
2183 <Interface name="IgnitionTime" id="::IgnitionTime">
2184 <webidl>[NoInterfaceObject]
2185 interface IgnitionTime : <ref>VehicleCommonDataType</ref> {
2186 readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;
2187 readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;
2189 <ExtendedAttributeList>
2190 <ExtendedAttribute name="NoInterfaceObject">
2191 <webidl>NoInterfaceObject</webidl>
2192 </ExtendedAttribute>
2193 </ExtendedAttributeList>
2194 <InterfaceInheritance>
2195 <Name name="VehicleCommonDataType"/>
2196 </InterfaceInheritance>
2197 <Attribute readonly="readonly" name="ignitionOnTime" id="::IgnitionTime::ignitionOnTime">
2198 <webidl> readonly attribute <ref>DOMTimeStamp</ref> ignitionOnTime;</webidl>
2199 <Type name="DOMTimeStamp"/>
2201 <Attribute readonly="readonly" name="ignitionOffTime" id="::IgnitionTime::ignitionOffTime">
2202 <webidl> readonly attribute <ref>DOMTimeStamp</ref> ignitionOffTime;</webidl>
2203 <Type name="DOMTimeStamp"/>
2206 <Interface name="YawRate" id="::YawRate">
2207 <webidl>[NoInterfaceObject]
2208 interface YawRate : <ref>VehicleCommonDataType</ref> {
2209 readonly attribute short value;
2211 <ExtendedAttributeList>
2212 <ExtendedAttribute name="NoInterfaceObject">
2213 <webidl>NoInterfaceObject</webidl>
2214 </ExtendedAttribute>
2215 </ExtendedAttributeList>
2216 <InterfaceInheritance>
2217 <Name name="VehicleCommonDataType"/>
2218 </InterfaceInheritance>
2219 <Attribute readonly="readonly" name="value" id="::YawRate::value">
2220 <webidl> readonly attribute short value;</webidl>
2221 <Type type="short"/>
2224 <Interface name="BrakeOperation" id="::BrakeOperation">
2225 <webidl>[NoInterfaceObject]
2226 interface BrakeOperation : <ref>VehicleCommonDataType</ref> {
2227 readonly attribute boolean brakePedalDepressed;
2229 <ExtendedAttributeList>
2230 <ExtendedAttribute name="NoInterfaceObject">
2231 <webidl>NoInterfaceObject</webidl>
2232 </ExtendedAttribute>
2233 </ExtendedAttributeList>
2234 <InterfaceInheritance>
2235 <Name name="VehicleCommonDataType"/>
2236 </InterfaceInheritance>
2237 <Attribute readonly="readonly" name="brakePedalDepressed" id="::BrakeOperation::brakePedalDepressed">
2238 <webidl> readonly attribute boolean brakePedalDepressed;</webidl>
2239 <Type type="boolean"/>
2242 <Interface name="WheelTick" id="::WheelTick">
2243 <webidl>[NoInterfaceObject]
2244 interface WheelTick : <ref>VehicleCommonDataType</ref> {
2245 readonly attribute unsigned long value;
2246 attribute <ref>Zone</ref>? zone;
2248 <ExtendedAttributeList>
2249 <ExtendedAttribute name="NoInterfaceObject">
2250 <webidl>NoInterfaceObject</webidl>
2251 </ExtendedAttribute>
2252 </ExtendedAttributeList>
2253 <InterfaceInheritance>
2254 <Name name="VehicleCommonDataType"/>
2255 </InterfaceInheritance>
2256 <Attribute readonly="readonly" name="value" id="::WheelTick::value">
2257 <webidl> readonly attribute unsigned long value;</webidl>
2258 <Type type="unsigned long"/>
2260 <Attribute name="zone" id="::WheelTick::zone">
2261 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2262 <Type name="Zone" nullable="nullable"/>
2265 <Enum name="VehicleButton" id="::VehicleButton">
2266 <webidl>enum VehicleButton {
2267 "home", "back", "search", "call", "end_call", "media_play",
2268 "media_next", "media_previous", "media_pause", "voice_recognize",
2269 "enter", "left", "right", "up", "down"
2271 <EnumValue stringvalue="home">
2272 <webidl> "home</webidl>
2274 <EnumValue stringvalue="back">
2275 <webidl> "back</webidl>
2277 <EnumValue stringvalue="search">
2278 <webidl> "search</webidl>
2280 <EnumValue stringvalue="call">
2281 <webidl> "call</webidl>
2283 <EnumValue stringvalue="end_call">
2284 <webidl> "end_call</webidl>
2286 <EnumValue stringvalue="media_play">
2287 <webidl> "media_play</webidl>
2289 <EnumValue stringvalue="media_next">
2290 <webidl> "media_next</webidl>
2292 <EnumValue stringvalue="media_previous">
2293 <webidl> "media_previous</webidl>
2295 <EnumValue stringvalue="media_pause">
2296 <webidl> "media_pause</webidl>
2298 <EnumValue stringvalue="voice_recognize">
2299 <webidl> "voice_recognize</webidl>
2301 <EnumValue stringvalue="enter">
2302 <webidl> "enter</webidl>
2304 <EnumValue stringvalue="left">
2305 <webidl> "left</webidl>
2307 <EnumValue stringvalue="right">
2308 <webidl> "right</webidl>
2310 <EnumValue stringvalue="up">
2311 <webidl> "up</webidl>
2313 <EnumValue stringvalue="down">
2314 <webidl> "down</webidl>
2317 <Enum name="PressType" id="::PressType">
2318 <webidl>enum PressType {"press", "long_press", "release"};</webidl>
2319 <EnumValue stringvalue="press">
2320 <webidl>"press</webidl>
2322 <EnumValue stringvalue="long_press">
2323 <webidl> "long_press</webidl>
2325 <EnumValue stringvalue="release">
2326 <webidl> "release</webidl>
2329 <Interface name="ButtonEvent" id="::ButtonEvent">
2330 <webidl>[NoInterfaceObject]
2331 interface ButtonEvent : <ref>VehicleCommonDataType</ref> {
2332 readonly attribute <ref>VehicleButton</ref>[] button;
2333 readonly attribute <ref>PressType</ref> state;
2335 <ExtendedAttributeList>
2336 <ExtendedAttribute name="NoInterfaceObject">
2337 <webidl>NoInterfaceObject</webidl>
2338 </ExtendedAttribute>
2339 </ExtendedAttributeList>
2340 <InterfaceInheritance>
2341 <Name name="VehicleCommonDataType"/>
2342 </InterfaceInheritance>
2343 <Attribute readonly="readonly" name="button" id="::ButtonEvent::button">
2344 <webidl> readonly attribute <ref>VehicleButton</ref>[] button;</webidl>
2346 <Type name="VehicleButton"/>
2349 <Attribute readonly="readonly" name="state" id="::ButtonEvent::state">
2350 <webidl> readonly attribute <ref>PressType</ref> state;</webidl>
2351 <Type name="PressType"/>
2354 <Interface name="DrivingMode" id="::DrivingMode">
2355 <webidl>[NoInterfaceObject]
2356 interface DrivingMode : <ref>VehicleCommonDataType</ref> {
2357 readonly attribute boolean mode;
2359 <ExtendedAttributeList>
2360 <ExtendedAttribute name="NoInterfaceObject">
2361 <webidl>NoInterfaceObject</webidl>
2362 </ExtendedAttribute>
2363 </ExtendedAttributeList>
2364 <InterfaceInheritance>
2365 <Name name="VehicleCommonDataType"/>
2366 </InterfaceInheritance>
2367 <Attribute readonly="readonly" name="mode" id="::DrivingMode::mode">
2368 <webidl> readonly attribute boolean mode;</webidl>
2369 <Type type="boolean"/>
2372 <Interface name="NightMode" id="::NightMode">
2373 <webidl>[NoInterfaceObject]
2374 interface NightMode : <ref>VehicleCommonDataType</ref> {
2375 readonly attribute boolean mode;
2377 <ExtendedAttributeList>
2378 <ExtendedAttribute name="NoInterfaceObject">
2379 <webidl>NoInterfaceObject</webidl>
2380 </ExtendedAttribute>
2381 </ExtendedAttributeList>
2382 <InterfaceInheritance>
2383 <Name name="VehicleCommonDataType"/>
2384 </InterfaceInheritance>
2385 <Attribute readonly="readonly" name="mode" id="::NightMode::mode">
2386 <webidl> readonly attribute boolean mode;</webidl>
2387 <Type type="boolean"/>
2390 <Interface name="Odometer" id="::Odometer">
2391 <webidl>[NoInterfaceObject]
2392 interface Odometer : <ref>VehicleCommonDataType</ref> {
2393 readonly attribute unsigned long? distanceSinceStart;
2394 readonly attribute unsigned long distanceTotal;
2396 <ExtendedAttributeList>
2397 <ExtendedAttribute name="NoInterfaceObject">
2398 <webidl>NoInterfaceObject</webidl>
2399 </ExtendedAttribute>
2400 </ExtendedAttributeList>
2401 <InterfaceInheritance>
2402 <Name name="VehicleCommonDataType"/>
2403 </InterfaceInheritance>
2404 <Attribute readonly="readonly" name="distanceSinceStart" id="::Odometer::distanceSinceStart">
2405 <webidl> readonly attribute unsigned long? distanceSinceStart;</webidl>
2406 <Type type="unsigned long" nullable="nullable"/>
2408 <Attribute readonly="readonly" name="distanceTotal" id="::Odometer::distanceTotal">
2409 <webidl> readonly attribute unsigned long distanceTotal;</webidl>
2410 <Type type="unsigned long"/>
2413 <Interface name="TransmissionOil" id="::TransmissionOil">
2414 <webidl>[NoInterfaceObject]
2415 interface TransmissionOil : <ref>VehicleCommonDataType</ref> {
2416 readonly attribute byte? wear;
2417 readonly attribute short? temperature;
2419 <ExtendedAttributeList>
2420 <ExtendedAttribute name="NoInterfaceObject">
2421 <webidl>NoInterfaceObject</webidl>
2422 </ExtendedAttribute>
2423 </ExtendedAttributeList>
2424 <InterfaceInheritance>
2425 <Name name="VehicleCommonDataType"/>
2426 </InterfaceInheritance>
2427 <Attribute readonly="readonly" name="wear" id="::TransmissionOil::wear">
2428 <webidl> readonly attribute byte? wear;</webidl>
2429 <Type type="byte" nullable="nullable"/>
2431 <Attribute readonly="readonly" name="temperature" id="::TransmissionOil::temperature">
2432 <webidl> readonly attribute short? temperature;</webidl>
2433 <Type type="short" nullable="nullable"/>
2436 <Interface name="TransmissionClutch" id="::TransmissionClutch">
2437 <webidl>[NoInterfaceObject]
2438 interface TransmissionClutch : <ref>VehicleCommonDataType</ref> {
2439 readonly attribute byte wear;
2441 <ExtendedAttributeList>
2442 <ExtendedAttribute name="NoInterfaceObject">
2443 <webidl>NoInterfaceObject</webidl>
2444 </ExtendedAttribute>
2445 </ExtendedAttributeList>
2446 <InterfaceInheritance>
2447 <Name name="VehicleCommonDataType"/>
2448 </InterfaceInheritance>
2449 <Attribute readonly="readonly" name="wear" id="::TransmissionClutch::wear">
2450 <webidl> readonly attribute byte wear;</webidl>
2454 <Interface name="BrakeMaintenance" id="::BrakeMaintenance">
2455 <webidl>[NoInterfaceObject]
2456 interface BrakeMaintenance : <ref>VehicleCommonDataType</ref> {
2457 readonly attribute unsigned short? fluidLevel;
2458 readonly attribute boolean? fluidLevelLow;
2459 readonly attribute byte? padWear;
2460 readonly attribute boolean? brakesWorn;
2461 attribute <ref>Zone</ref>? zone;
2463 <ExtendedAttributeList>
2464 <ExtendedAttribute name="NoInterfaceObject">
2465 <webidl>NoInterfaceObject</webidl>
2466 </ExtendedAttribute>
2467 </ExtendedAttributeList>
2468 <InterfaceInheritance>
2469 <Name name="VehicleCommonDataType"/>
2470 </InterfaceInheritance>
2471 <Attribute readonly="readonly" name="fluidLevel" id="::BrakeMaintenance::fluidLevel">
2472 <webidl> readonly attribute unsigned short? fluidLevel;</webidl>
2473 <Type type="unsigned short" nullable="nullable"/>
2475 <Attribute readonly="readonly" name="fluidLevelLow" id="::BrakeMaintenance::fluidLevelLow">
2476 <webidl> readonly attribute boolean? fluidLevelLow;</webidl>
2477 <Type type="boolean" nullable="nullable"/>
2479 <Attribute readonly="readonly" name="padWear" id="::BrakeMaintenance::padWear">
2480 <webidl> readonly attribute byte? padWear;</webidl>
2481 <Type type="byte" nullable="nullable"/>
2483 <Attribute readonly="readonly" name="brakesWorn" id="::BrakeMaintenance::brakesWorn">
2484 <webidl> readonly attribute boolean? brakesWorn;</webidl>
2485 <Type type="boolean" nullable="nullable"/>
2487 <Attribute name="zone" id="::BrakeMaintenance::zone">
2488 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2489 <Type name="Zone" nullable="nullable"/>
2492 <Interface name="WasherFluid" id="::WasherFluid">
2493 <webidl>[NoInterfaceObject]
2494 interface WasherFluid : <ref>VehicleCommonDataType</ref> {
2495 readonly attribute unsigned short? level;
2496 readonly attribute boolean? levelLow;
2498 <ExtendedAttributeList>
2499 <ExtendedAttribute name="NoInterfaceObject">
2500 <webidl>NoInterfaceObject</webidl>
2501 </ExtendedAttribute>
2502 </ExtendedAttributeList>
2503 <InterfaceInheritance>
2504 <Name name="VehicleCommonDataType"/>
2505 </InterfaceInheritance>
2506 <Attribute readonly="readonly" name="level" id="::WasherFluid::level">
2507 <webidl> readonly attribute unsigned short? level;</webidl>
2508 <Type type="unsigned short" nullable="nullable"/>
2510 <Attribute readonly="readonly" name="levelLow" id="::WasherFluid::levelLow">
2511 <webidl> readonly attribute boolean? levelLow;</webidl>
2512 <Type type="boolean" nullable="nullable"/>
2515 <Interface name="MalfunctionIndicator" id="::MalfunctionIndicator">
2516 <webidl>[NoInterfaceObject]
2517 interface MalfunctionIndicator : <ref>VehicleCommonDataType</ref> {
2518 readonly attribute boolean on;
2520 <ExtendedAttributeList>
2521 <ExtendedAttribute name="NoInterfaceObject">
2522 <webidl>NoInterfaceObject</webidl>
2523 </ExtendedAttribute>
2524 </ExtendedAttributeList>
2525 <InterfaceInheritance>
2526 <Name name="VehicleCommonDataType"/>
2527 </InterfaceInheritance>
2528 <Attribute readonly="readonly" name="on" id="::MalfunctionIndicator::on">
2529 <webidl> readonly attribute boolean on;</webidl>
2530 <Type type="boolean"/>
2533 <Interface name="BatteryStatus" id="::BatteryStatus">
2534 <webidl>[NoInterfaceObject]
2535 interface BatteryStatus : <ref>VehicleCommonDataType</ref> {
2536 readonly attribute unsigned short? chargeLevel;
2537 readonly attribute unsigned short? voltage;
2538 readonly attribute unsigned short? current;
2539 attribute <ref>Zone</ref>? zone;
2541 <ExtendedAttributeList>
2542 <ExtendedAttribute name="NoInterfaceObject">
2543 <webidl>NoInterfaceObject</webidl>
2544 </ExtendedAttribute>
2545 </ExtendedAttributeList>
2546 <InterfaceInheritance>
2547 <Name name="VehicleCommonDataType"/>
2548 </InterfaceInheritance>
2549 <Attribute readonly="readonly" name="chargeLevel" id="::BatteryStatus::chargeLevel">
2550 <webidl> readonly attribute unsigned short? chargeLevel;</webidl>
2551 <Type type="unsigned short" nullable="nullable"/>
2553 <Attribute readonly="readonly" name="voltage" id="::BatteryStatus::voltage">
2554 <webidl> readonly attribute unsigned short? voltage;</webidl>
2555 <Type type="unsigned short" nullable="nullable"/>
2557 <Attribute readonly="readonly" name="current" id="::BatteryStatus::current">
2558 <webidl> readonly attribute unsigned short? current;</webidl>
2559 <Type type="unsigned short" nullable="nullable"/>
2561 <Attribute name="zone" id="::BatteryStatus::zone">
2562 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2563 <Type name="Zone" nullable="nullable"/>
2566 <Interface name="Tire" id="::Tire">
2567 <webidl>[NoInterfaceObject]
2568 interface Tire : <ref>VehicleCommonDataType</ref> {
2569 readonly attribute boolean? pressureLow;
2570 readonly attribute unsigned short? pressure;
2571 readonly attribute short? temperature;
2572 attribute <ref>Zone</ref>? zone;
2574 <ExtendedAttributeList>
2575 <ExtendedAttribute name="NoInterfaceObject">
2576 <webidl>NoInterfaceObject</webidl>
2577 </ExtendedAttribute>
2578 </ExtendedAttributeList>
2579 <InterfaceInheritance>
2580 <Name name="VehicleCommonDataType"/>
2581 </InterfaceInheritance>
2582 <Attribute readonly="readonly" name="pressureLow" id="::Tire::pressureLow">
2583 <webidl> readonly attribute boolean? pressureLow;</webidl>
2584 <Type type="boolean" nullable="nullable"/>
2586 <Attribute readonly="readonly" name="pressure" id="::Tire::pressure">
2587 <webidl> readonly attribute unsigned short? pressure;</webidl>
2588 <Type type="unsigned short" nullable="nullable"/>
2590 <Attribute readonly="readonly" name="temperature" id="::Tire::temperature">
2591 <webidl> readonly attribute short? temperature;</webidl>
2592 <Type type="short" nullable="nullable"/>
2594 <Attribute name="zone" id="::Tire::zone">
2595 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2596 <Type name="Zone" nullable="nullable"/>
2599 <Interface name="Diagnostic" id="::Diagnostic">
2600 <webidl>[NoInterfaceObject]
2601 interface Diagnostic : <ref>VehicleCommonDataType</ref> {
2602 readonly attribute unsigned long accumulatedEngineRuntime;
2603 readonly attribute unsigned long distanceWithMILOn;
2604 readonly attribute unsigned long distanceSinceCodeCleared;
2605 readonly attribute unsigned long timeRunMILOn;
2606 readonly attribute unsigned long timeTroubleCodeClear;
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="accumulatedEngineRuntime" id="::Diagnostic::accumulatedEngineRuntime">
2617 <webidl> readonly attribute unsigned long accumulatedEngineRuntime;</webidl>
2618 <Type type="unsigned long"/>
2620 <Attribute readonly="readonly" name="distanceWithMILOn" id="::Diagnostic::distanceWithMILOn">
2621 <webidl> readonly attribute unsigned long distanceWithMILOn;</webidl>
2622 <Type type="unsigned long"/>
2624 <Attribute readonly="readonly" name="distanceSinceCodeCleared" id="::Diagnostic::distanceSinceCodeCleared">
2625 <webidl> readonly attribute unsigned long distanceSinceCodeCleared;</webidl>
2626 <Type type="unsigned long"/>
2628 <Attribute readonly="readonly" name="timeRunMILOn" id="::Diagnostic::timeRunMILOn">
2629 <webidl> readonly attribute unsigned long timeRunMILOn;</webidl>
2630 <Type type="unsigned long"/>
2632 <Attribute readonly="readonly" name="timeTroubleCodeClear" id="::Diagnostic::timeTroubleCodeClear">
2633 <webidl> readonly attribute unsigned long timeTroubleCodeClear;</webidl>
2634 <Type type="unsigned long"/>
2637 <Interface name="LanguageConfiguration" id="::LanguageConfiguration">
2638 <webidl>[NoInterfaceObject]
2639 interface LanguageConfiguration : <ref>VehicleCommonDataType</ref> {
2640 attribute DOMString? language;
2642 <ExtendedAttributeList>
2643 <ExtendedAttribute name="NoInterfaceObject">
2644 <webidl>NoInterfaceObject</webidl>
2645 </ExtendedAttribute>
2646 </ExtendedAttributeList>
2647 <InterfaceInheritance>
2648 <Name name="VehicleCommonDataType"/>
2649 </InterfaceInheritance>
2650 <Attribute name="language" id="::LanguageConfiguration::language">
2651 <webidl> attribute DOMString? language;</webidl>
2652 <Type type="DOMString" nullable="nullable"/>
2655 <Interface name="UnitsOfMeasure" id="::UnitsOfMeasure">
2656 <webidl>[NoInterfaceObject]
2657 interface UnitsOfMeasure : <ref>VehicleCommonDataType</ref> {
2658 attribute boolean? isMKSSystem;
2659 attribute DOMString? unitsFuelVolume;
2660 attribute DOMString? unitsDistance;
2661 attribute DOMString? unitsSpeed;
2662 attribute DOMString? unitsFuelConsumption;
2664 <ExtendedAttributeList>
2665 <ExtendedAttribute name="NoInterfaceObject">
2666 <webidl>NoInterfaceObject</webidl>
2667 </ExtendedAttribute>
2668 </ExtendedAttributeList>
2669 <InterfaceInheritance>
2670 <Name name="VehicleCommonDataType"/>
2671 </InterfaceInheritance>
2672 <Attribute name="isMKSSystem" id="::UnitsOfMeasure::isMKSSystem">
2673 <webidl> attribute boolean? isMKSSystem;</webidl>
2674 <Type type="boolean" nullable="nullable"/>
2676 <Attribute name="unitsFuelVolume" id="::UnitsOfMeasure::unitsFuelVolume">
2677 <webidl> attribute DOMString? unitsFuelVolume;</webidl>
2678 <Type type="DOMString" nullable="nullable"/>
2680 <Attribute name="unitsDistance" id="::UnitsOfMeasure::unitsDistance">
2681 <webidl> attribute DOMString? unitsDistance;</webidl>
2682 <Type type="DOMString" nullable="nullable"/>
2684 <Attribute name="unitsSpeed" id="::UnitsOfMeasure::unitsSpeed">
2685 <webidl> attribute DOMString? unitsSpeed;</webidl>
2686 <Type type="DOMString" nullable="nullable"/>
2688 <Attribute name="unitsFuelConsumption" id="::UnitsOfMeasure::unitsFuelConsumption">
2689 <webidl> attribute DOMString? unitsFuelConsumption;</webidl>
2690 <Type type="DOMString" nullable="nullable"/>
2693 <Interface name="Mirror" id="::Mirror">
2694 <webidl>[NoInterfaceObject]
2695 interface Mirror : <ref>VehicleCommonDataType</ref> {
2696 attribute unsigned short? mirrorTilt;
2697 attribute unsigned short? mirrorPan;
2698 attribute <ref>Zone</ref>? zone;
2700 <ExtendedAttributeList>
2701 <ExtendedAttribute name="NoInterfaceObject">
2702 <webidl>NoInterfaceObject</webidl>
2703 </ExtendedAttribute>
2704 </ExtendedAttributeList>
2705 <InterfaceInheritance>
2706 <Name name="VehicleCommonDataType"/>
2707 </InterfaceInheritance>
2708 <Attribute name="mirrorTilt" id="::Mirror::mirrorTilt">
2709 <webidl> attribute unsigned short? mirrorTilt;</webidl>
2710 <Type type="unsigned short" nullable="nullable"/>
2712 <Attribute name="mirrorPan" id="::Mirror::mirrorPan">
2713 <webidl> attribute unsigned short? mirrorPan;</webidl>
2714 <Type type="unsigned short" nullable="nullable"/>
2716 <Attribute name="zone" id="::Mirror::zone">
2717 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2718 <Type name="Zone" nullable="nullable"/>
2721 <Interface name="SeatAdjustment" id="::SeatAdjustment">
2722 <webidl>[NoInterfaceObject]
2723 interface SeatAdjustment : <ref>VehicleCommonDataType</ref> {
2724 attribute unsigned short? reclineSeatBack;
2725 attribute unsigned short? seatSlide;
2726 attribute unsigned short? seatCushionHeight;
2727 attribute unsigned short? seatHeadrest;
2728 attribute unsigned short? seatBackCushion;
2729 attribute unsigned short? seatSideCushion;
2730 attribute <ref>Zone</ref>? zone;
2732 <ExtendedAttributeList>
2733 <ExtendedAttribute name="NoInterfaceObject">
2734 <webidl>NoInterfaceObject</webidl>
2735 </ExtendedAttribute>
2736 </ExtendedAttributeList>
2737 <InterfaceInheritance>
2738 <Name name="VehicleCommonDataType"/>
2739 </InterfaceInheritance>
2740 <Attribute name="reclineSeatBack" id="::SeatAdjustment::reclineSeatBack">
2741 <webidl> attribute unsigned short? reclineSeatBack;</webidl>
2742 <Type type="unsigned short" nullable="nullable"/>
2744 <Attribute name="seatSlide" id="::SeatAdjustment::seatSlide">
2745 <webidl> attribute unsigned short? seatSlide;</webidl>
2746 <Type type="unsigned short" nullable="nullable"/>
2748 <Attribute name="seatCushionHeight" id="::SeatAdjustment::seatCushionHeight">
2749 <webidl> attribute unsigned short? seatCushionHeight;</webidl>
2750 <Type type="unsigned short" nullable="nullable"/>
2752 <Attribute name="seatHeadrest" id="::SeatAdjustment::seatHeadrest">
2753 <webidl> attribute unsigned short? seatHeadrest;</webidl>
2754 <Type type="unsigned short" nullable="nullable"/>
2756 <Attribute name="seatBackCushion" id="::SeatAdjustment::seatBackCushion">
2757 <webidl> attribute unsigned short? seatBackCushion;</webidl>
2758 <Type type="unsigned short" nullable="nullable"/>
2760 <Attribute name="seatSideCushion" id="::SeatAdjustment::seatSideCushion">
2761 <webidl> attribute unsigned short? seatSideCushion;</webidl>
2762 <Type type="unsigned short" nullable="nullable"/>
2764 <Attribute name="zone" id="::SeatAdjustment::zone">
2765 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2766 <Type name="Zone" nullable="nullable"/>
2769 <Enum name="DriveModeEnum" id="::DriveModeEnum">
2770 <webidl>enum DriveModeEnum {"comfort", "auto", "sport", "eco", "manual", "winter"};</webidl>
2771 <EnumValue stringvalue="comfort">
2772 <webidl>"comfort</webidl>
2774 <EnumValue stringvalue="auto">
2775 <webidl> "auto</webidl>
2777 <EnumValue stringvalue="sport">
2778 <webidl> "sport</webidl>
2780 <EnumValue stringvalue="eco">
2781 <webidl> "eco</webidl>
2783 <EnumValue stringvalue="manual">
2784 <webidl> "manual</webidl>
2786 <EnumValue stringvalue="winter">
2787 <webidl> "winter</webidl>
2790 <Interface name="DriveMode" id="::DriveMode">
2791 <webidl>[NoInterfaceObject]
2792 interface DriveMode : <ref>VehicleCommonDataType</ref> {
2793 attribute <ref>DriveModeEnum</ref>? driveMode;
2795 <ExtendedAttributeList>
2796 <ExtendedAttribute name="NoInterfaceObject">
2797 <webidl>NoInterfaceObject</webidl>
2798 </ExtendedAttribute>
2799 </ExtendedAttributeList>
2800 <InterfaceInheritance>
2801 <Name name="VehicleCommonDataType"/>
2802 </InterfaceInheritance>
2803 <Attribute name="driveMode" id="::DriveMode::driveMode">
2804 <webidl> attribute <ref>DriveModeEnum</ref>? driveMode;</webidl>
2805 <Type name="DriveModeEnum" nullable="nullable"/>
2808 <Interface name="DashboardIllumination" id="::DashboardIllumination">
2809 <webidl>[NoInterfaceObject]
2810 interface DashboardIllumination : <ref>VehicleCommonDataType</ref> {
2811 attribute DOMString? dashboardIllumination;
2813 <ExtendedAttributeList>
2814 <ExtendedAttribute name="NoInterfaceObject">
2815 <webidl>NoInterfaceObject</webidl>
2816 </ExtendedAttribute>
2817 </ExtendedAttributeList>
2818 <InterfaceInheritance>
2819 <Name name="VehicleCommonDataType"/>
2820 </InterfaceInheritance>
2821 <Attribute name="dashboardIllumination" id="::DashboardIllumination::dashboardIllumination">
2822 <webidl> attribute DOMString? dashboardIllumination;</webidl>
2823 <Type type="DOMString" nullable="nullable"/>
2826 <Interface name="VehicleSound" id="::VehicleSound">
2827 <webidl>[NoInterfaceObject]
2828 interface VehicleSound : <ref>VehicleCommonDataType</ref> {
2829 attribute boolean activeNoiseControlMode;
2830 attribute DOMString? engineSoundEnhancementMode;
2832 <ExtendedAttributeList>
2833 <ExtendedAttribute name="NoInterfaceObject">
2834 <webidl>NoInterfaceObject</webidl>
2835 </ExtendedAttribute>
2836 </ExtendedAttributeList>
2837 <InterfaceInheritance>
2838 <Name name="VehicleCommonDataType"/>
2839 </InterfaceInheritance>
2840 <Attribute name="activeNoiseControlMode" id="::VehicleSound::activeNoiseControlMode">
2841 <webidl> attribute boolean activeNoiseControlMode;</webidl>
2842 <Type type="boolean"/>
2844 <Attribute name="engineSoundEnhancementMode" id="::VehicleSound::engineSoundEnhancementMode">
2845 <webidl> attribute DOMString? engineSoundEnhancementMode;</webidl>
2846 <Type type="DOMString" nullable="nullable"/>
2849 <Interface name="AntilockBrakingSystem" id="::AntilockBrakingSystem">
2850 <webidl>[NoInterfaceObject]
2851 interface AntilockBrakingSystem : <ref>VehicleCommonDataType</ref> {
2852 readonly attribute boolean enabled;
2853 readonly attribute boolean engaged;
2855 <ExtendedAttributeList>
2856 <ExtendedAttribute name="NoInterfaceObject">
2857 <webidl>NoInterfaceObject</webidl>
2858 </ExtendedAttribute>
2859 </ExtendedAttributeList>
2860 <InterfaceInheritance>
2861 <Name name="VehicleCommonDataType"/>
2862 </InterfaceInheritance>
2863 <Attribute readonly="readonly" name="enabled" id="::AntilockBrakingSystem::enabled">
2864 <webidl> readonly attribute boolean enabled;</webidl>
2865 <Type type="boolean"/>
2867 <Attribute readonly="readonly" name="engaged" id="::AntilockBrakingSystem::engaged">
2868 <webidl> readonly attribute boolean engaged;</webidl>
2869 <Type type="boolean"/>
2872 <Interface name="TractionControlSystem" id="::TractionControlSystem">
2873 <webidl>[NoInterfaceObject]
2874 interface TractionControlSystem : <ref>VehicleCommonDataType</ref> {
2875 readonly attribute boolean enabled;
2876 readonly attribute boolean engaged;
2878 <ExtendedAttributeList>
2879 <ExtendedAttribute name="NoInterfaceObject">
2880 <webidl>NoInterfaceObject</webidl>
2881 </ExtendedAttribute>
2882 </ExtendedAttributeList>
2883 <InterfaceInheritance>
2884 <Name name="VehicleCommonDataType"/>
2885 </InterfaceInheritance>
2886 <Attribute readonly="readonly" name="enabled" id="::TractionControlSystem::enabled">
2887 <webidl> readonly attribute boolean enabled;</webidl>
2888 <Type type="boolean"/>
2890 <Attribute readonly="readonly" name="engaged" id="::TractionControlSystem::engaged">
2891 <webidl> readonly attribute boolean engaged;</webidl>
2892 <Type type="boolean"/>
2895 <Interface name="ElectronicStabilityControl" id="::ElectronicStabilityControl">
2896 <webidl>[NoInterfaceObject]
2897 interface ElectronicStabilityControl : <ref>VehicleCommonDataType</ref> {
2898 readonly attribute boolean enabled;
2899 readonly attribute boolean engaged;
2901 <ExtendedAttributeList>
2902 <ExtendedAttribute name="NoInterfaceObject">
2903 <webidl>NoInterfaceObject</webidl>
2904 </ExtendedAttribute>
2905 </ExtendedAttributeList>
2906 <InterfaceInheritance>
2907 <Name name="VehicleCommonDataType"/>
2908 </InterfaceInheritance>
2909 <Attribute readonly="readonly" name="enabled" id="::ElectronicStabilityControl::enabled">
2910 <webidl> readonly attribute boolean enabled;</webidl>
2911 <Type type="boolean"/>
2913 <Attribute readonly="readonly" name="engaged" id="::ElectronicStabilityControl::engaged">
2914 <webidl> readonly attribute boolean engaged;</webidl>
2915 <Type type="boolean"/>
2918 <Interface name="TopSpeedLimit" id="::TopSpeedLimit">
2919 <webidl>[NoInterfaceObject]
2920 interface TopSpeedLimit : <ref>VehicleCommonDataType</ref> {
2921 readonly attribute unsigned short speed;
2923 <ExtendedAttributeList>
2924 <ExtendedAttribute name="NoInterfaceObject">
2925 <webidl>NoInterfaceObject</webidl>
2926 </ExtendedAttribute>
2927 </ExtendedAttributeList>
2928 <InterfaceInheritance>
2929 <Name name="VehicleCommonDataType"/>
2930 </InterfaceInheritance>
2931 <Attribute readonly="readonly" name="speed" id="::TopSpeedLimit::speed">
2932 <webidl> readonly attribute unsigned short speed;</webidl>
2933 <Type type="unsigned short"/>
2936 <Interface name="AirbagStatus" id="::AirbagStatus">
2937 <webidl>[NoInterfaceObject]
2938 interface AirbagStatus : <ref>VehicleCommonDataType</ref> {
2939 readonly attribute boolean activated;
2940 readonly attribute boolean deployed;
2941 attribute <ref>Zone</ref>? zone;
2943 <ExtendedAttributeList>
2944 <ExtendedAttribute name="NoInterfaceObject">
2945 <webidl>NoInterfaceObject</webidl>
2946 </ExtendedAttribute>
2947 </ExtendedAttributeList>
2948 <InterfaceInheritance>
2949 <Name name="VehicleCommonDataType"/>
2950 </InterfaceInheritance>
2951 <Attribute readonly="readonly" name="activated" id="::AirbagStatus::activated">
2952 <webidl> readonly attribute boolean activated;</webidl>
2953 <Type type="boolean"/>
2955 <Attribute readonly="readonly" name="deployed" id="::AirbagStatus::deployed">
2956 <webidl> readonly attribute boolean deployed;</webidl>
2957 <Type type="boolean"/>
2959 <Attribute name="zone" id="::AirbagStatus::zone">
2960 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
2961 <Type name="Zone" nullable="nullable"/>
2964 <Enum name="DoorOpenStatus" id="::DoorOpenStatus">
2965 <webidl>enum DoorOpenStatus {"open", "ajar", "closed"};</webidl>
2966 <EnumValue stringvalue="open">
2967 <webidl>"open</webidl>
2969 <EnumValue stringvalue="ajar">
2970 <webidl> "ajar</webidl>
2972 <EnumValue stringvalue="closed">
2973 <webidl> "closed</webidl>
2976 <Interface name="Door" id="::Door">
2977 <webidl>[NoInterfaceObject]
2978 interface Door : <ref>VehicleCommonDataType</ref> {
2979 readonly attribute <ref>DoorOpenStatus</ref> status;
2980 attribute boolean lock;
2981 attribute <ref>Zone</ref>? zone;
2983 <ExtendedAttributeList>
2984 <ExtendedAttribute name="NoInterfaceObject">
2985 <webidl>NoInterfaceObject</webidl>
2986 </ExtendedAttribute>
2987 </ExtendedAttributeList>
2988 <InterfaceInheritance>
2989 <Name name="VehicleCommonDataType"/>
2990 </InterfaceInheritance>
2991 <Attribute readonly="readonly" name="status" id="::Door::status">
2992 <webidl> readonly attribute <ref>DoorOpenStatus</ref> status;</webidl>
2993 <Type name="DoorOpenStatus"/>
2995 <Attribute name="lock" id="::Door::lock">
2996 <webidl> attribute boolean lock;</webidl>
2997 <Type type="boolean"/>
2999 <Attribute name="zone" id="::Door::zone">
3000 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3001 <Type name="Zone" nullable="nullable"/>
3004 <Interface name="ChildSafetyLock" id="::ChildSafetyLock">
3005 <webidl>[NoInterfaceObject]
3006 interface ChildSafetyLock : <ref>VehicleCommonDataType</ref> {
3007 attribute boolean lock;
3008 attribute <ref>Zone</ref>? zone;
3010 <ExtendedAttributeList>
3011 <ExtendedAttribute name="NoInterfaceObject">
3012 <webidl>NoInterfaceObject</webidl>
3013 </ExtendedAttribute>
3014 </ExtendedAttributeList>
3015 <InterfaceInheritance>
3016 <Name name="VehicleCommonDataType"/>
3017 </InterfaceInheritance>
3018 <Attribute name="lock" id="::ChildSafetyLock::lock">
3019 <webidl> attribute boolean lock;</webidl>
3020 <Type type="boolean"/>
3022 <Attribute name="zone" id="::ChildSafetyLock::zone">
3023 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3024 <Type name="Zone" nullable="nullable"/>
3027 <Enum name="OccupantStatus" id="::OccupantStatus">
3028 <webidl>enum OccupantStatus {"adult", "child", "vacant"};</webidl>
3029 <EnumValue stringvalue="adult">
3030 <webidl>"adult</webidl>
3032 <EnumValue stringvalue="child">
3033 <webidl> "child</webidl>
3035 <EnumValue stringvalue="vacant">
3036 <webidl> "vacant</webidl>
3039 <Enum name="IdentificationType" id="::IdentificationType">
3040 <webidl>enum IdentificationType {"pin", "keyfob", "Bluetooth", "NFC", "fingerprint", "camera", "voice"};</webidl>
3041 <EnumValue stringvalue="pin">
3042 <webidl>"pin</webidl>
3044 <EnumValue stringvalue="keyfob">
3045 <webidl> "keyfob</webidl>
3047 <EnumValue stringvalue="Bluetooth">
3048 <webidl> "Bluetooth</webidl>
3050 <EnumValue stringvalue="NFC">
3051 <webidl> "NFC</webidl>
3053 <EnumValue stringvalue="fingerprint">
3054 <webidl> "fingerprint</webidl>
3056 <EnumValue stringvalue="camera">
3057 <webidl> "camera</webidl>
3059 <EnumValue stringvalue="voice">
3060 <webidl> "voice</webidl>
3063 <Interface name="Seat" id="::Seat">
3064 <webidl>[NoInterfaceObject]
3065 interface Seat : <ref>VehicleCommonDataType</ref> {
3066 readonly attribute <ref>OccupantStatus</ref> occupant;
3067 readonly attribute boolean seatbelt;
3068 readonly attribute DOMString? occupantName;
3069 readonly attribute <ref>IdentificationType</ref> identificationType;
3070 attribute <ref>Zone</ref>? zone;
3072 <ExtendedAttributeList>
3073 <ExtendedAttribute name="NoInterfaceObject">
3074 <webidl>NoInterfaceObject</webidl>
3075 </ExtendedAttribute>
3076 </ExtendedAttributeList>
3077 <InterfaceInheritance>
3078 <Name name="VehicleCommonDataType"/>
3079 </InterfaceInheritance>
3080 <Attribute readonly="readonly" name="occupant" id="::Seat::occupant">
3081 <webidl> readonly attribute <ref>OccupantStatus</ref> occupant;</webidl>
3082 <Type name="OccupantStatus"/>
3084 <Attribute readonly="readonly" name="seatbelt" id="::Seat::seatbelt">
3085 <webidl> readonly attribute boolean seatbelt;</webidl>
3086 <Type type="boolean"/>
3088 <Attribute readonly="readonly" name="occupantName" id="::Seat::occupantName">
3089 <webidl> readonly attribute DOMString? occupantName;</webidl>
3090 <Type type="DOMString" nullable="nullable"/>
3092 <Attribute readonly="readonly" name="identificationType" id="::Seat::identificationType">
3093 <webidl> readonly attribute <ref>IdentificationType</ref> identificationType;</webidl>
3094 <Type name="IdentificationType"/>
3096 <Attribute name="zone" id="::Seat::zone">
3097 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3098 <Type name="Zone" nullable="nullable"/>
3101 <Interface name="Temperature" id="::Temperature">
3102 <webidl>[NoInterfaceObject]
3103 interface Temperature : <ref>VehicleCommonDataType</ref> {
3104 readonly attribute float interiorTemperature;
3105 readonly attribute float exteriorTemperature;
3107 <ExtendedAttributeList>
3108 <ExtendedAttribute name="NoInterfaceObject">
3109 <webidl>NoInterfaceObject</webidl>
3110 </ExtendedAttribute>
3111 </ExtendedAttributeList>
3112 <InterfaceInheritance>
3113 <Name name="VehicleCommonDataType"/>
3114 </InterfaceInheritance>
3115 <Attribute readonly="readonly" name="interiorTemperature" id="::Temperature::interiorTemperature">
3116 <webidl> readonly attribute float interiorTemperature;</webidl>
3117 <Type type="float"/>
3119 <Attribute readonly="readonly" name="exteriorTemperature" id="::Temperature::exteriorTemperature">
3120 <webidl> readonly attribute float exteriorTemperature;</webidl>
3121 <Type type="float"/>
3124 <Interface name="RainSensor" id="::RainSensor">
3125 <webidl>[NoInterfaceObject]
3126 interface RainSensor : <ref>VehicleCommonDataType</ref> {
3127 readonly attribute unsigned short rain;
3128 attribute <ref>Zone</ref>? zone;
3130 <ExtendedAttributeList>
3131 <ExtendedAttribute name="NoInterfaceObject">
3132 <webidl>NoInterfaceObject</webidl>
3133 </ExtendedAttribute>
3134 </ExtendedAttributeList>
3135 <InterfaceInheritance>
3136 <Name name="VehicleCommonDataType"/>
3137 </InterfaceInheritance>
3138 <Attribute readonly="readonly" name="rain" id="::RainSensor::rain">
3139 <webidl> readonly attribute unsigned short rain;</webidl>
3140 <Type type="unsigned short"/>
3142 <Attribute name="zone" id="::RainSensor::zone">
3143 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3144 <Type name="Zone" nullable="nullable"/>
3147 <Interface name="WiperStatus" id="::WiperStatus">
3148 <webidl>[NoInterfaceObject]
3149 interface WiperStatus : <ref>VehicleCommonDataType</ref> {
3150 readonly attribute unsigned short wiperSpeed;
3151 attribute <ref>Zone</ref>? zone;
3153 <ExtendedAttributeList>
3154 <ExtendedAttribute name="NoInterfaceObject">
3155 <webidl>NoInterfaceObject</webidl>
3156 </ExtendedAttribute>
3157 </ExtendedAttributeList>
3158 <InterfaceInheritance>
3159 <Name name="VehicleCommonDataType"/>
3160 </InterfaceInheritance>
3161 <Attribute readonly="readonly" name="wiperSpeed" id="::WiperStatus::wiperSpeed">
3162 <webidl> readonly attribute unsigned short wiperSpeed;</webidl>
3163 <Type type="unsigned short"/>
3165 <Attribute name="zone" id="::WiperStatus::zone">
3166 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3167 <Type name="Zone" nullable="nullable"/>
3170 <Enum name="WiperControl" id="::WiperControl">
3171 <webidl>enum WiperControl {"off", "once", "slowest", "slow", "middle", "fast", "fastest", "auto"};</webidl>
3172 <EnumValue stringvalue="off">
3173 <webidl>"off</webidl>
3175 <EnumValue stringvalue="once">
3176 <webidl> "once</webidl>
3178 <EnumValue stringvalue="slowest">
3179 <webidl> "slowest</webidl>
3181 <EnumValue stringvalue="slow">
3182 <webidl> "slow</webidl>
3184 <EnumValue stringvalue="middle">
3185 <webidl> "middle</webidl>
3187 <EnumValue stringvalue="fast">
3188 <webidl> "fast</webidl>
3190 <EnumValue stringvalue="fastest">
3191 <webidl> "fastest</webidl>
3193 <EnumValue stringvalue="auto">
3194 <webidl> "auto</webidl>
3197 <Interface name="WiperSetting" id="::WiperSetting">
3198 <webidl>[NoInterfaceObject]
3199 interface WiperSetting : <ref>VehicleCommonDataType</ref> {
3200 attribute <ref>WiperControl</ref> wiperControl;
3201 attribute <ref>Zone</ref>? zone;
3203 <ExtendedAttributeList>
3204 <ExtendedAttribute name="NoInterfaceObject">
3205 <webidl>NoInterfaceObject</webidl>
3206 </ExtendedAttribute>
3207 </ExtendedAttributeList>
3208 <InterfaceInheritance>
3209 <Name name="VehicleCommonDataType"/>
3210 </InterfaceInheritance>
3211 <Attribute name="wiperControl" id="::WiperSetting::wiperControl">
3212 <webidl> attribute <ref>WiperControl</ref> wiperControl;</webidl>
3213 <Type name="WiperControl"/>
3215 <Attribute name="zone" id="::WiperSetting::zone">
3216 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3217 <Type name="Zone" nullable="nullable"/>
3220 <Interface name="Defrost" id="::Defrost">
3221 <webidl>[NoInterfaceObject]
3222 interface Defrost : <ref>VehicleCommonDataType</ref> {
3223 attribute boolean? defrostWindow;
3224 attribute boolean? defrostMirrors;
3225 attribute <ref>Zone</ref>? zone;
3227 <ExtendedAttributeList>
3228 <ExtendedAttribute name="NoInterfaceObject">
3229 <webidl>NoInterfaceObject</webidl>
3230 </ExtendedAttribute>
3231 </ExtendedAttributeList>
3232 <InterfaceInheritance>
3233 <Name name="VehicleCommonDataType"/>
3234 </InterfaceInheritance>
3235 <Attribute name="defrostWindow" id="::Defrost::defrostWindow">
3236 <webidl> attribute boolean? defrostWindow;</webidl>
3237 <Type type="boolean" nullable="nullable"/>
3239 <Attribute name="defrostMirrors" id="::Defrost::defrostMirrors">
3240 <webidl> attribute boolean? defrostMirrors;</webidl>
3241 <Type type="boolean" nullable="nullable"/>
3243 <Attribute name="zone" id="::Defrost::zone">
3244 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3245 <Type name="Zone" nullable="nullable"/>
3248 <Enum name="AirflowDirection" id="::AirflowDirection">
3249 <webidl>enum AirflowDirection {"frontpanel", "floorduct", "bilevel", "defrostfloor"};</webidl>
3250 <EnumValue stringvalue="frontpanel">
3251 <webidl>"frontpanel</webidl>
3253 <EnumValue stringvalue="floorduct">
3254 <webidl> "floorduct</webidl>
3256 <EnumValue stringvalue="bilevel">
3257 <webidl> "bilevel</webidl>
3259 <EnumValue stringvalue="defrostfloor">
3260 <webidl> "defrostfloor</webidl>
3263 <Interface name="ClimateControl" id="::ClimateControl">
3264 <webidl>[NoInterfaceObject]
3265 interface ClimateControl : <ref>VehicleCommonDataType</ref> {
3266 attribute <ref>AirflowDirection</ref> airflowDirection;
3267 attribute unsigned short fanSpeedLevel;
3268 attribute byte? targetTemperature;
3269 attribute boolean airConditioning;
3270 attribute boolean heater;
3271 attribute unsigned short? seatHeater;
3272 attribute unsigned short? seatCooler;
3273 attribute boolean airRecirculation;
3274 attribute unsigned short? steeringWheelHeater;
3275 attribute <ref>Zone</ref>? zone;
3277 <ExtendedAttributeList>
3278 <ExtendedAttribute name="NoInterfaceObject">
3279 <webidl>NoInterfaceObject</webidl>
3280 </ExtendedAttribute>
3281 </ExtendedAttributeList>
3282 <InterfaceInheritance>
3283 <Name name="VehicleCommonDataType"/>
3284 </InterfaceInheritance>
3285 <Attribute name="airflowDirection" id="::ClimateControl::airflowDirection">
3286 <webidl> attribute <ref>AirflowDirection</ref> airflowDirection;</webidl>
3287 <Type name="AirflowDirection"/>
3289 <Attribute name="fanSpeedLevel" id="::ClimateControl::fanSpeedLevel">
3290 <webidl> attribute unsigned short fanSpeedLevel;</webidl>
3291 <Type type="unsigned short"/>
3293 <Attribute name="targetTemperature" id="::ClimateControl::targetTemperature">
3294 <webidl> attribute byte? targetTemperature;</webidl>
3295 <Type type="byte" nullable="nullable"/>
3297 <Attribute name="airConditioning" id="::ClimateControl::airConditioning">
3298 <webidl> attribute boolean airConditioning;</webidl>
3299 <Type type="boolean"/>
3301 <Attribute name="heater" id="::ClimateControl::heater">
3302 <webidl> attribute boolean heater;</webidl>
3303 <Type type="boolean"/>
3305 <Attribute name="seatHeater" id="::ClimateControl::seatHeater">
3306 <webidl> attribute unsigned short? seatHeater;</webidl>
3307 <Type type="unsigned short" nullable="nullable"/>
3309 <Attribute name="seatCooler" id="::ClimateControl::seatCooler">
3310 <webidl> attribute unsigned short? seatCooler;</webidl>
3311 <Type type="unsigned short" nullable="nullable"/>
3313 <Attribute name="airRecirculation" id="::ClimateControl::airRecirculation">
3314 <webidl> attribute boolean airRecirculation;</webidl>
3315 <Type type="boolean"/>
3317 <Attribute name="steeringWheelHeater" id="::ClimateControl::steeringWheelHeater">
3318 <webidl> attribute unsigned short? steeringWheelHeater;</webidl>
3319 <Type type="unsigned short" nullable="nullable"/>
3321 <Attribute name="zone" id="::ClimateControl::zone">
3322 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3323 <Type name="Zone" nullable="nullable"/>
3326 <Interface name="Sunroof" id="::Sunroof">
3327 <webidl>[NoInterfaceObject]
3328 interface Sunroof : <ref>VehicleCommonDataType</ref> {
3329 attribute unsigned short openness;
3330 attribute unsigned short tilt;
3331 attribute <ref>Zone</ref>? zone;
3333 <ExtendedAttributeList>
3334 <ExtendedAttribute name="NoInterfaceObject">
3335 <webidl>NoInterfaceObject</webidl>
3336 </ExtendedAttribute>
3337 </ExtendedAttributeList>
3338 <InterfaceInheritance>
3339 <Name name="VehicleCommonDataType"/>
3340 </InterfaceInheritance>
3341 <Attribute name="openness" id="::Sunroof::openness">
3342 <webidl> attribute unsigned short openness;</webidl>
3343 <Type type="unsigned short"/>
3345 <Attribute name="tilt" id="::Sunroof::tilt">
3346 <webidl> attribute unsigned short tilt;</webidl>
3347 <Type type="unsigned short"/>
3349 <Attribute name="zone" id="::Sunroof::zone">
3350 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3351 <Type name="Zone" nullable="nullable"/>
3354 <Enum name="ConvertibleRoofStatus" id="::ConvertibleRoofStatus">
3355 <webidl>enum ConvertibleRoofStatus {"closed", "closing", "opening", "opened"};</webidl>
3356 <EnumValue stringvalue="closed">
3357 <webidl>"closed</webidl>
3359 <EnumValue stringvalue="closing">
3360 <webidl> "closing</webidl>
3362 <EnumValue stringvalue="opening">
3363 <webidl> "opening</webidl>
3365 <EnumValue stringvalue="opened">
3366 <webidl> "opened</webidl>
3369 <Interface name="ConvertibleRoof" id="::ConvertibleRoof">
3370 <webidl>[NoInterfaceObject]
3371 interface ConvertibleRoof : <ref>VehicleCommonDataType</ref> {
3372 attribute <ref>ConvertibleRoofStatus</ref> status;
3374 <ExtendedAttributeList>
3375 <ExtendedAttribute name="NoInterfaceObject">
3376 <webidl>NoInterfaceObject</webidl>
3377 </ExtendedAttribute>
3378 </ExtendedAttributeList>
3379 <InterfaceInheritance>
3380 <Name name="VehicleCommonDataType"/>
3381 </InterfaceInheritance>
3382 <Attribute name="status" id="::ConvertibleRoof::status">
3383 <webidl> attribute <ref>ConvertibleRoofStatus</ref> status;</webidl>
3384 <Type name="ConvertibleRoofStatus"/>
3387 <Interface name="SideWindow" id="::SideWindow">
3388 <webidl>[NoInterfaceObject]
3389 interface SideWindow : <ref>VehicleCommonDataType</ref> {
3390 attribute boolean? lock;
3391 attribute unsigned short? openness;
3392 attribute <ref>Zone</ref>? zone;
3394 <ExtendedAttributeList>
3395 <ExtendedAttribute name="NoInterfaceObject">
3396 <webidl>NoInterfaceObject</webidl>
3397 </ExtendedAttribute>
3398 </ExtendedAttributeList>
3399 <InterfaceInheritance>
3400 <Name name="VehicleCommonDataType"/>
3401 </InterfaceInheritance>
3402 <Attribute name="lock" id="::SideWindow::lock">
3403 <webidl> attribute boolean? lock;</webidl>
3404 <Type type="boolean" nullable="nullable"/>
3406 <Attribute name="openness" id="::SideWindow::openness">
3407 <webidl> attribute unsigned short? openness;</webidl>
3408 <Type type="unsigned short" nullable="nullable"/>
3410 <Attribute name="zone" id="::SideWindow::zone">
3411 <webidl> attribute <ref>Zone</ref>? zone;</webidl>
3412 <Type name="Zone" nullable="nullable"/>
3415 <Interface name="AtmosphericPressure" id="::AtmosphericPressure">
3416 <webidl>[NoInterfaceObject]
3417 interface AtmosphericPressure : <ref>VehicleCommonDataType</ref> {
3418 readonly attribute unsigned short pressure;
3420 <ExtendedAttributeList>
3421 <ExtendedAttribute name="NoInterfaceObject">
3422 <webidl>NoInterfaceObject</webidl>
3423 </ExtendedAttribute>
3424 </ExtendedAttributeList>
3425 <InterfaceInheritance>
3426 <Name name="VehicleCommonDataType"/>
3427 </InterfaceInheritance>
3428 <Attribute readonly="readonly" name="pressure" id="::AtmosphericPressure::pressure">
3429 <webidl> readonly attribute unsigned short pressure;</webidl>
3430 <Type type="unsigned short"/>
3433 <Enum name="LaneDepartureStatus" id="::LaneDepartureStatus">
3434 <webidl>enum LaneDepartureStatus {"off", "pause", "running"};</webidl>
3435 <EnumValue stringvalue="off">
3436 <webidl>"off</webidl>
3438 <EnumValue stringvalue="pause">
3439 <webidl> "pause</webidl>
3441 <EnumValue stringvalue="running">
3442 <webidl> "running</webidl>
3445 <Interface name="LaneDepartureDetection" id="::LaneDepartureDetection">
3446 <webidl>[NoInterfaceObject]
3447 interface LaneDepartureDetection : <ref>VehicleCommonDataType</ref> {
3448 readonly attribute <ref>LaneDepartureStatus</ref> status;
3450 <ExtendedAttributeList>
3451 <ExtendedAttribute name="NoInterfaceObject">
3452 <webidl>NoInterfaceObject</webidl>
3453 </ExtendedAttribute>
3454 </ExtendedAttributeList>
3455 <InterfaceInheritance>
3456 <Name name="VehicleCommonDataType"/>
3457 </InterfaceInheritance>
3458 <Attribute readonly="readonly" name="status" id="::LaneDepartureDetection::status">
3459 <webidl> readonly attribute <ref>LaneDepartureStatus</ref> status;</webidl>
3460 <Type name="LaneDepartureStatus"/>
3463 <Enum name="AlarmStatus" id="::AlarmStatus">
3464 <webidl>enum AlarmStatus {"disarmed", "preArmed", "armed", "alarmed"};</webidl>
3465 <EnumValue stringvalue="disarmed">
3466 <webidl>"disarmed</webidl>
3468 <EnumValue stringvalue="preArmed">
3469 <webidl> "preArmed</webidl>
3471 <EnumValue stringvalue="armed">
3472 <webidl> "armed</webidl>
3474 <EnumValue stringvalue="alarmed">
3475 <webidl> "alarmed</webidl>
3478 <Interface name="Alarm" id="::Alarm">
3479 <webidl>[NoInterfaceObject]
3480 interface Alarm : <ref>VehicleCommonDataType</ref> {
3481 attribute <ref>AlarmStatus</ref> status;
3483 <ExtendedAttributeList>
3484 <ExtendedAttribute name="NoInterfaceObject">
3485 <webidl>NoInterfaceObject</webidl>
3486 </ExtendedAttribute>
3487 </ExtendedAttributeList>
3488 <InterfaceInheritance>
3489 <Name name="VehicleCommonDataType"/>
3490 </InterfaceInheritance>
3491 <Attribute name="status" id="::Alarm::status">
3492 <webidl> attribute <ref>AlarmStatus</ref> status;</webidl>
3493 <Type name="AlarmStatus"/>
3496 <Enum name="ParkingBrakeStatus" id="::ParkingBrakeStatus">
3497 <webidl>enum ParkingBrakeStatus {"inactive", "active", "error"};</webidl>
3498 <EnumValue stringvalue="inactive">
3499 <webidl>"inactive</webidl>
3501 <EnumValue stringvalue="active">
3502 <webidl> "active</webidl>
3504 <EnumValue stringvalue="error">
3505 <webidl> "error</webidl>
3508 <Interface name="ParkingBrake" id="::ParkingBrake">
3509 <webidl>[NoInterfaceObject]
3510 interface ParkingBrake : <ref>VehicleCommonDataType</ref> {
3511 readonly attribute <ref>ParkingBrakeStatus</ref> status;
3513 <ExtendedAttributeList>
3514 <ExtendedAttribute name="NoInterfaceObject">
3515 <webidl>NoInterfaceObject</webidl>
3516 </ExtendedAttribute>
3517 </ExtendedAttributeList>
3518 <InterfaceInheritance>
3519 <Name name="VehicleCommonDataType"/>
3520 </InterfaceInheritance>
3521 <Attribute readonly="readonly" name="status" id="::ParkingBrake::status">
3522 <webidl> readonly attribute <ref>ParkingBrakeStatus</ref> status;</webidl>
3523 <Type name="ParkingBrakeStatus"/>
3526 <Interface name="ParkingLights" id="::ParkingLights">
3527 <webidl>[NoInterfaceObject]
3528 interface ParkingLights : <ref>VehicleCommonDataType</ref> {
3529 readonly attribute boolean status;
3530 attribute boolean setting;
3532 <ExtendedAttributeList>
3533 <ExtendedAttribute name="NoInterfaceObject">
3534 <webidl>NoInterfaceObject</webidl>
3535 </ExtendedAttribute>
3536 </ExtendedAttributeList>
3537 <InterfaceInheritance>
3538 <Name name="VehicleCommonDataType"/>
3539 </InterfaceInheritance>
3540 <Attribute readonly="readonly" name="status" id="::ParkingLights::status">
3541 <webidl> readonly attribute boolean status;</webidl>
3542 <Type type="boolean"/>
3544 <Attribute name="setting" id="::ParkingLights::setting">
3545 <webidl> attribute boolean setting;</webidl>
3546 <Type type="boolean"/>
3550 <Module name="MediaServer" id="::MediaServer">
3551 <webidl> module MediaServer {
3552 [NoInterfaceObject] interface MediaServerManagerObject {
3553 readonly attribute <ref>MediaServerManager</ref> mediaserver;
3556 <ref>Tizen</ref> implements <ref>MediaServerManagerObject</ref>;
3558 [NoInterfaceObject] interface MediaServerManager {
3559 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3562 [NoInterfaceObject] interface MediaServer {
3563 readonly attribute DOMString id;
3564 readonly attribute DOMString friendlyName;
3565 readonly attribute object root;
3567 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3568 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3571 [NoInterfaceObject] interface MediaServerError {
3572 const unsigned short GENERIC = 1;
3573 attribute unsigned short code;
3574 attribute DOMString message;
3577 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
3578 void onsuccess(<ref>MediaServer</ref> value);
3581 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
3582 void onsuccess(sequence< object > value);
3585 [Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
3586 void onfailure(<ref>MediaServerError</ref> error);
3588 <Interface name="MediaServerManagerObject" id="::MediaServerManagerObject">
3589 <webidl>[NoInterfaceObject] interface MediaServerManagerObject {
3590 readonly attribute <ref>MediaServerManager</ref> mediaserver;
3592 <ExtendedAttributeList>
3593 <ExtendedAttribute name="NoInterfaceObject">
3594 <webidl>NoInterfaceObject</webidl>
3595 </ExtendedAttribute>
3596 </ExtendedAttributeList>
3597 <Attribute readonly="readonly" name="mediaserver" id="::MediaServerManagerObject::mediaserver">
3598 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
3599 <Type name="MediaServerManager"/>
3602 <Implements name1="Tizen" name2="MediaServerManagerObject">
3603 <webidl><ref>Tizen</ref> implements <ref>MediaServerManagerObject</ref>;</webidl>
3605 <Interface name="MediaServerManager" id="::MediaServerManager">
3606 <webidl>[NoInterfaceObject] interface MediaServerManager {
3607 void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3609 <ExtendedAttributeList>
3610 <ExtendedAttribute name="NoInterfaceObject">
3611 <webidl>NoInterfaceObject</webidl>
3612 </ExtendedAttribute>
3613 </ExtendedAttributeList>
3614 <Operation name="scanNetwork" id="::MediaServerManager::scanNetwork">
3615 <webidl> void scanNetwork(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
3618 <Argument name="successCallback">
3619 <Type name="MediaServerFoundServerCallback"/>
3621 <Argument optional="optional" name="errorCallback">
3622 <Type name="MediaServerErrorCallback"/>
3627 <Interface name="MediaServer" id="::MediaServer">
3628 <webidl>[NoInterfaceObject] interface MediaServer {
3629 readonly attribute DOMString id;
3630 readonly attribute DOMString friendlyName;
3631 readonly attribute object root;
3633 void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3634 void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
3636 <ExtendedAttributeList>
3637 <ExtendedAttribute name="NoInterfaceObject">
3638 <webidl>NoInterfaceObject</webidl>
3639 </ExtendedAttribute>
3640 </ExtendedAttributeList>
3641 <Attribute readonly="readonly" name="id" id="::MediaServer::id">
3642 <webidl> readonly attribute DOMString id;</webidl>
3643 <Type type="DOMString"/>
3645 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::friendlyName">
3646 <webidl> readonly attribute DOMString friendlyName;</webidl>
3647 <Type type="DOMString"/>
3649 <Attribute readonly="readonly" name="root" id="::MediaServer::root">
3650 <webidl> readonly attribute object root;</webidl>
3651 <Type type="object"/>
3653 <Operation name="browse" id="::MediaServer::browse">
3654 <webidl> void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
3657 <Argument name="containerId">
3658 <Type type="DOMString"/>
3660 <Argument name="sortMode">
3661 <Type type="DOMString"/>
3663 <Argument name="count">
3664 <Type type="unsigned long"/>
3666 <Argument name="offset">
3667 <Type type="unsigned long"/>
3669 <Argument name="successCallback">
3670 <Type name="MediaServerBrowseFindCallback"/>
3672 <Argument optional="optional" name="errorCallback">
3673 <Type name="MediaServerErrorCallback"/>
3677 <Operation name="find" id="::MediaServer::find">
3678 <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>
3681 <Argument name="containerId">
3682 <Type type="DOMString"/>
3684 <Argument name="searchFilter">
3685 <Type type="DOMString"/>
3687 <Argument name="sortMode">
3688 <Type type="DOMString"/>
3690 <Argument name="count">
3691 <Type type="unsigned long"/>
3693 <Argument name="offset">
3694 <Type type="unsigned long"/>
3696 <Argument name="successCallback">
3697 <Type name="MediaServerBrowseFindCallback"/>
3699 <Argument optional="optional" name="errorCallback">
3700 <Type name="MediaServerErrorCallback"/>
3705 <Interface name="MediaServerError" id="::MediaServerError">
3706 <webidl>[NoInterfaceObject] interface MediaServerError {
3707 const unsigned short GENERIC = 1;
3708 attribute unsigned short code;
3709 attribute DOMString message;
3711 <ExtendedAttributeList>
3712 <ExtendedAttribute name="NoInterfaceObject">
3713 <webidl>NoInterfaceObject</webidl>
3714 </ExtendedAttribute>
3715 </ExtendedAttributeList>
3716 <Const name="GENERIC" value="1" id="::MediaServerError::GENERIC">
3717 <webidl> const unsigned short GENERIC = 1;</webidl>
3718 <Type type="unsigned short"/>
3720 <Attribute name="code" id="::MediaServerError::code">
3721 <webidl> attribute unsigned short code;</webidl>
3722 <Type type="unsigned short"/>
3724 <Attribute name="message" id="::MediaServerError::message">
3725 <webidl> attribute DOMString message;</webidl>
3726 <Type type="DOMString"/>
3729 <Interface name="MediaServerFoundServerCallback" id="::MediaServerFoundServerCallback">
3730 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerFoundServerCallback {
3731 void onsuccess(<ref>MediaServer</ref> value);
3733 <ExtendedAttributeList>
3734 <ExtendedAttribute name="Callback" value="FunctionOnly">
3735 <webidl>Callback</webidl>
3736 </ExtendedAttribute>
3737 <ExtendedAttribute name="NoInterfaceObject">
3738 <webidl> NoInterfaceObject</webidl>
3739 </ExtendedAttribute>
3740 </ExtendedAttributeList>
3741 <Operation name="onsuccess" id="::MediaServerFoundServerCallback::onsuccess">
3742 <webidl> void onsuccess(<ref>MediaServer</ref> value);</webidl>
3745 <Argument name="value">
3746 <Type name="MediaServer"/>
3751 <Interface name="MediaServerBrowseFindCallback" id="::MediaServerBrowseFindCallback">
3752 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerBrowseFindCallback {
3753 void onsuccess(sequence< object > value);
3755 <ExtendedAttributeList>
3756 <ExtendedAttribute name="Callback" value="FunctionOnly">
3757 <webidl>Callback</webidl>
3758 </ExtendedAttribute>
3759 <ExtendedAttribute name="NoInterfaceObject">
3760 <webidl> NoInterfaceObject</webidl>
3761 </ExtendedAttribute>
3762 </ExtendedAttributeList>
3763 <Operation name="onsuccess" id="::MediaServerBrowseFindCallback::onsuccess">
3764 <webidl> void onsuccess(sequence< object > value);</webidl>
3767 <Argument name="value">
3768 <Type type="sequence">
3769 <Type type="object"/>
3775 <Interface name="MediaServerErrorCallback" id="::MediaServerErrorCallback">
3776 <webidl>[Callback=FunctionOnly, NoInterfaceObject] interface MediaServerErrorCallback {
3777 void onfailure(<ref>MediaServerError</ref> error);
3779 <ExtendedAttributeList>
3780 <ExtendedAttribute name="Callback" value="FunctionOnly">
3781 <webidl>Callback</webidl>
3782 </ExtendedAttribute>
3783 <ExtendedAttribute name="NoInterfaceObject">
3784 <webidl> NoInterfaceObject</webidl>
3785 </ExtendedAttribute>
3786 </ExtendedAttributeList>
3787 <Operation name="onfailure" id="::MediaServerErrorCallback::onfailure">
3788 <webidl> void onfailure(<ref>MediaServerError</ref> error);</webidl>
3791 <Argument name="error">
3792 <Type name="MediaServerError"/>
3798 <Module name="Locale" id="::Locale">
3799 <webidl> module Locale {
3801 interface LocaleManagerObject {
3802 readonly attribute <ref>Locale</ref> locale;
3805 <ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;
3807 callback LocaleChangedCallback = void (DOMString newLocale);
3815 void setLocale(DOMString newLocale);
3817 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
3820 <Interface name="LocaleManagerObject" id="::LocaleManagerObject">
3821 <webidl>[NoInterfaceObject]
3822 interface LocaleManagerObject {
3823 readonly attribute <ref>Locale</ref> locale;
3831 def-api-feature http://tizen.org/api/vehicle
3832 brief Allows access to the vehicle API
3836 <ExtendedAttributeList>
3837 <ExtendedAttribute name="NoInterfaceObject">
3838 <webidl>NoInterfaceObject</webidl>
3839 </ExtendedAttribute>
3840 </ExtendedAttributeList>
3841 <Attribute readonly="readonly" name="locale" id="::LocaleManagerObject::locale">
3842 <webidl> readonly attribute <ref>Locale</ref> locale;</webidl>
3843 <Type name="Locale"/>
3846 <Implements name1="Tizen" name2="LocaleManagerObject">
3847 <webidl><ref>Tizen</ref> implements <ref>LocaleManagerObject</ref>;</webidl>
3849 <Callback name="LocaleChangedCallback" id="::LocaleChangedCallback">
3850 <webidl>callback LocaleChangedCallback = void (DOMString newLocale);</webidl>
3853 <Argument name="newLocale">
3854 <Type type="DOMString"/>
3858 <Interface name="Locale" id="::Locale">
3859 <webidl>[NoInterfaceObject]
3864 void setLocale(DOMString newLocale);
3866 void localeChanged(<ref>LocaleChangedCallback</ref> cb);
3869 <ExtendedAttributeList>
3870 <ExtendedAttribute name="NoInterfaceObject">
3871 <webidl>NoInterfaceObject</webidl>
3872 </ExtendedAttribute>
3873 </ExtendedAttributeList>
3874 <Operation name="getLocale" id="::Locale::getLocale">
3875 <webidl> void getLocale();</webidl>
3879 brief gets the current locale
3880 returns current locale in ISO 639-2 format (ie en_US for english US)
3887 <Operation name="setLocale" id="::Locale::setLocale">
3888 <webidl> void setLocale(DOMString newLocale);</webidl>
3892 brief sets the system locale
3893 param newLocale locale to set in ISO 639-2 format
3899 <Argument name="newLocale">
3900 <Type type="DOMString"/>
3904 <Operation name="localeChanged" id="::Locale::localeChanged">
3905 <webidl> void localeChanged(<ref>LocaleChangedCallback</ref> cb);</webidl>
3909 brief subscribe to locale changes.
3910 param cb callback to be called when this even occurs.
3916 <Argument name="cb">
3917 <Type name="LocaleChangedCallback"/>
3923 <Module name="Speech" id="::Speech">
3924 <webidl> module Speech {
3926 interface SpeechManagerObject {
3927 readonly attribute <ref>SpeechManager</ref> speech;
3929 <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;
3933 interface SpeechManager {
3934 void vocalizeString(DOMString speakString);
3938 interface SpeechRecognition : <ref>EventTarget</ref> {
3939 attribute <ref>SpeechGrammarList</ref> grammars;
3940 attribute DOMString lang;
3941 attribute boolean continuous;
3942 attribute boolean interimResults;
3943 attribute unsigned long maxAlternatives;
3944 attribute DOMString serviceURI;
3950 attribute <ref>EventHandler</ref> onaudiostart;
3951 attribute <ref>EventHandler</ref> onsoundstart;
3952 attribute <ref>EventHandler</ref> onspeechstart;
3953 attribute <ref>EventHandler</ref> onspeechend;
3954 attribute <ref>EventHandler</ref> onsoundend;
3955 attribute <ref>EventHandler</ref> onaudioend;
3956 attribute <ref>EventHandler</ref> onresult;
3957 attribute <ref>EventHandler</ref> onnomatch;
3958 attribute <ref>EventHandler</ref> onerror;
3959 attribute <ref>EventHandler</ref> onstart;
3960 attribute <ref>EventHandler</ref> onend;
3964 "no-speech",
3965 "aborted",
3966 "audio-capture",
3967 "network",
3968 "not-allowed",
3969 "service-not-allowed",
3970 "bad-grammar",
3971 "language-not-supported"
3974 interface SpeechRecognitionError : <ref>Event</ref> {
3975 readonly attribute <ref>ErrorCode</ref> error;
3976 readonly attribute DOMString message;
3979 interface SpeechRecognitionAlternative {
3980 readonly attribute DOMString transcript;
3981 readonly attribute float confidence;
3984 interface SpeechRecognitionResult {
3985 readonly attribute unsigned long length;
3986 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
3987 readonly attribute boolean final;
3990 interface SpeechRecognitionResultList {
3991 readonly attribute unsigned long length;
3992 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
3995 interface SpeechRecognitionEvent : <ref>Event</ref> {
3996 readonly attribute unsigned long resultIndex;
3997 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
3998 readonly attribute any interpretation;
3999 readonly attribute <ref>Document</ref> emma;
4003 interface SpeechGrammar {
4004 attribute DOMString src;
4005 attribute float weight;
4009 interface SpeechGrammarList {
4010 readonly attribute unsigned long length;
4011 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4012 void addFromURI(DOMString src, optional float weight);
4013 void addFromString(DOMString string, optional float weight);
4016 <Interface name="SpeechManagerObject" id="::SpeechManagerObject">
4017 <webidl> [NoInterfaceObject]
4018 interface SpeechManagerObject {
4019 readonly attribute <ref>SpeechManager</ref> speech;
4021 <ExtendedAttributeList>
4022 <ExtendedAttribute name="NoInterfaceObject">
4023 <webidl>NoInterfaceObject</webidl>
4024 </ExtendedAttribute>
4025 </ExtendedAttributeList>
4026 <Attribute readonly="readonly" name="speech" id="::SpeechManagerObject::speech">
4027 <webidl> readonly attribute <ref>SpeechManager</ref> speech;</webidl>
4028 <Type name="SpeechManager"/>
4031 <Implements name1="Tizen" name2="SpeechManagerObject">
4032 <webidl> <ref>Tizen</ref> implements <ref>SpeechManagerObject</ref>;</webidl>
4034 <Interface name="SpeechManager" id="::SpeechManager">
4035 <webidl> [NoInterfaceObject]
4036 interface SpeechManager {
4037 void vocalizeString(DOMString speakString);
4039 <ExtendedAttributeList>
4040 <ExtendedAttribute name="NoInterfaceObject">
4041 <webidl>NoInterfaceObject</webidl>
4042 </ExtendedAttribute>
4043 </ExtendedAttributeList>
4044 <Operation name="vocalizeString" id="::SpeechManager::vocalizeString">
4045 <webidl> void vocalizeString(DOMString speakString);</webidl>
4048 <Argument name="speakString">
4049 <Type type="DOMString"/>
4054 <Interface name="SpeechRecognition" id="::SpeechRecognition">
4055 <webidl> [Constructor]
4056 interface SpeechRecognition : <ref>EventTarget</ref> {
4057 attribute <ref>SpeechGrammarList</ref> grammars;
4058 attribute DOMString lang;
4059 attribute boolean continuous;
4060 attribute boolean interimResults;
4061 attribute unsigned long maxAlternatives;
4062 attribute DOMString serviceURI;
4068 attribute <ref>EventHandler</ref> onaudiostart;
4069 attribute <ref>EventHandler</ref> onsoundstart;
4070 attribute <ref>EventHandler</ref> onspeechstart;
4071 attribute <ref>EventHandler</ref> onspeechend;
4072 attribute <ref>EventHandler</ref> onsoundend;
4073 attribute <ref>EventHandler</ref> onaudioend;
4074 attribute <ref>EventHandler</ref> onresult;
4075 attribute <ref>EventHandler</ref> onnomatch;
4076 attribute <ref>EventHandler</ref> onerror;
4077 attribute <ref>EventHandler</ref> onstart;
4078 attribute <ref>EventHandler</ref> onend;
4080 <ExtendedAttributeList>
4081 <ExtendedAttribute name="Constructor">
4082 <webidl>Constructor</webidl>
4083 </ExtendedAttribute>
4084 </ExtendedAttributeList>
4085 <InterfaceInheritance>
4086 <Name name="EventTarget"/>
4087 </InterfaceInheritance>
4088 <Attribute name="grammars" id="::SpeechRecognition::grammars">
4089 <webidl> attribute <ref>SpeechGrammarList</ref> grammars;</webidl>
4090 <Type name="SpeechGrammarList"/>
4092 <Attribute name="lang" id="::SpeechRecognition::lang">
4093 <webidl> attribute DOMString lang;</webidl>
4094 <Type type="DOMString"/>
4096 <Attribute name="continuous" id="::SpeechRecognition::continuous">
4097 <webidl> attribute boolean continuous;</webidl>
4098 <Type type="boolean"/>
4100 <Attribute name="interimResults" id="::SpeechRecognition::interimResults">
4101 <webidl> attribute boolean interimResults;</webidl>
4102 <Type type="boolean"/>
4104 <Attribute name="maxAlternatives" id="::SpeechRecognition::maxAlternatives">
4105 <webidl> attribute unsigned long maxAlternatives;</webidl>
4106 <Type type="unsigned long"/>
4108 <Attribute name="serviceURI" id="::SpeechRecognition::serviceURI">
4109 <webidl> attribute DOMString serviceURI;</webidl>
4110 <Type type="DOMString"/>
4112 <Operation name="start" id="::SpeechRecognition::start">
4113 <webidl> void start();</webidl>
4117 <Operation name="stop" id="::SpeechRecognition::stop">
4118 <webidl> void stop();</webidl>
4122 <Operation name="abort" id="::SpeechRecognition::abort">
4123 <webidl> void abort();</webidl>
4127 <Attribute name="onaudiostart" id="::SpeechRecognition::onaudiostart">
4128 <webidl> attribute <ref>EventHandler</ref> onaudiostart;</webidl>
4129 <Type name="EventHandler"/>
4131 <Attribute name="onsoundstart" id="::SpeechRecognition::onsoundstart">
4132 <webidl> attribute <ref>EventHandler</ref> onsoundstart;</webidl>
4133 <Type name="EventHandler"/>
4135 <Attribute name="onspeechstart" id="::SpeechRecognition::onspeechstart">
4136 <webidl> attribute <ref>EventHandler</ref> onspeechstart;</webidl>
4137 <Type name="EventHandler"/>
4139 <Attribute name="onspeechend" id="::SpeechRecognition::onspeechend">
4140 <webidl> attribute <ref>EventHandler</ref> onspeechend;</webidl>
4141 <Type name="EventHandler"/>
4143 <Attribute name="onsoundend" id="::SpeechRecognition::onsoundend">
4144 <webidl> attribute <ref>EventHandler</ref> onsoundend;</webidl>
4145 <Type name="EventHandler"/>
4147 <Attribute name="onaudioend" id="::SpeechRecognition::onaudioend">
4148 <webidl> attribute <ref>EventHandler</ref> onaudioend;</webidl>
4149 <Type name="EventHandler"/>
4151 <Attribute name="onresult" id="::SpeechRecognition::onresult">
4152 <webidl> attribute <ref>EventHandler</ref> onresult;</webidl>
4153 <Type name="EventHandler"/>
4155 <Attribute name="onnomatch" id="::SpeechRecognition::onnomatch">
4156 <webidl> attribute <ref>EventHandler</ref> onnomatch;</webidl>
4157 <Type name="EventHandler"/>
4159 <Attribute name="onerror" id="::SpeechRecognition::onerror">
4160 <webidl> attribute <ref>EventHandler</ref> onerror;</webidl>
4161 <Type name="EventHandler"/>
4163 <Attribute name="onstart" id="::SpeechRecognition::onstart">
4164 <webidl> attribute <ref>EventHandler</ref> onstart;</webidl>
4165 <Type name="EventHandler"/>
4167 <Attribute name="onend" id="::SpeechRecognition::onend">
4168 <webidl> attribute <ref>EventHandler</ref> onend;</webidl>
4169 <Type name="EventHandler"/>
4172 <Enum name="ErrorCode" id="::ErrorCode">
4173 <webidl> enum ErrorCode {
4174 "no-speech",
4175 "aborted",
4176 "audio-capture",
4177 "network",
4178 "not-allowed",
4179 "service-not-allowed",
4180 "bad-grammar",
4181 "language-not-supported"
4183 <EnumValue stringvalue="no-speech">
4184 <webidl> "no-speech</webidl>
4186 <EnumValue stringvalue="aborted">
4187 <webidl> "aborted</webidl>
4189 <EnumValue stringvalue="audio-capture">
4190 <webidl> "audio-capture</webidl>
4192 <EnumValue stringvalue="network">
4193 <webidl> "network</webidl>
4195 <EnumValue stringvalue="not-allowed">
4196 <webidl> "not-allowed</webidl>
4198 <EnumValue stringvalue="service-not-allowed">
4199 <webidl> "service-not-allowed</webidl>
4201 <EnumValue stringvalue="bad-grammar">
4202 <webidl> "bad-grammar</webidl>
4204 <EnumValue stringvalue="language-not-supported">
4205 <webidl> "language-not-supported</webidl>
4208 <Interface name="SpeechRecognitionError" id="::SpeechRecognitionError">
4209 <webidl> interface SpeechRecognitionError : <ref>Event</ref> {
4210 readonly attribute <ref>ErrorCode</ref> error;
4211 readonly attribute DOMString message;
4213 <InterfaceInheritance>
4214 <Name name="Event"/>
4215 </InterfaceInheritance>
4216 <Attribute readonly="readonly" name="error" id="::SpeechRecognitionError::error">
4217 <webidl> readonly attribute <ref>ErrorCode</ref> error;</webidl>
4218 <Type name="ErrorCode"/>
4220 <Attribute readonly="readonly" name="message" id="::SpeechRecognitionError::message">
4221 <webidl> readonly attribute DOMString message;</webidl>
4222 <Type type="DOMString"/>
4225 <Interface name="SpeechRecognitionAlternative" id="::SpeechRecognitionAlternative">
4226 <webidl> interface SpeechRecognitionAlternative {
4227 readonly attribute DOMString transcript;
4228 readonly attribute float confidence;
4230 <Attribute readonly="readonly" name="transcript" id="::SpeechRecognitionAlternative::transcript">
4231 <webidl> readonly attribute DOMString transcript;</webidl>
4232 <Type type="DOMString"/>
4234 <Attribute readonly="readonly" name="confidence" id="::SpeechRecognitionAlternative::confidence">
4235 <webidl> readonly attribute float confidence;</webidl>
4236 <Type type="float"/>
4239 <Interface name="SpeechRecognitionResult" id="::SpeechRecognitionResult">
4240 <webidl> interface SpeechRecognitionResult {
4241 readonly attribute unsigned long length;
4242 getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);
4243 readonly attribute boolean final;
4245 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResult::length">
4246 <webidl> readonly attribute unsigned long length;</webidl>
4247 <Type type="unsigned long"/>
4249 <Operation getter="getter" name="item" id="::SpeechRecognitionResult::item">
4250 <webidl> getter <ref>SpeechRecognitionAlternative</ref> item(unsigned long index);</webidl>
4251 <Type name="SpeechRecognitionAlternative"/>
4253 <Argument name="index">
4254 <Type type="unsigned long"/>
4258 <Attribute readonly="readonly" name="final" id="::SpeechRecognitionResult::final">
4259 <webidl> readonly attribute boolean final;</webidl>
4260 <Type type="boolean"/>
4263 <Interface name="SpeechRecognitionResultList" id="::SpeechRecognitionResultList">
4264 <webidl> interface SpeechRecognitionResultList {
4265 readonly attribute unsigned long length;
4266 getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);
4268 <Attribute readonly="readonly" name="length" id="::SpeechRecognitionResultList::length">
4269 <webidl> readonly attribute unsigned long length;</webidl>
4270 <Type type="unsigned long"/>
4272 <Operation getter="getter" name="item" id="::SpeechRecognitionResultList::item">
4273 <webidl> getter <ref>SpeechRecognitionResult</ref> item(unsigned long index);</webidl>
4274 <Type name="SpeechRecognitionResult"/>
4276 <Argument name="index">
4277 <Type type="unsigned long"/>
4282 <Interface name="SpeechRecognitionEvent" id="::SpeechRecognitionEvent">
4283 <webidl> interface SpeechRecognitionEvent : <ref>Event</ref> {
4284 readonly attribute unsigned long resultIndex;
4285 readonly attribute <ref>SpeechRecognitionResultList</ref> results;
4286 readonly attribute any interpretation;
4287 readonly attribute <ref>Document</ref> emma;
4289 <InterfaceInheritance>
4290 <Name name="Event"/>
4291 </InterfaceInheritance>
4292 <Attribute readonly="readonly" name="resultIndex" id="::SpeechRecognitionEvent::resultIndex">
4293 <webidl> readonly attribute unsigned long resultIndex;</webidl>
4294 <Type type="unsigned long"/>
4296 <Attribute readonly="readonly" name="results" id="::SpeechRecognitionEvent::results">
4297 <webidl> readonly attribute <ref>SpeechRecognitionResultList</ref> results;</webidl>
4298 <Type name="SpeechRecognitionResultList"/>
4300 <Attribute readonly="readonly" name="interpretation" id="::SpeechRecognitionEvent::interpretation">
4301 <webidl> readonly attribute any interpretation;</webidl>
4304 <Attribute readonly="readonly" name="emma" id="::SpeechRecognitionEvent::emma">
4305 <webidl> readonly attribute <ref>Document</ref> emma;</webidl>
4306 <Type name="Document"/>
4309 <Interface name="SpeechGrammar" id="::SpeechGrammar">
4310 <webidl> [Constructor]
4311 interface SpeechGrammar {
4312 attribute DOMString src;
4313 attribute float weight;
4315 <ExtendedAttributeList>
4316 <ExtendedAttribute name="Constructor">
4317 <webidl>Constructor</webidl>
4318 </ExtendedAttribute>
4319 </ExtendedAttributeList>
4320 <Attribute name="src" id="::SpeechGrammar::src">
4321 <webidl> attribute DOMString src;</webidl>
4322 <Type type="DOMString"/>
4324 <Attribute name="weight" id="::SpeechGrammar::weight">
4325 <webidl> attribute float weight;</webidl>
4326 <Type type="float"/>
4329 <Interface name="SpeechGrammarList" id="::SpeechGrammarList">
4330 <webidl> [Constructor]
4331 interface SpeechGrammarList {
4332 readonly attribute unsigned long length;
4333 getter <ref>SpeechGrammar</ref> item(unsigned long index);
4334 void addFromURI(DOMString src, optional float weight);
4335 void addFromString(DOMString string, optional float weight);
4337 <ExtendedAttributeList>
4338 <ExtendedAttribute name="Constructor">
4339 <webidl>Constructor</webidl>
4340 </ExtendedAttribute>
4341 </ExtendedAttributeList>
4342 <Attribute readonly="readonly" name="length" id="::SpeechGrammarList::length">
4343 <webidl> readonly attribute unsigned long length;</webidl>
4344 <Type type="unsigned long"/>
4346 <Operation getter="getter" name="item" id="::SpeechGrammarList::item">
4347 <webidl> getter <ref>SpeechGrammar</ref> item(unsigned long index);</webidl>
4348 <Type name="SpeechGrammar"/>
4350 <Argument name="index">
4351 <Type type="unsigned long"/>
4355 <Operation name="addFromURI" id="::SpeechGrammarList::addFromURI">
4356 <webidl> void addFromURI(DOMString src, optional float weight);</webidl>
4359 <Argument name="src">
4360 <Type type="DOMString"/>
4362 <Argument optional="optional" name="weight">
4363 <Type type="float"/>
4367 <Operation name="addFromString" id="::SpeechGrammarList::addFromString">
4368 <webidl> void addFromString(DOMString string, optional float weight);</webidl>
4371 <Argument name="string">
4372 <Type type="DOMString"/>
4374 <Argument optional="optional" name="weight">
4375 <Type type="float"/>
4381 <Module name="MediaServer" id="::MediaServer">
4382 <webidl>module MediaServer {
4386 partial interface Navigator {
4387 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4393 interface MediaServerManager {
4395 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4401 interface MediaServer {
4403 readonly attribute DOMString id;
4405 readonly attribute DOMString friendlyName;
4407 readonly attribute object root;
4409 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4411 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4417 interface MediaServerError {
4418 const unsigned short GENERIC = 1;
4420 attribute unsigned short code;
4422 attribute DOMString message;
4427 callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);
4429 callback MediaServerBrowseFindCallback = void (sequence<object> value);
4431 callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);
4440 <def-api-feature identifier="http://tizen.org/api/mediaserver">
4443 Allows access to the mediaserver API
4448 <Interface name="Navigator" partial="partial" id="::MediaServer::Navigator">
4449 <webidl>partial interface Navigator {
4450 readonly attribute <ref>MediaServerManager</ref> mediaserver;
4452 <Attribute readonly="readonly" name="mediaserver" id="::MediaServer::Navigator::mediaserver">
4453 <webidl> readonly attribute <ref>MediaServerManager</ref> mediaserver;</webidl>
4454 <Type name="MediaServerManager"/>
4457 <Interface name="MediaServerManager" id="::MediaServer::MediaServerManager">
4458 <webidl>[NoInterfaceObject]
4459 interface MediaServerManager {
4461 <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4463 <ExtendedAttributeList>
4464 <ExtendedAttribute name="NoInterfaceObject">
4465 <webidl>NoInterfaceObject</webidl>
4466 </ExtendedAttribute>
4467 </ExtendedAttributeList>
4469 <webidl> <ref>scanNetwork</ref>(<ref>MediaServerFoundServerCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4472 Scans local network for MediaServers.
4475 <Type name="scanNetwork"/>
4477 <Argument name="successCallback">
4480 callback invoqued for each MediaServer discovered.
4483 <Type name="MediaServerFoundServerCallback"/>
4485 <Argument optional="optional" name="errorCallback">
4490 <Type name="MediaServerErrorCallback"/>
4495 <Interface name="MediaServer" id="::MediaServer::MediaServer">
4496 <webidl>[NoInterfaceObject]
4497 interface MediaServer {
4499 readonly attribute DOMString id;
4501 readonly attribute DOMString friendlyName;
4503 readonly attribute object root;
4505 <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4507 <ref>find</ref>(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);
4509 <ExtendedAttributeList>
4510 <ExtendedAttribute name="NoInterfaceObject">
4511 <webidl>NoInterfaceObject</webidl>
4512 </ExtendedAttribute>
4513 </ExtendedAttributeList>
4514 <Attribute readonly="readonly" name="id" id="::MediaServer::MediaServer::id">
4515 <webidl> readonly attribute DOMString id;</webidl>
4523 An opaque unique ID.
4526 <Type type="DOMString"/>
4528 <Attribute readonly="readonly" name="friendlyName" id="::MediaServer::MediaServer::friendlyName">
4529 <webidl> readonly attribute DOMString friendlyName;</webidl>
4537 A user-friendly name for the device.
4540 <Type type="DOMString"/>
4542 <Attribute readonly="readonly" name="root" id="::MediaServer::MediaServer::root">
4543 <webidl> readonly attribute object root;</webidl>
4551 Media Server root folder.
4554 <Type type="object"/>
4557 <webidl> <ref>browse</ref>(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset, <ref>MediaServerBrowseFindCallback</ref> successCallback, optional <ref>MediaServerErrorCallback</ref> errorCallback);</webidl>
4560 Browses for media item under a given MediaContainer.
4563 <Type name="browse"/>
4565 <Argument name="containerId">
4570 <Type type="DOMString"/>
4572 <Argument name="sortMode">
4577 <Type type="DOMString"/>
4579 <Argument name="count">
4584 <Type type="unsigned long"/>
4586 <Argument name="offset">
4591 <Type type="unsigned long"/>
4593 <Argument name="successCallback">
4598 <Type name="MediaServerBrowseFindCallback"/>
4600 <Argument optional="optional" name="errorCallback">
4605 <Type name="MediaServerErrorCallback"/>
4610 <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>
4613 Searches for media item under a given MediaContainer.
4618 <Argument name="containerId">
4623 <Type type="DOMString"/>
4625 <Argument name="searchFilter">
4630 <Type type="DOMString"/>
4632 <Argument name="sortMode">
4637 <Type type="DOMString"/>
4639 <Argument name="count">
4644 <Type type="unsigned long"/>
4646 <Argument name="offset">
4651 <Type type="unsigned long"/>
4653 <Argument name="successCallback">
4658 <Type name="MediaServerBrowseFindCallback"/>
4660 <Argument optional="optional" name="errorCallback">
4665 <Type name="MediaServerErrorCallback"/>
4670 <Interface name="MediaServerError" id="::MediaServer::MediaServerError">
4671 <webidl>[NoInterfaceObject]
4672 interface MediaServerError {
4673 const unsigned short GENERIC = 1;
4675 attribute unsigned short code;
4677 attribute DOMString message;
4679 <ExtendedAttributeList>
4680 <ExtendedAttribute name="NoInterfaceObject">
4681 <webidl>NoInterfaceObject</webidl>
4682 </ExtendedAttribute>
4683 </ExtendedAttributeList>
4684 <Const name="GENERIC" value="1" id="::MediaServer::MediaServerError::GENERIC">
4685 <webidl> const unsigned short GENERIC = 1;</webidl>
4686 <Type type="unsigned short"/>
4688 <Attribute name="code" id="::MediaServer::MediaServerError::code">
4689 <webidl> attribute unsigned short code;</webidl>
4694 MUST return error code.
4698 <Type type="unsigned short"/>
4700 <Attribute name="message" id="::MediaServer::MediaServerError::message">
4701 <webidl> attribute DOMString message;</webidl>
4706 MUST return error message
4710 <Type type="DOMString"/>
4713 <Callback name="MediaServerFoundServerCallback" id="::MediaServer::MediaServerFoundServerCallback">
4714 <webidl>callback MediaServerFoundServerCallback = void (<ref>MediaServer</ref> value);</webidl>
4717 <Argument name="value">
4718 <Type name="MediaServer"/>
4722 <Callback name="MediaServerBrowseFindCallback" id="::MediaServer::MediaServerBrowseFindCallback">
4723 <webidl>callback MediaServerBrowseFindCallback = void (sequence<object> value);</webidl>
4726 <Argument name="value">
4727 <Type type="sequence">
4728 <Type type="object"/>
4733 <Callback name="MediaServerErrorCallback" id="::MediaServer::MediaServerErrorCallback">
4734 <webidl>callback MediaServerErrorCallback = void (<ref>MediaServerError</ref> error);</webidl>
4737 <Argument name="error">
4738 <Type name="MediaServerError"/>
4743 <Module name="Alarm" id="::Alarm">
4744 <webidl>module Alarm {
4746 typedef DOMString AlarmId;
4750 [NoInterfaceObject] interface AlarmManagerObject {
4751 readonly attribute <ref>AlarmManager</ref> alarm;
4753 <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;
4756 [NoInterfaceObject] interface AlarmManager {
4758 const long PERIOD_MINUTE = 60;
4761 const long PERIOD_HOUR = 3600;
4764 const long PERIOD_DAY = 86400;
4767 const long PERIOD_WEEK = 604800;
4770 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4773 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4776 void removeAll() raises(<ref>WebAPIException</ref>);
4779 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4782 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4786 [NoInterfaceObject] interface Alarm {
4788 readonly attribute <ref>AlarmId</ref>? id;
4791 [Constructor(long delay, optional long? period)]
4793 interface AlarmRelative : <ref>Alarm</ref> {
4795 readonly attribute long delay;
4798 readonly attribute long? period;
4801 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
4804 [Constructor(Date date),
4806 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
4808 Constructor(Date date, long period)]
4810 interface AlarmAbsolute : <ref>Alarm</ref> {
4812 readonly attribute Date date;
4815 readonly attribute long? period;
4818 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
4821 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
4826 This API provides the functionality for scheduling the system alarm.
4827 It allows you to run other applications and have them perform operations at the specific time.
4828 You can schedule an alarm to go off once or to repeat at specific intervals.
4832 Each application has its own individual alarm storage, that is, applications cannot view or edit alarms set by other applications.
4835 Once an alarm goes off, it will be removed from the alarm storage automatically.
4836 <em>AlarmManager</em> provides methods to manage alarms such as adding and removing.
4837 For more information on the Alarm features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/alarm.htm">Alarm Guide</a>.
4844 <Typedef name="AlarmId" id="::Alarm::AlarmId">
4845 <webidl> typedef DOMString AlarmId;</webidl>
4848 An alarm identifier.
4854 <Type type="DOMString"/>
4856 <Interface name="AlarmManagerObject" id="::Alarm::AlarmManagerObject">
4857 <webidl> [NoInterfaceObject] interface AlarmManagerObject {
4858 readonly attribute <ref>AlarmManager</ref> alarm;
4862 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
4863 There will be a <em>tizen.alarm </em>object that allows access to the functionality of the Alarm API.
4869 <ExtendedAttributeList>
4870 <ExtendedAttribute name="NoInterfaceObject">
4871 <webidl>NoInterfaceObject</webidl>
4872 </ExtendedAttribute>
4873 </ExtendedAttributeList>
4874 <Attribute readonly="readonly" name="alarm" id="::Alarm::AlarmManagerObject::alarm">
4875 <webidl> readonly attribute <ref>AlarmManager</ref> alarm;</webidl>
4876 <Type name="AlarmManager"/>
4879 <Implements name1="Tizen" name2="AlarmManagerObject">
4880 <webidl> <ref>Tizen</ref> implements <ref>AlarmManagerObject</ref>;</webidl>
4882 <Interface name="AlarmManager" id="::Alarm::AlarmManager">
4883 <webidl> [NoInterfaceObject] interface AlarmManager {
4885 const long PERIOD_MINUTE = 60;
4888 const long PERIOD_HOUR = 3600;
4891 const long PERIOD_DAY = 86400;
4894 const long PERIOD_WEEK = 604800;
4897 void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);
4900 void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4903 void removeAll() raises(<ref>WebAPIException</ref>);
4906 <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);
4909 <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);
4913 This interface provides methods to manage alarms.
4919 <ExtendedAttributeList>
4920 <ExtendedAttribute name="NoInterfaceObject">
4921 <webidl>NoInterfaceObject</webidl>
4922 </ExtendedAttribute>
4923 </ExtendedAttributeList>
4924 <Const name="PERIOD_MINUTE" value="60" id="::Alarm::AlarmManager::PERIOD_MINUTE">
4925 <webidl> const long PERIOD_MINUTE = 60;</webidl>
4928 The period of a minute.
4929 It defines the number of seconds per minute.
4937 <Const name="PERIOD_HOUR" value="3600" id="::Alarm::AlarmManager::PERIOD_HOUR">
4938 <webidl> const long PERIOD_HOUR = 3600;</webidl>
4941 The period of an hour.
4942 It defines the number of seconds per hour.
4950 <Const name="PERIOD_DAY" value="86400" id="::Alarm::AlarmManager::PERIOD_DAY">
4951 <webidl> const long PERIOD_DAY = 86400;</webidl>
4954 The period of a day.
4955 It defines the number of seconds per day.
4963 <Const name="PERIOD_WEEK" value="604800" id="::Alarm::AlarmManager::PERIOD_WEEK">
4964 <webidl> const long PERIOD_WEEK = 604800;</webidl>
4967 The period of a week.
4968 It defines the number of seconds in a week.
4976 <Operation name="add" id="::Alarm::AlarmManager::add">
4977 <webidl> void add(<ref>Alarm</ref> alarm, <ref>ApplicationId</ref> applicationId, optional <ref>ApplicationControl</ref>? appControl) raises(<ref>WebAPIException</ref>);</webidl>
4980 Adds an alarm to the storage.
4984 Set an alarm with the application ID to be run. You should definitely provide the application ID to run
4985 and the <a href=" ../../org.tizen.web.appprogramming/html/guide/app_guide/application_service.htm">application control </a>information if it is necessary.
4986 For more information about the application contorl, see <a href="../../org.tizen.web.device.apireference/tizen/application.html">The Application API</a>.
4996 http://tizen.org/privilege/alarm
4998 <Code> // Triggers an alarm on a given date/time
4999 var alarm = new tizen.AlarmAbsolute(new Date(2014, 10, 4, 8, 0));
5000 var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view");
5001 tizen.alarm.add(alarm, tizen.application.getCurrentApplication().appInfo.id, appControl);
5002 console.log("Alarm added with id: " + alarm.id);
5007 <Argument name="alarm">
5010 An alarm to add. It can be either <em>AlarmRelative </em> or <em>AlarmAbsolute</em>.
5013 <Type name="Alarm"/>
5015 <Argument name="applicationId">
5018 The application ID to run when the alarm is triggered.
5021 <Type name="ApplicationId"/>
5023 <Argument optional="optional" name="appControl">
5026 The data structure describing application control details.
5029 <Type name="ApplicationControl" nullable="nullable"/>
5033 <RaiseException name="WebAPIException">
5036 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5039 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5042 with error type SecurityError, if the application does not have the privilege to call this method.
5045 with error type UnknownError, if any other error occurs.
5051 <Operation name="remove" id="::Alarm::AlarmManager::remove">
5052 <webidl> void remove(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5055 Removes an alarm from the storage.
5059 If an alarm goes off, it will be removed from the storage automatically.
5069 http://tizen.org/privilege/alarm
5071 <Code> var alarms = tizen.alarm.getAll();
5073 // Removes the first alarm
5074 if (alarms.length > 0) {
5076 tizen.alarm.remove(alarms[0].id);
5077 console.log("Successfully removed the first alarm.");
5079 console.log("Failed to remove the first alarm.");
5086 <Argument name="id">
5089 The ID of the alarm to remove
5092 <Type name="AlarmId"/>
5096 <RaiseException name="WebAPIException">
5099 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5102 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5105 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5108 with error type SecurityError, if the application does not have the privilege to call this method.
5111 with error type UnknownError, if the method cannot be completed because of an unknown error.
5117 <Operation name="removeAll" id="::Alarm::AlarmManager::removeAll">
5118 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
5121 Removes all alarms added by an application.
5125 Because each application has its own alarm storage, this method removes alarms only added by the calling application.
5135 http://tizen.org/privilege/alarm
5137 <Code> tizen.alarm.removeAll();
5138 console.log("remove all registered alarms in the storage.");
5144 <RaiseException name="WebAPIException">
5147 with error type SecurityError, if the application does not have the privilege to call this method.
5150 with error type UnknownError, if the method cannot be completed because of an unknown error.
5156 <Operation name="get" id="::Alarm::AlarmManager::get">
5157 <webidl> <ref>Alarm</ref> get(<ref>AlarmId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
5160 Returns an alarm as per the specified identifier.
5165 <Code> // Sets an alarm
5166 var date = new Date();
5167 date.setHours(date.getHours()+1);
5168 var abs_alarm = new tizen.AlarmAbsolute(date);
5171 tizen.alarm.add(abs_alarm, tizen.application.getCurrentApplication().appInfo.id);
5174 var alarm = tizen.alarm.get(abs_alarm.id);
5175 console.log("The alarm will trigger at " + alarm.getNextScheduledDate());
5181 Alarm An alarm object with the specified ID.
5186 <Argument name="id">
5189 The alarm ID to retrieve.
5192 <Type name="AlarmId"/>
5196 <RaiseException name="WebAPIException">
5199 with error type NotFoundError, if this alarm identifier cannot be found in the storage.
5202 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
5205 with error type InvalidValuesError, if any input parameter does not contain a valid value.
5208 with error type UnknownError, if the method cannot be completed because of an unknown error.
5214 <Operation name="getAll" id="::Alarm::AlarmManager::getAll">
5215 <webidl> <ref>Alarm</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
5218 Retrieves all alarms in an application storage..
5222 Alarms that have already been triggered are removed automatically from the storage.
5228 <Code> var alarms = tizen.alarm.getAll();
5229 console.log(alarms.length + " alarms present in the storage.");
5235 Alarm[] All Alarm objects.
5238 <Type name="Alarm"/>
5242 <RaiseException name="WebAPIException">
5245 with error type UnknownError, if the method cannot be completed because of an unknown error.
5252 <Interface name="Alarm" id="::Alarm::Alarm">
5253 <webidl> [NoInterfaceObject] interface Alarm {
5255 readonly attribute <ref>AlarmId</ref>? id;
5259 This interface is an abstract interface for alarm types.
5265 <ExtendedAttributeList>
5266 <ExtendedAttribute name="NoInterfaceObject">
5267 <webidl>NoInterfaceObject</webidl>
5268 </ExtendedAttribute>
5269 </ExtendedAttributeList>
5270 <Attribute readonly="readonly" name="id" id="::Alarm::Alarm::id">
5271 <webidl> readonly attribute <ref>AlarmId</ref>? id;</webidl>
5274 The alarm identifier.
5280 <Type name="AlarmId" nullable="nullable"/>
5283 <Interface name="AlarmRelative" id="::Alarm::AlarmRelative">
5284 <webidl> [Constructor(long delay, optional long? period)]
5286 interface AlarmRelative : <ref>Alarm</ref> {
5288 readonly attribute long delay;
5291 readonly attribute long? period;
5294 long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);
5298 This interface provides the relative alarm, which occurs at a fixed interval in future.
5302 This alarm triggers after a duration mentioned in <em>delay</em> attribute from the moment the alarm is added.
5303 If a <em>period</em> is provided, the alarm keeps triggering for the given interval.
5309 <Code> // Gets the current application id.
5310 var appId = tizen.application.getCurrentApplication().appInfo.id;
5312 // Sets an alarm in 3 hours from now
5313 var alarm1 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5314 tizen.alarm.add(alarm1, appId);
5316 // Sets an alarm in one hour, recurring after every 2 minutes
5317 var alarm2 = new tizen.AlarmRelative(tizen.alarm.PERIOD_HOUR, 2 * tizen.alarm.PERIOD_MINUTE);
5318 tizen.alarm.add(alarm2, appId);
5321 <ExtendedAttributeList>
5322 <ExtendedAttribute name="Constructor">
5323 <webidl>Constructor(long delay, optional long? period)</webidl>
5325 <Argument name="delay">
5328 <Argument optional="optional" name="period">
5329 <Type type="long" nullable="nullable"/>
5332 </ExtendedAttribute>
5333 </ExtendedAttributeList>
5334 <InterfaceInheritance>
5335 <Name name="Alarm"/>
5336 </InterfaceInheritance>
5337 <Attribute readonly="readonly" name="delay" id="::Alarm::AlarmRelative::delay">
5338 <webidl> readonly attribute long delay;</webidl>
5341 An attribute to store the difference in time (in seconds) between when an alarm is added and it is triggered.
5349 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmRelative::period">
5350 <webidl> readonly attribute long? period;</webidl>
5353 An attribute to store the duration in seconds between each trigger of an alarm.
5354 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5360 <Type type="long" nullable="nullable"/>
5362 <Operation name="getRemainingSeconds" id="::Alarm::AlarmRelative::getRemainingSeconds">
5363 <webidl> long? getRemainingSeconds() raises(<ref>WebAPIException</ref>);</webidl>
5366 Returns duration in seconds before the next alarm is triggered.
5370 If the alarm has expired, this method returns <var>null</var>.
5376 <Code> // Gets the current application id.
5377 var appId = tizen.application.getCurrentApplication().appInfo.id;
5379 // Sets an alarm in 3 hours from now
5380 var alarm = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);
5381 tizen.alarm.add(alarm, appId);
5383 var sec = alarm.getRemainingSeconds();
5384 console.log("remaining time is " + sec);
5387 <Type type="long" nullable="nullable">
5390 long The duration before the next alarm trigger.
5396 <RaiseException name="WebAPIException">
5399 with error type UnknownError, if the method cannot be completed because of an unknown error.
5406 <Interface name="AlarmAbsolute" id="::Alarm::AlarmAbsolute">
5407 <webidl> [Constructor(Date date),
5409 Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek),
5411 Constructor(Date date, long period)]
5413 interface AlarmAbsolute : <ref>Alarm</ref> {
5415 readonly attribute Date date;
5418 readonly attribute long? period;
5421 readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
5424 Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);
5428 This interface provides an absolute alarm, which triggers at a specified absolute date.
5432 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.
5438 <Code> // Gets the current application id.
5439 var appId = tizen.application.getCurrentApplication().appInfo.id;
5441 // Sets an alarm on January 1st 2014 08:00
5442 var date = new Date(2014, 0, 1, 8, 0);
5443 var alarm1 = new tizen.AlarmAbsolute(date);
5444 tizen.alarm.add(alarm1, appId);
5446 // Sets an alarm on January 1st 2014 08:00, repeating every 2 days
5447 var alarm2 = new tizen.AlarmAbsolute(date, 2 * tizen.alarm.PERIOD_DAY);
5448 tizen.alarm.add(alarm2, appId);
5450 // Sets an alarm occurring on every Saturday and Sunday, at 08:00, starting from January 1st 2014
5451 var alarm3 = new tizen.AlarmAbsolute(date, ["SA", "SU"]);
5452 tizen.alarm.add(alarm3, appId);
5455 <ExtendedAttributeList>
5456 <ExtendedAttribute name="Constructor">
5457 <webidl>Constructor(Date date)</webidl>
5459 <Argument name="date">
5463 </ExtendedAttribute>
5464 <ExtendedAttribute name="Constructor">
5465 <webidl> Constructor(Date date, <ref>ByDayValue</ref>[] daysOfTheWeek)</webidl>
5467 <Argument name="date">
5470 <Argument name="daysOfTheWeek">
5472 <Type name="ByDayValue"/>
5476 </ExtendedAttribute>
5477 <ExtendedAttribute name="Constructor">
5478 <webidl> Constructor(Date date, long period)</webidl>
5480 <Argument name="date">
5483 <Argument name="period">
5487 </ExtendedAttribute>
5488 </ExtendedAttributeList>
5489 <InterfaceInheritance>
5490 <Name name="Alarm"/>
5491 </InterfaceInheritance>
5492 <Attribute readonly="readonly" name="date" id="::Alarm::AlarmAbsolute::date">
5493 <webidl> readonly attribute Date date;</webidl>
5496 An attribute to store the absolute date/time when the alarm is initially triggered.
5500 This attribute is precise to the second. Milliseconds will be ignored.
5509 <Attribute readonly="readonly" name="period" id="::Alarm::AlarmAbsolute::period">
5510 <webidl> readonly attribute long? period;</webidl>
5513 An attribute to store the duration in seconds between each trigger of the alarm.
5517 By default, this attribute is set to <var>null</var>, indicating that this alarm does not repeat.
5518 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5525 <Type type="long" nullable="nullable"/>
5527 <Attribute readonly="readonly" name="daysOfTheWeek" id="::Alarm::AlarmAbsolute::daysOfTheWeek">
5528 <webidl> readonly attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
5531 An attribute to store the days of the week associated with the recurrence rule.
5535 By default, this attribute is set to an empty array.
5536 The <em>period</em> and <em>daysOfTheWeek</em> attributes are mutually exclusive.
5544 <Type name="ByDayValue"/>
5547 <Operation name="getNextScheduledDate" id="::Alarm::AlarmAbsolute::getNextScheduledDate">
5548 <webidl> Date? getNextScheduledDate() raises(<ref>WebAPIException</ref>);</webidl>
5551 Returns the date / time of the next alarm trigger.
5555 If the alarm has expired, this method returns <var>null</var>. The returned date is precise to the second.
5561 <Code> // Gets the current application id.
5562 var appId = tizen.application.getCurrentApplication().appInfo.id;
5564 // Sets an alarm on January 1st 2014 08:00
5565 var date = new Date(2014, 0, 1, 8, 0);
5566 var alarm1 = new tizen.AlarmAbsolute(date);
5567 tizen.alarm.add(alarm1, appId);
5569 var date = alarm1.getNextScheduledDate();
5570 console.log("next scheduled time is " + date);
5573 <Type type="Date" nullable="nullable">
5576 Date The date/time of the next alarm trigger.
5582 <RaiseException name="WebAPIException">
5585 with error type UnknownError, if the method cannot be completed because of an unknown error.
5593 <Module name="Application" id="::Application">
5594 <webidl>module Application {
5596 typedef DOMString ApplicationId;
5598 typedef DOMString ApplicationContextId;
5600 [NoInterfaceObject] interface ApplicationManagerObject {
5601 readonly attribute <ref>ApplicationManager</ref> application;
5603 <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;
5605 [NoInterfaceObject] interface ApplicationManager {
5607 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5609 void kill(<ref>ApplicationContextId</ref> contextId,
5610 optional <ref>SuccessCallback</ref>? successCallback,
5611 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5613 void launch(<ref>ApplicationId</ref> id,
5614 optional <ref>SuccessCallback</ref>? successCallback,
5615 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5617 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5618 optional <ref>ApplicationId</ref>? id,
5619 optional <ref>SuccessCallback</ref>? successCallback,
5620 optional <ref>ErrorCallback</ref>? errorCallback,
5621 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5623 void findAppControl(<ref>ApplicationControl</ref> appControl,
5624 <ref>FindAppControlSuccessCallback</ref> successCallback,
5625 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5627 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5628 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5630 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5632 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5633 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5635 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5637 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5639 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5641 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5643 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5645 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5649 [NoInterfaceObject] interface Application {
5651 readonly attribute <ref>ApplicationInformation</ref> appInfo;
5653 readonly attribute <ref>ApplicationContextId</ref> contextId;
5655 void exit() raises(<ref>WebAPIException</ref>);
5657 void hide() raises(<ref>WebAPIException</ref>);
5659 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
5663 [NoInterfaceObject] interface ApplicationInformation {
5665 readonly attribute <ref>ApplicationId</ref> id;
5667 readonly attribute DOMString name;
5669 readonly attribute DOMString iconPath;
5671 readonly attribute DOMString version;
5673 readonly attribute boolean show;
5675 readonly attribute DOMString[] categories;
5677 readonly attribute Date installDate;
5679 readonly attribute long size raises(<ref>WebAPIException</ref>);
5681 readonly attribute <ref>PackageId</ref> packageId;
5684 [NoInterfaceObject] interface ApplicationContext {
5686 readonly attribute <ref>ApplicationContextId</ref> id;
5688 readonly attribute <ref>ApplicationId</ref> appId;
5692 [Constructor(DOMString key, DOMString[] value)]
5693 interface ApplicationControlData {
5695 attribute DOMString key;
5697 attribute DOMString[] value;
5701 [Constructor(DOMString operation, optional DOMString? uri,
5702 optional DOMString? mime, optional DOMString? category,
5703 optional <ref>ApplicationControlData</ref>[]? data)]
5704 interface ApplicationControl {
5706 attribute DOMString operation;
5708 attribute DOMString? uri;
5710 attribute DOMString? mime;
5712 attribute DOMString? category;
5714 attribute <ref>ApplicationControlData</ref>[] data;
5718 [NoInterfaceObject] interface RequestedApplicationControl {
5720 readonly attribute <ref>ApplicationControl</ref> appControl;
5722 readonly attribute <ref>ApplicationId</ref> callerAppId;
5724 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
5726 void replyFailure() raises(<ref>WebAPIException</ref>);
5731 [NoInterfaceObject] interface ApplicationCertificate {
5733 readonly attribute DOMString type;
5735 readonly attribute DOMString value;
5740 [NoInterfaceObject] interface ApplicationMetaData {
5742 readonly attribute DOMString key;
5744 readonly attribute DOMString value;
5749 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
5750 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
5753 [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
5754 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
5757 [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
5758 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
5761 [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
5762 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
5767 [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
5768 void oninstalled(<ref>ApplicationInformation</ref> info);
5770 void onupdated(<ref>ApplicationInformation</ref> info);
5772 void onuninstalled(<ref>ApplicationId</ref> id);
5778 This API provides a way to launch other applications and access
5779 application management.
5783 The <em>ApplicationManager</em> interface also provides methods to launch other applications
5784 explicitly and implicitly through the <em>ApplicationControl</em> interface.
5785 The <em>ApplicationControl</em> interface consists of an operation, URI, and MIME type
5786 and also describes an action to be performed by other
5787 applications and can carry the result from the subsequent application.
5788 The <em>ApplicationManager</em> interface also provides methods to handle the application
5789 lifecycle, to access the installed applications on the device, and to let
5790 an application be notified of a change in the application list.
5793 The <em>Application</em> interface defines the current application's information and
5794 the basic operations for current application such as exit or hide.
5797 For more information on the Application features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/application.htm">Application Guide</a>.
5804 <Typedef name="ApplicationId" id="::Application::ApplicationId">
5805 <webidl> typedef DOMString ApplicationId;</webidl>
5808 The unique ID for an installed application.
5814 <Type type="DOMString"/>
5816 <Typedef name="ApplicationContextId" id="::Application::ApplicationContextId">
5817 <webidl> typedef DOMString ApplicationContextId;</webidl>
5820 The unique ID for a running application.
5826 <Type type="DOMString"/>
5828 <Interface name="ApplicationManagerObject" id="::Application::ApplicationManagerObject">
5829 <webidl> [NoInterfaceObject] interface ApplicationManagerObject {
5830 readonly attribute <ref>ApplicationManager</ref> application;
5834 This interface defines what is instantiated by the <em>Tizen </em>object by the Tizen Platform.
5838 There will be a <em>tizen.application </em>object that allows access to Application API functionality.
5845 <ExtendedAttributeList>
5846 <ExtendedAttribute name="NoInterfaceObject">
5847 <webidl>NoInterfaceObject</webidl>
5848 </ExtendedAttribute>
5849 </ExtendedAttributeList>
5850 <Attribute readonly="readonly" name="application" id="::Application::ApplicationManagerObject::application">
5851 <webidl> readonly attribute <ref>ApplicationManager</ref> application;</webidl>
5852 <Type name="ApplicationManager"/>
5855 <Implements name1="Tizen" name2="ApplicationManagerObject">
5856 <webidl> <ref>Tizen</ref> implements <ref>ApplicationManagerObject</ref>;</webidl>
5858 <Interface name="ApplicationManager" id="::Application::ApplicationManager">
5859 <webidl> [NoInterfaceObject] interface ApplicationManager {
5861 <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);
5863 void kill(<ref>ApplicationContextId</ref> contextId,
5864 optional <ref>SuccessCallback</ref>? successCallback,
5865 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5867 void launch(<ref>ApplicationId</ref> id,
5868 optional <ref>SuccessCallback</ref>? successCallback,
5869 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5871 void launchAppControl(<ref>ApplicationControl</ref> appControl,
5872 optional <ref>ApplicationId</ref>? id,
5873 optional <ref>SuccessCallback</ref>? successCallback,
5874 optional <ref>ErrorCallback</ref>? errorCallback,
5875 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);
5877 void findAppControl(<ref>ApplicationControl</ref> appControl,
5878 <ref>FindAppControlSuccessCallback</ref> successCallback,
5879 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5881 void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
5882 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5884 <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);
5886 void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
5887 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
5889 <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5891 <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5893 DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5895 <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);
5897 long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
5899 void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);
5904 This section defines the application manager interface.
5910 <ExtendedAttributeList>
5911 <ExtendedAttribute name="NoInterfaceObject">
5912 <webidl>NoInterfaceObject</webidl>
5913 </ExtendedAttribute>
5914 </ExtendedAttributeList>
5915 <Operation name="getCurrentApplication" id="::Application::ApplicationManager::getCurrentApplication">
5916 <webidl> <ref>Application</ref> getCurrentApplication() raises(<ref>WebAPIException</ref>);</webidl>
5919 Gets the <em>Application </em>object defining the current application.
5924 <Code> var app = tizen.application.getCurrentApplication();
5925 console.log("Current application's app id is " + app.appInfo.id);
5928 <Type name="Application">
5931 Application The data structure that defines current application.
5937 <RaiseException name="WebAPIException">
5940 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
5946 <Operation name="kill" id="::Application::ApplicationManager::kill">
5947 <webidl> void kill(<ref>ApplicationContextId</ref> contextId,
5948 optional <ref>SuccessCallback</ref>? successCallback,
5949 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
5952 Kills an application with the specified application context ID.
5956 The <em>ErrorCallback() </em>is launched with these error types:
5960 NotFoundError - If the context is not found with specified context ID. </li>
5962 InvalidValuesError - If any of the input parameters contain an invalid value
5963 or if the specified context ID matches the context ID of the calling application. </li>
5965 UnknownError - If any other error occurs. </li>
5975 http://tizen.org/privilege/appmanager.kill
5977 <Code> function onKillSuccess() {
5978 console.log("Application terminated successfully");
5981 function onRunningAppsContext(contexts) {
5982 // let's assume that the application "targetApp0.main" has been installed.
5983 var targetId = "targetApp0.main";
5985 for (var i = 0; i < contexts.length; i++) {
5986 if (contexts[i].appId == targetId) {
5987 tizen.application.kill(contexts[i].id, onKillSuccess);
5992 tizen.application.getAppsContext(onRunningAppsContext);
5997 <Argument name="contextId">
6000 The identifier of the application to kill
6003 <Type name="ApplicationContextId"/>
6005 <Argument optional="optional" name="successCallback">
6008 The method to invoke when an application is killed successfully.
6011 <Type name="SuccessCallback" nullable="nullable"/>
6013 <Argument optional="optional" name="errorCallback">
6016 The method to invoke when an error occurs.
6019 <Type name="ErrorCallback" nullable="nullable"/>
6023 <RaiseException name="WebAPIException">
6026 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6029 with error type SecurityError, if the application does not have the privilege to call this method.
6035 <Operation name="launch" id="::Application::ApplicationManager::launch">
6036 <webidl> void launch(<ref>ApplicationId</ref> id,
6037 optional <ref>SuccessCallback</ref>? successCallback,
6038 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6041 Launches an application with the given application ID.
6045 The <em>ErrorCallback()</em> is launched with these error types:
6049 NotFoundError - If the application is not found with given ID. </li>
6051 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6053 UnknownError - If any other error occurs. </li>
6063 http://tizen.org/privilege/application.launch
6065 <Code> function onsuccess() {
6066 console.log("The application has launched successfully");
6069 // let's assume that application "targetApp0.main" has been installed
6070 tizen.application.launch("targetApp0.main", onsuccess);
6075 <Argument name="id">
6078 A unique string representing application ID.
6081 <Type name="ApplicationId"/>
6083 <Argument optional="optional" name="successCallback">
6086 The method to call when the invocation ends successfully.
6089 <Type name="SuccessCallback" nullable="nullable"/>
6091 <Argument optional="optional" name="errorCallback">
6094 The method to call when an error occurs.
6097 <Type name="ErrorCallback" nullable="nullable"/>
6101 <RaiseException name="WebAPIException">
6104 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6107 with error type SecurityError, if the application does not have the privilege to call this method.
6113 <Operation name="launchAppControl" id="::Application::ApplicationManager::launchAppControl">
6114 <webidl> void launchAppControl(<ref>ApplicationControl</ref> appControl,
6115 optional <ref>ApplicationId</ref>? id,
6116 optional <ref>SuccessCallback</ref>? successCallback,
6117 optional <ref>ErrorCallback</ref>? errorCallback,
6118 optional <ref>ApplicationControlDataArrayReplyCallback</ref>? replyCallback) raises(<ref>WebAPIException</ref>);</webidl>
6121 Launches an application with the specified application control.
6125 An application can launch other applications with the application control,
6126 and get back the results from the launched applications.
6129 The application control consists of an operation, URI, and MIME type, and describes
6130 the request to be performed by the newly launched application. The
6131 application control is passed to the <em>launchAppControl()</em> method to launch an
6132 application. The system tries to find the proper application
6133 to perform the requested application control, then launches the selected application.
6136 The application control request is passed to the newly launched application
6137 and it can be accessed by <em>getRequestedAppControl() </em>method. The passed
6138 application control contains the reason the application was launched and
6139 information about what the application is doing. The launched application
6140 can send a result to the caller application with the <em>replyResult() </em>method of
6141 <em>RequestedApplicationControl</em> interface.
6144 The <em>ErrorCallback() </em>is launched with these error types:
6148 NotFoundError - If system cannot find the application that matches the specified application control. </li>
6150 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6152 UnknownError: If any other error occurs. </li>
6162 http://tizen.org/privilege/application.launch
6164 <Code> var appControl = new tizen.ApplicationControl(
6165 "http://tizen.org/appcontrol/operation/pick",
6167 "image/jpeg",
6170 var appControlReplyCallback = {
6171 // callee sent a reply
6172 onsuccess: function(data) {
6173 for (var i = 0; i < data.length; i++) {
6174 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6175 console.log('Selected image is ' + data[i].value[0]);
6179 // callee returned failure
6180 onfailure: function() {
6181 console.log('The launch application control failed');
6185 tizen.application.launchAppControl(
6188 function() {console.log("launch application control succeed"); },
6189 function(e) {console.log("launch application control failed. reason: " + e.message); },
6190 appControlReplyCallback );
6195 <Argument name="appControl">
6198 The data structure describing application control details.
6201 <Type name="ApplicationControl"/>
6203 <Argument optional="optional" name="id">
6206 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.
6209 <Type name="ApplicationId" nullable="nullable"/>
6211 <Argument optional="optional" name="successCallback">
6214 The method to call when the invocation ends successfully.
6217 <Type name="SuccessCallback" nullable="nullable"/>
6219 <Argument optional="optional" name="errorCallback">
6222 The method to invoke when an error occurs.
6225 <Type name="ErrorCallback" nullable="nullable"/>
6227 <Argument optional="optional" name="replyCallback">
6230 The method to invoke when the application gets back results from the launched application.
6233 <Type name="ApplicationControlDataArrayReplyCallback" nullable="nullable"/>
6237 <RaiseException name="WebAPIException">
6240 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6243 with error type SecurityError, if the application does not have the privilege to call this method.
6249 <Operation name="findAppControl" id="::Application::ApplicationManager::findAppControl">
6250 <webidl> void findAppControl(<ref>ApplicationControl</ref> appControl,
6251 <ref>FindAppControlSuccessCallback</ref> successCallback,
6252 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6255 Finds application information can be launched with the given application control.
6259 An application can get a list of other applications can be launched with the application control.
6262 The <em>ErrorCallback()<em> is launched with these error types:
6266 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
6268 UnknownError - If any other error occurs. </li>
6274 <Code> var appControl = new tizen.ApplicationControl(
6275 "http://tizen.org/appcontrol/operation/pick",
6277 "image/jpeg",
6280 function successCB(appInfos, appControl)
6282 // em>appControl/em> is same object with the value passed as first parameter to em>findAppControl()/em>
6283 var appControlReplyCallback = {
6284 // callee sent a reply
6285 onsuccess: function(data) {
6286 for (var i = 0; i < data.length; i++) {
6287 if (data[i].key == "http://tizen.org/appcontrol/data/selected") {
6288 console.log('Selected image is ' + data[i].value[0]);
6292 // callee returned failure
6293 onfailure: function() {
6294 console.log('The launch application control failed');
6298 var appId = appInfos[0].id; // select first app's id
6300 tizen.application.launchAppControl(
6303 function() {console.log("launch application control succeed"); },
6304 function(e) {console.log("launch application control failed. reason: " + e.message); },
6305 appControlReplyCallback );
6308 tizen.application.findAppControl(appControl, successCB);
6313 <Argument name="appControl">
6316 A data structure describing application control details.
6319 <Type name="ApplicationControl"/>
6321 <Argument name="successCallback">
6324 The method to call that returns a list of application information.
6327 <Type name="FindAppControlSuccessCallback"/>
6329 <Argument optional="optional" name="errorCallback">
6332 The method to call when an error occurs.
6335 <Type name="ErrorCallback" nullable="nullable"/>
6339 <RaiseException name="WebAPIException">
6342 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6348 <Operation name="getAppsContext" id="::Application::ApplicationManager::getAppsContext">
6349 <webidl> void getAppsContext(<ref>ApplicationContextArraySuccessCallback</ref> successCallback,
6350 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6353 Gets a list of application contexts for applications that are currently running on a device.
6354 The information contained for each application corresponds to the application state at the time when the list was generated.
6358 The <em>errorCallback()</em> is launched with this error type:
6362 UnknownError - If an unknown error occurs. </li>
6368 <Code> function onRunningAppsContext(contexts) {
6369 for (var i = 0; i < contexts.length; i++)
6370 console.log("ID : " + contexts[i].id);
6373 tizen.application.getAppsContext(onRunningAppsContext);
6378 <Argument name="successCallback">
6381 The method to call when the invocation ends successfully.
6384 <Type name="ApplicationContextArraySuccessCallback"/>
6386 <Argument optional="optional" name="errorCallback">
6389 The method to call when an error occurs.
6392 <Type name="ErrorCallback" nullable="nullable"/>
6396 <RaiseException name="WebAPIException">
6399 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6405 <Operation name="getAppContext" id="::Application::ApplicationManager::getAppContext">
6406 <webidl> <ref>ApplicationContext</ref> getAppContext(optional <ref>ApplicationContextId</ref>? contextId) raises(<ref>WebAPIException</ref>);</webidl>
6409 Gets the application context for the specified application context ID.
6410 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.
6411 The list of running applications and their application IDs is obtained with <em>getAppsContext()</em>.
6416 <Code> var appContext = tizen.application.getAppContext(null);
6417 console.log("Application context retrieved for app " + appContext.appId);
6420 <Type name="ApplicationContext">
6423 ApplicationContext A data structure that lists running application details.
6428 <Argument optional="optional" name="contextId">
6431 A string representing an application context ID. If the ID is not provided, the application context of the calling application will be returned.
6434 <Type name="ApplicationContextId" nullable="nullable"/>
6438 <RaiseException name="WebAPIException">
6441 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6444 with error type NotFoundError, if the application context is not found with provided ID.
6447 with error type UnknownError, if the application context cannot be retrieved because of an unknown error.
6453 <Operation name="getAppsInfo" id="::Application::ApplicationManager::getAppsInfo">
6454 <webidl> void getAppsInfo(<ref>ApplicationInformationArraySuccessCallback</ref> successCallback,
6455 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
6458 Gets the list of installed application's information on a device.
6459 The information contained on each application corresponds to the application state at the moment when the list was generated.
6463 The <em>errorCallback()</em> is launched with this error type:
6467 UnknownError - If an unknown error occurs. </li>
6473 <Code> function onListInstalledApps(applications) {
6474 for (var i = 0; i < applications.length; i++)
6475 console.log("ID : " + applications[i].id);
6478 tizen.application.getAppsInfo(onListInstalledApps);
6483 <Argument name="successCallback">
6486 The method to call when the invocation ends successfully.
6489 <Type name="ApplicationInformationArraySuccessCallback"/>
6491 <Argument optional="optional" name="errorCallback">
6494 The method to call when an error occurs.
6497 <Type name="ErrorCallback" nullable="nullable"/>
6501 <RaiseException name="WebAPIException">
6504 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6510 <Operation name="getAppInfo" id="::Application::ApplicationManager::getAppInfo">
6511 <webidl> <ref>ApplicationInformation</ref> getAppInfo(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6514 Gets application information for a specified application ID.
6518 If the ID is set to <var>null</var> or not set at all, it returns application information for the current application.
6519 The list of installed applications and their application IDs is obtained with <em>getAppsInfo()</em>.
6525 <Code> var appInfo = tizen.application.getAppInfo(null);
6526 console.log("Current application name : " + appInfo.name);
6529 <Type name="ApplicationInformation">
6532 ApplicationInformation The information of an application.
6537 <Argument optional="optional" name="id">
6540 A string representing application ID. If the ID is not provided, the application information of the calling application will be returned.
6543 <Type name="ApplicationId" nullable="nullable"/>
6547 <RaiseException name="WebAPIException">
6550 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6553 with error type NotFoundError, if the application is not found with specified ID.
6556 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6562 <Operation name="getAppCerts" id="::Application::ApplicationManager::getAppCerts">
6563 <webidl> <ref>ApplicationCertificate</ref>[] getAppCerts(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6566 Gets application certificates for a specified application ID.
6570 If the ID is set to <var>null</var> or not set at all, it returns application certificates for the current application.
6573 The certificate types are listed below
6577 AUTHOR_ROOT - Author Root Certificate </li>
6579 AUTHOR_INTERMEDIATE - Author Intermediate Certificate </li>
6581 AUTHOR_SIGNER - Author Signer Certificate </li>
6583 DISTRIBUTOR_ROOT - Distributor Root Certificate </li>
6585 DISTRIBUTOR_INTERMEDIATE - Distributor Intermediate Certificate </li>
6587 DISTRIBUTOR_SIGNER - Distributor Signer Certificate </li>
6589 DISTRIBUTOR2_ROOT - Distributor2 Root Certificate </li>
6591 DISTRIBUTOR2_INTERMEDIATE - Distributor2 Intermediate Certificate </li>
6593 DISTRIBUTOR2_SIGNER - Distributor2 Signer Certificate </li>
6603 http://tizen.org/privilege/appmanager.certificate
6605 <Code> var appCerts = tizen.application.getAppCerts(null);
6607 for (var i = 0; i < appCerts.length; i++) {
6608 console.log("#" + i + " type:" + appCerts[i].type);
6609 console.log("#" + i + " value:" + appCerts[i].value);
6616 ApplicationCertificate[] Array of certificate information of a specified application
6619 <Type name="ApplicationCertificate"/>
6622 <Argument optional="optional" name="id">
6625 A string representing application ID. If the ID is not provided, the application certificate of the calling application will be returned.
6628 <Type name="ApplicationId" nullable="nullable"/>
6632 <RaiseException name="WebAPIException">
6635 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6638 with error type SecurityError, if the application does not have the privilege to call this method.
6641 with error type NotFoundError, if the application is not found with specified ID.
6644 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6650 <Operation name="getAppSharedURI" id="::Application::ApplicationManager::getAppSharedURI">
6651 <webidl> DOMString getAppSharedURI(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6654 Gets URI of read-only shared directory of application for a specified application ID.
6658 The shared directory is used to export data to other applications.
6659 If the ID is set to <var>null</var> or not set at all, it returns shared directory URI for the current application.
6665 <Code> var sharedDir = tizen.application.getAppSharedURI(null);
6666 console.log("shared directory : " + sharedDir);
6669 <Type type="DOMString">
6672 DOMString The shared directory URI of application
6677 <Argument optional="optional" name="id">
6680 A string representing application ID. If the ID is not provided, the shared directory URI of the calling application will be returned.
6683 <Type name="ApplicationId" nullable="nullable"/>
6687 <RaiseException name="WebAPIException">
6690 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6693 with error type NotFoundError, if the application is not found with specified ID.
6696 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6702 <Operation name="getAppMetaData" id="::Application::ApplicationManager::getAppMetaData">
6703 <webidl> <ref>ApplicationMetaData</ref>[] getAppMetaData(optional <ref>ApplicationId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
6706 Gets application meta data array for a specified application ID.
6710 If the ID is set to <var>null</var> or not set at all, it returns application meta data array for the current application.
6720 http://tizen.org/privilege/application.info
6722 <Code> var metaDataArray = tizen.application.getAppMetaData(null);
6723 console.log("size of metadata : " + metaDataArray.length);
6730 ApplicationMetaData[] Array of meta data of a specified application. If there are no meta data for a specified application,
6731 empty array will be returned
6734 <Type name="ApplicationMetaData"/>
6737 <Argument optional="optional" name="id">
6740 A string representing application ID. If the ID is not provided, the application metadata array of the calling application will be returned.
6743 <Type name="ApplicationId" nullable="nullable"/>
6747 <RaiseException name="WebAPIException">
6750 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6753 with error type SecurityError, if the application does not have the privilege to call this method.
6756 with error type NotFoundError, if the application is not found with specified ID.
6759 with error type UnknownError, if the application cannot be retrieved because of an unknown error.
6765 <Operation name="addAppInfoEventListener" id="::Application::ApplicationManager::addAppInfoEventListener">
6766 <webidl> long addAppInfoEventListener(<ref>ApplicationInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
6769 Adds a listener for receiving any notification for changes in the list of the installed applications
6774 It install a callback that is triggered every time a change occurs on
6775 the list of installed applications on a device. This change may
6776 be occurred by a new installation, uninstallation, or update of an application.
6779 When executed, the implementation must immediately return a listener
6780 ID that identifies the listener. After returning the ID, the change
6781 detection operation is started asynchronously.
6784 The <em>ApplicationInformationEventCallback </em>must be invoked every time a new
6785 application is installed, removed, or updated.
6788 The change detection must continue until the <em>removeAppInfoEventListener()</em> method is called
6789 with the corresponding listener identifier.
6795 <Code> var appEventCallback = {
6796 oninstalled: function(appInfo) {
6797 console.log('The application ' + appInfo.name + ' is installed');
6799 onupdated: function(appInfo) {
6800 console.log('The application ' + appInfo.name + ' is updated');
6802 onuninstalled: function(appid) {
6803 console.log('The application ' + appid + ' is uninstalled');
6806 var watchId = tizen.application.addAppInfoEventListener(appEventCallback);
6812 long ID of the listener that can be used to remove the listener later.
6817 <Argument name="eventCallback">
6820 The method to call when a change on the installed applications is made.
6823 <Type name="ApplicationInformationEventCallback"/>
6827 <RaiseException name="WebAPIException">
6830 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6833 with error type UnknownError, if fails to add listener because of an unknown error.
6839 <Operation name="removeAppInfoEventListener" id="::Application::ApplicationManager::removeAppInfoEventListener">
6840 <webidl> void removeAppInfoEventListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
6843 Removes the listener to stop receiving notifications for changes on the list of installed
6844 applications on a device.
6849 <Code> tizen.application.removeAppInfoEventListener(watchId);
6854 <Argument name="watchId">
6857 An ID that identifies the listener.
6864 <RaiseException name="WebAPIException">
6867 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
6870 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
6873 with error type NotFoundError, if the listener is not found with specified ID.
6876 with error type UnknownError, if fails to remove listener because of an unknown error.
6883 <Interface name="Application" id="::Application::Application">
6884 <webidl> [NoInterfaceObject] interface Application {
6886 readonly attribute <ref>ApplicationInformation</ref> appInfo;
6888 readonly attribute <ref>ApplicationContextId</ref> contextId;
6890 void exit() raises(<ref>WebAPIException</ref>);
6892 void hide() raises(<ref>WebAPIException</ref>);
6894 <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);
6898 This interface defines the current application's information and
6899 the basic operations (such as exit or hide) for the current application .
6905 <ExtendedAttributeList>
6906 <ExtendedAttribute name="NoInterfaceObject">
6907 <webidl>NoInterfaceObject</webidl>
6908 </ExtendedAttribute>
6909 </ExtendedAttributeList>
6910 <Attribute readonly="readonly" name="appInfo" id="::Application::Application::appInfo">
6911 <webidl> readonly attribute <ref>ApplicationInformation</ref> appInfo;</webidl>
6914 An attribute to store the application information for the current application.
6920 <Type name="ApplicationInformation"/>
6922 <Attribute readonly="readonly" name="contextId" id="::Application::Application::contextId">
6923 <webidl> readonly attribute <ref>ApplicationContextId</ref> contextId;</webidl>
6926 An attribute to store the ID of a running application.
6932 <Type name="ApplicationContextId"/>
6934 <Operation name="exit" id="::Application::Application::exit">
6935 <webidl> void exit() raises(<ref>WebAPIException</ref>);</webidl>
6938 Exits the current application.
6943 <Code> var app = tizen.application.getCurrentApplication();
6951 <RaiseException name="WebAPIException">
6954 with error type UnknownError, if any other error occurs.
6960 <Operation name="hide" id="::Application::Application::hide">
6961 <webidl> void hide() raises(<ref>WebAPIException</ref>);</webidl>
6964 Hides the current application.
6969 <Code> var app = tizen.application.getCurrentApplication();
6977 <RaiseException name="WebAPIException">
6980 with error type UnknownError, if any other error occurs.
6986 <Operation name="getRequestedAppControl" id="::Application::Application::getRequestedAppControl">
6987 <webidl> <ref>RequestedApplicationControl</ref> getRequestedAppControl() raises(<ref>WebAPIException</ref>);</webidl>
6990 Gets the requested application control passed to the current application.
6994 Gets the requested application control that contains the application control
6995 passed by the <em>launchAppControl()</em> method from the calling application.
6996 The requested application control contains the reason the application
6997 was launched and what it has to perform. For example, an application
6998 might be launched to display an image on a page by other
6999 application's request. In all of these cases, the application is
7000 responsible for checking the contents of the application control and responding
7001 appropriately when it is launched.
7007 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7009 if (reqAppControl) {
7010 console.log("Requester AppID : " + reqAppControl.callerAppId);
7014 <Type name="RequestedApplicationControl">
7017 RequestedApplicationControl The details of an requested application control
7023 <RaiseException name="WebAPIException">
7026 with error type UnknownError, if the application control cannot be retrieved because of an unknown error.
7033 <Interface name="ApplicationInformation" id="::Application::ApplicationInformation">
7034 <webidl> [NoInterfaceObject] interface ApplicationInformation {
7036 readonly attribute <ref>ApplicationId</ref> id;
7038 readonly attribute DOMString name;
7040 readonly attribute DOMString iconPath;
7042 readonly attribute DOMString version;
7044 readonly attribute boolean show;
7046 readonly attribute DOMString[] categories;
7048 readonly attribute Date installDate;
7050 readonly attribute long size raises(<ref>WebAPIException</ref>);
7052 readonly attribute <ref>PackageId</ref> packageId;
7056 This interface defines the general information available to an installed application.
7062 <ExtendedAttributeList>
7063 <ExtendedAttribute name="NoInterfaceObject">
7064 <webidl>NoInterfaceObject</webidl>
7065 </ExtendedAttribute>
7066 </ExtendedAttributeList>
7067 <Attribute readonly="readonly" name="id" id="::Application::ApplicationInformation::id">
7068 <webidl> readonly attribute <ref>ApplicationId</ref> id;</webidl>
7071 An attribute to store the identifier of an application for application management.
7077 <Type name="ApplicationId"/>
7079 <Attribute readonly="readonly" name="name" id="::Application::ApplicationInformation::name">
7080 <webidl> readonly attribute DOMString name;</webidl>
7083 An attribute to store the name of an application.
7089 <Type type="DOMString"/>
7091 <Attribute readonly="readonly" name="iconPath" id="::Application::ApplicationInformation::iconPath">
7092 <webidl> readonly attribute DOMString iconPath;</webidl>
7095 An attribute to store the icon path of an application.
7101 <Type type="DOMString"/>
7103 <Attribute readonly="readonly" name="version" id="::Application::ApplicationInformation::version">
7104 <webidl> readonly attribute DOMString version;</webidl>
7107 An attribute to store the version of an application.
7113 <Type type="DOMString"/>
7115 <Attribute readonly="readonly" name="show" id="::Application::ApplicationInformation::show">
7116 <webidl> readonly attribute boolean show;</webidl>
7119 An attribute that determines whether the application information should
7120 be shown (such as in the menus) or not.
7126 <Type type="boolean"/>
7128 <Attribute readonly="readonly" name="categories" id="::Application::ApplicationInformation::categories">
7129 <webidl> readonly attribute DOMString[] categories;</webidl>
7132 An array of attributes to store the categories that the app belongs to.
7139 <Type type="DOMString"/>
7142 <Attribute readonly="readonly" name="installDate" id="::Application::ApplicationInformation::installDate">
7143 <webidl> readonly attribute Date installDate;</webidl>
7146 An attribute to store the application install/update time.
7154 <Attribute readonly="readonly" name="size" id="::Application::ApplicationInformation::size">
7155 <webidl> readonly attribute long size raises(<ref>WebAPIException</ref>);</webidl>
7158 An attribute to store the application size (installed space).
7167 http://tizen.org/privilege/application.info
7172 <RaiseException name="WebAPIException">
7175 with error type SecurityError, if this attribute is not allowed.
7181 <Attribute readonly="readonly" name="packageId" id="::Application::ApplicationInformation::packageId">
7182 <webidl> readonly attribute <ref>PackageId</ref> packageId;</webidl>
7185 An attribute to store the package ID of application.
7191 <Type name="PackageId"/>
7194 <Interface name="ApplicationContext" id="::Application::ApplicationContext">
7195 <webidl> [NoInterfaceObject] interface ApplicationContext {
7197 readonly attribute <ref>ApplicationContextId</ref> id;
7199 readonly attribute <ref>ApplicationId</ref> appId;
7204 This interface defines the information available about a running
7211 <ExtendedAttributeList>
7212 <ExtendedAttribute name="NoInterfaceObject">
7213 <webidl>NoInterfaceObject</webidl>
7214 </ExtendedAttribute>
7215 </ExtendedAttributeList>
7216 <Attribute readonly="readonly" name="id" id="::Application::ApplicationContext::id">
7217 <webidl> readonly attribute <ref>ApplicationContextId</ref> id;</webidl>
7220 An attribute to store the ID of a running application.
7226 <Type name="ApplicationContextId"/>
7228 <Attribute readonly="readonly" name="appId" id="::Application::ApplicationContext::appId">
7229 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
7232 An attribute to store the ID of an installed application.
7238 <Type name="ApplicationId"/>
7241 <Interface name="ApplicationControlData" id="::Application::ApplicationControlData">
7242 <webidl> [Constructor(DOMString key, DOMString[] value)]
7243 interface ApplicationControlData {
7245 attribute DOMString key;
7247 attribute DOMString[] value;
7252 This interface defines a key/value pair used to pass data
7253 between applications through the <em>ApplicationControl </em>interface.
7258 <Code> var appControlData = new tizen.ApplicationControlData("image", [imagedata1]);
7261 <ExtendedAttributeList>
7262 <ExtendedAttribute name="Constructor">
7263 <webidl>Constructor(DOMString key, DOMString[] value)</webidl>
7265 <Argument name="key">
7266 <Type type="DOMString"/>
7268 <Argument name="value">
7270 <Type type="DOMString"/>
7274 </ExtendedAttribute>
7275 </ExtendedAttributeList>
7276 <Attribute name="key" id="::Application::ApplicationControlData::key">
7277 <webidl> attribute DOMString key;</webidl>
7280 An attribute to store the name of a key.
7286 <Type type="DOMString"/>
7288 <Attribute name="value" id="::Application::ApplicationControlData::value">
7289 <webidl> attribute DOMString[] value;</webidl>
7292 An attribute to store the value associated with a key.
7299 <Type type="DOMString"/>
7303 <Interface name="ApplicationControl" id="::Application::ApplicationControl">
7304 <webidl> [Constructor(DOMString operation, optional DOMString? uri,
7305 optional DOMString? mime, optional DOMString? category,
7306 optional <ref>ApplicationControlData</ref>[]? data)]
7307 interface ApplicationControl {
7309 attribute DOMString operation;
7311 attribute DOMString? uri;
7313 attribute DOMString? mime;
7315 attribute DOMString? category;
7317 attribute <ref>ApplicationControlData</ref>[] data;
7322 This interface consists of an operation, URI, MIME type,
7323 and data. It describes an action to be performed by other applications
7324 and is passed to launch other applications.
7325 If the system gets the application control request, it finds
7326 the corresponding application to be launched with the delivered application control
7327 and launches the selected application.
7332 <Code> var appControl =
7333 new tizen.ApplicationControl(
7334 "http://tizen.org/appcontrol/operation/view",
7336 "image/jpeg",
7338 [new tizen.ApplicationControlData("images",
7339 [imagedata1, imagedata2])] );
7342 <ExtendedAttributeList>
7343 <ExtendedAttribute name="Constructor">
7344 <webidl>Constructor(DOMString operation, optional DOMString? uri,
7345 optional DOMString? mime, optional DOMString? category,
7346 optional <ref>ApplicationControlData</ref>[]? data)</webidl>
7348 <Argument name="operation">
7349 <Type type="DOMString"/>
7351 <Argument optional="optional" name="uri">
7352 <Type type="DOMString" nullable="nullable"/>
7354 <Argument optional="optional" name="mime">
7355 <Type type="DOMString" nullable="nullable"/>
7357 <Argument optional="optional" name="category">
7358 <Type type="DOMString" nullable="nullable"/>
7360 <Argument optional="optional" name="data">
7361 <Type type="array" nullable="nullable">
7362 <Type name="ApplicationControlData"/>
7366 </ExtendedAttribute>
7367 </ExtendedAttributeList>
7368 <Attribute name="operation" id="::Application::ApplicationControl::operation">
7369 <webidl> attribute DOMString operation;</webidl>
7372 An attribute to store the string that defines the action to be
7373 performed by an application control.
7379 <Type type="DOMString"/>
7381 <Attribute name="uri" id="::Application::ApplicationControl::uri">
7382 <webidl> attribute DOMString? uri;</webidl>
7385 An attribute to store the URI needed by application control.
7391 <Type type="DOMString" nullable="nullable"/>
7393 <Attribute name="mime" id="::Application::ApplicationControl::mime">
7394 <webidl> attribute DOMString? mime;</webidl>
7397 An attribute to store the MIME type of a content.
7403 <Type type="DOMString" nullable="nullable"/>
7405 <Attribute name="category" id="::Application::ApplicationControl::category">
7406 <webidl> attribute DOMString? category;</webidl>
7409 An attribute to store the category of the application to be launched.
7415 <Type type="DOMString" nullable="nullable"/>
7417 <Attribute name="data" id="::Application::ApplicationControl::data">
7418 <webidl> attribute <ref>ApplicationControlData</ref>[] data;</webidl>
7421 An array of attributes to store the data needed for an application control.
7428 <Type name="ApplicationControlData"/>
7432 <Interface name="RequestedApplicationControl" id="::Application::RequestedApplicationControl">
7433 <webidl> [NoInterfaceObject] interface RequestedApplicationControl {
7435 readonly attribute <ref>ApplicationControl</ref> appControl;
7437 readonly attribute <ref>ApplicationId</ref> callerAppId;
7439 void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);
7441 void replyFailure() raises(<ref>WebAPIException</ref>);
7446 This interface has an application control information requested and passed
7447 from other application and is passed to launch other applications. The newly
7448 launched application can get the requested application control through <em>getRequestedAppControl()</em> method, and send the results
7449 to the calling application through the <em>replyResult()</em> method after performing the
7450 required action requested the calling application.
7455 <Code> var reqAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
7456 if (reqAppControl) {
7457 console.log("Requester AppID : " + reqAppControl.callerAppId);
7459 var appControl = reqAppControl.appControl;
7460 if (appControl.operation == "http://tizen.org/appcontrol/operation/pick") {
7461 var data = new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/selected", ["Image1.jpg"]);
7462 reqAppControl.replyResult([data]);
7467 <ExtendedAttributeList>
7468 <ExtendedAttribute name="NoInterfaceObject">
7469 <webidl>NoInterfaceObject</webidl>
7470 </ExtendedAttribute>
7471 </ExtendedAttributeList>
7472 <Attribute readonly="readonly" name="appControl" id="::Application::RequestedApplicationControl::appControl">
7473 <webidl> readonly attribute <ref>ApplicationControl</ref> appControl;</webidl>
7476 An attribute to store the application control object that describes caller application's request.
7477 It contains the information that the calling application passed to <em>launchAppControl</em>.
7483 <Type name="ApplicationControl"/>
7485 <Attribute readonly="readonly" name="callerAppId" id="::Application::RequestedApplicationControl::callerAppId">
7486 <webidl> readonly attribute <ref>ApplicationId</ref> callerAppId;</webidl>
7489 An attribute to store the caller application's ID
7495 <Type name="ApplicationId"/>
7497 <Operation name="replyResult" id="::Application::RequestedApplicationControl::replyResult">
7498 <webidl> void replyResult(optional <ref>ApplicationControlData</ref>[]? data) raises(<ref>WebAPIException</ref>);</webidl>
7501 Sends the results to the caller application.
7509 <Argument optional="optional" name="data">
7512 An array of ApplicationControlData objects.
7515 <Type type="array" nullable="nullable">
7516 <Type name="ApplicationControlData"/>
7521 <RaiseException name="WebAPIException">
7524 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
7527 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7530 with error type UnknownError, if the reply request fails because of an unknown error
7536 <Operation name="replyFailure" id="::Application::RequestedApplicationControl::replyFailure">
7537 <webidl> void replyFailure() raises(<ref>WebAPIException</ref>);</webidl>
7540 Notifies the calling application that the application failed
7541 to perform the requested action.
7550 <RaiseException name="WebAPIException">
7553 with error type NotFoundError, if the caller app is not alive or there is no response from the caller app
7556 with error type UnknownError, if the reply request fails because of an unknown error
7563 <Interface name="ApplicationCertificate" id="::Application::ApplicationCertificate">
7564 <webidl> [NoInterfaceObject] interface ApplicationCertificate {
7566 readonly attribute DOMString type;
7568 readonly attribute DOMString value;
7573 This interface defines the certificate information of an installed application.
7579 <ExtendedAttributeList>
7580 <ExtendedAttribute name="NoInterfaceObject">
7581 <webidl>NoInterfaceObject</webidl>
7582 </ExtendedAttribute>
7583 </ExtendedAttributeList>
7584 <Attribute readonly="readonly" name="type" id="::Application::ApplicationCertificate::type">
7585 <webidl> readonly attribute DOMString type;</webidl>
7588 An attribute to store the type of the application certificate.
7594 <Type type="DOMString"/>
7596 <Attribute readonly="readonly" name="value" id="::Application::ApplicationCertificate::value">
7597 <webidl> readonly attribute DOMString value;</webidl>
7600 An attribute to store the value of the application certificate.
7606 <Type type="DOMString"/>
7609 <Interface name="ApplicationMetaData" id="::Application::ApplicationMetaData">
7610 <webidl> [NoInterfaceObject] interface ApplicationMetaData {
7612 readonly attribute DOMString key;
7614 readonly attribute DOMString value;
7619 This interface defines the meta data of an installed application.
7625 <ExtendedAttributeList>
7626 <ExtendedAttribute name="NoInterfaceObject">
7627 <webidl>NoInterfaceObject</webidl>
7628 </ExtendedAttribute>
7629 </ExtendedAttributeList>
7630 <Attribute readonly="readonly" name="key" id="::Application::ApplicationMetaData::key">
7631 <webidl> readonly attribute DOMString key;</webidl>
7634 An attribute to store the key of the application meta data.
7640 <Type type="DOMString"/>
7642 <Attribute readonly="readonly" name="value" id="::Application::ApplicationMetaData::value">
7643 <webidl> readonly attribute DOMString value;</webidl>
7646 An attribute to store the value of the application meta data.
7652 <Type type="DOMString"/>
7655 <Interface name="ApplicationInformationArraySuccessCallback" id="::Application::ApplicationInformationArraySuccessCallback">
7656 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationInformationArraySuccessCallback {
7657 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);
7661 This interface invokes the success callback that is invoked when the installed application list is retrieved.
7665 This callback interface specifies a success method with an array of
7666 <em>ApplicationInformation </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsInfo()</em>.
7673 <ExtendedAttributeList>
7674 <ExtendedAttribute name="Callback" value="FunctionOnly">
7675 <webidl>Callback</webidl>
7676 </ExtendedAttribute>
7677 <ExtendedAttribute name="NoInterfaceObject">
7678 <webidl> NoInterfaceObject</webidl>
7679 </ExtendedAttribute>
7680 </ExtendedAttributeList>
7681 <Operation name="onsuccess" id="::Application::ApplicationInformationArraySuccessCallback::onsuccess">
7682 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray);</webidl>
7685 Called when the asynchronous call completes successfully.
7693 <Argument name="informationArray">
7696 A list of installed applications.
7700 <Type name="ApplicationInformation"/>
7706 <Interface name="FindAppControlSuccessCallback" id="::Application::FindAppControlSuccessCallback">
7707 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FindAppControlSuccessCallback {
7708 void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);
7712 This interface specified a success callback that is invoked when system finished searching applications which is matched by specific application control .
7716 This callback interface specifies a success method with an array of
7717 <em>ApplicationInformation </em>objects and application control as an input parameter.
7718 It is used in <em>ApplicationManager.findAppControl()</em>.
7725 <ExtendedAttributeList>
7726 <ExtendedAttribute name="Callback" value="FunctionOnly">
7727 <webidl>Callback</webidl>
7728 </ExtendedAttribute>
7729 <ExtendedAttribute name="NoInterfaceObject">
7730 <webidl> NoInterfaceObject</webidl>
7731 </ExtendedAttribute>
7732 </ExtendedAttributeList>
7733 <Operation name="onsuccess" id="::Application::FindAppControlSuccessCallback::onsuccess">
7734 <webidl> void onsuccess(<ref>ApplicationInformation</ref>[] informationArray, <ref>ApplicationControl</ref> appControl);</webidl>
7737 Called when the asynchronous call completes successfully.
7745 <Argument name="informationArray">
7748 A list of installed applications.
7752 <Type name="ApplicationInformation"/>
7755 <Argument name="appControl">
7758 The application control which were passed on <em>ApplicationManager.findAppControl()</em>.
7761 <Type name="ApplicationControl"/>
7766 <Interface name="ApplicationContextArraySuccessCallback" id="::Application::ApplicationContextArraySuccessCallback">
7767 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ApplicationContextArraySuccessCallback {
7768 void onsuccess(<ref>ApplicationContext</ref>[] contexts);
7772 This callback interface that specifies the success callback that is invoked when the list of running applications is retrieved.
7776 This callback interface specifies a success method with
7777 an array of <em>ApplicationContext </em>objects as an input parameter. It is used in <em>ApplicationManager.getAppsContext()</em>.
7784 <ExtendedAttributeList>
7785 <ExtendedAttribute name="Callback" value="FunctionOnly">
7786 <webidl>Callback</webidl>
7787 </ExtendedAttribute>
7788 <ExtendedAttribute name="NoInterfaceObject">
7789 <webidl> NoInterfaceObject</webidl>
7790 </ExtendedAttribute>
7791 </ExtendedAttributeList>
7792 <Operation name="onsuccess" id="::Application::ApplicationContextArraySuccessCallback::onsuccess">
7793 <webidl> void onsuccess(<ref>ApplicationContext</ref>[] contexts);</webidl>
7796 Called when <em>ApplicationManager.getAppsContext() </em>completes successfully.
7804 <Argument name="contexts">
7807 A list of running applications.
7811 <Type name="ApplicationContext"/>
7817 <Interface name="ApplicationControlDataArrayReplyCallback" id="::Application::ApplicationControlDataArrayReplyCallback">
7818 <webidl> [Callback, NoInterfaceObject] interface ApplicationControlDataArrayReplyCallback {
7819 void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);
7825 This callback interface specifies success callbacks that are invoked as a reply from the requested application control within the application control requester.
7829 This callback interface specifies two methods:
7833 <em>onsuccess()</em> - Invoked by the callee application calls <em>RequestedApplicationControl.replyResult()</em>. </li>
7835 <em>onfailure()</em> - Invoked if the callee application calls <em>RequestedApplicationControl.replyFailure()</em>. </li>
7842 <ExtendedAttributeList>
7843 <ExtendedAttribute name="Callback">
7844 <webidl>Callback</webidl>
7845 </ExtendedAttribute>
7846 <ExtendedAttribute name="NoInterfaceObject">
7847 <webidl> NoInterfaceObject</webidl>
7848 </ExtendedAttribute>
7849 </ExtendedAttributeList>
7850 <Operation name="onsuccess" id="::Application::ApplicationControlDataArrayReplyCallback::onsuccess">
7851 <webidl> void onsuccess(optional <ref>ApplicationControlData</ref>[]? data);</webidl>
7854 Called when the callee application calls <em>RequestedApplicationControl.replyResult()</em>.
7862 <Argument optional="optional" name="data">
7865 An array of <em>ApplicationControlData </em>objects.
7868 <Type type="array" nullable="nullable">
7869 <Type name="ApplicationControlData"/>
7874 <Operation name="onfailure" id="::Application::ApplicationControlDataArrayReplyCallback::onfailure">
7875 <webidl> void onfailure();</webidl>
7878 Called when the callee application calls <em>RequestedApplicationControl.replyFailure()</em>.
7888 <Interface name="ApplicationInformationEventCallback" id="::Application::ApplicationInformationEventCallback">
7889 <webidl> [Callback, NoInterfaceObject] interface ApplicationInformationEventCallback {
7890 void oninstalled(<ref>ApplicationInformation</ref> info);
7892 void onupdated(<ref>ApplicationInformation</ref> info);
7894 void onuninstalled(<ref>ApplicationId</ref> id);
7898 The callback interface to specify for subscribing for notification of changes in the list of installed
7899 applications on a device.
7903 This callback interface specifies methods that will be invoked when
7904 an application is installed, updated, or uninstalled.
7911 <ExtendedAttributeList>
7912 <ExtendedAttribute name="Callback">
7913 <webidl>Callback</webidl>
7914 </ExtendedAttribute>
7915 <ExtendedAttribute name="NoInterfaceObject">
7916 <webidl> NoInterfaceObject</webidl>
7917 </ExtendedAttribute>
7918 </ExtendedAttributeList>
7919 <Operation name="oninstalled" id="::Application::ApplicationInformationEventCallback::oninstalled">
7920 <webidl> void oninstalled(<ref>ApplicationInformation</ref> info);</webidl>
7923 Called when an application is installed.
7931 <Argument name="info">
7934 The application information of the installed application.
7937 <Type name="ApplicationInformation"/>
7941 <Operation name="onupdated" id="::Application::ApplicationInformationEventCallback::onupdated">
7942 <webidl> void onupdated(<ref>ApplicationInformation</ref> info);</webidl>
7945 Called when an application is updated.
7953 <Argument name="info">
7956 The application information of the updated application.
7959 <Type name="ApplicationInformation"/>
7963 <Operation name="onuninstalled" id="::Application::ApplicationInformationEventCallback::onuninstalled">
7964 <webidl> void onuninstalled(<ref>ApplicationId</ref> id);</webidl>
7967 Called when an application is uninstalled.
7975 <Argument name="id">
7978 The ID of the uninstalled application.
7981 <Type name="ApplicationId"/>
7987 <Module name="Bluetooth" id="::Bluetooth">
7988 <webidl>module Bluetooth {
7989 typedef DOMString BluetoothAddress;
7991 typedef DOMString BluetoothUUID;
7993 enum BluetoothSocketState { "CLOSED", "OPEN" };
7995 enum BluetoothProfileType { "HEALTH" };
7997 enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };
7999 [NoInterfaceObject] interface BluetoothManagerObject {
8000 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8002 <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;
8004 [NoInterfaceObject] interface BluetoothManager {
8005 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8006 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8007 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8008 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8012 [NoInterfaceObject] interface BluetoothAdapter {
8013 readonly attribute DOMString name;
8014 readonly attribute <ref>BluetoothAddress</ref> address;
8015 readonly attribute boolean powered;
8016 readonly attribute boolean visible;
8018 void setName(DOMString name,
8019 optional <ref>SuccessCallback</ref>? successCallback,
8020 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8022 void setPowered(boolean state,
8023 optional <ref>SuccessCallback</ref>? successCallback,
8024 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8026 void setVisible(boolean mode,
8027 optional <ref>SuccessCallback</ref>? successCallback,
8028 optional <ref>ErrorCallback</ref>? errorCallback,
8029 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8031 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8033 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8035 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8036 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8038 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8039 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8041 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8042 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8047 void getDevice(<ref>BluetoothAddress</ref> address,
8048 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8049 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8054 void createBonding(<ref>BluetoothAddress</ref> address,
8055 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8056 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8058 void destroyBonding(<ref>BluetoothAddress</ref> address,
8059 optional <ref>SuccessCallback</ref>? successCallback,
8060 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8064 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8066 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8067 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8069 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8072 [NoInterfaceObject] interface BluetoothDevice {
8073 readonly attribute DOMString name;
8074 readonly attribute <ref>BluetoothAddress</ref> address;
8075 readonly attribute <ref>BluetoothClass</ref> deviceClass;
8076 readonly attribute boolean isBonded;
8077 readonly attribute boolean isTrusted;
8078 readonly attribute boolean isConnected;
8079 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
8081 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8082 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
8083 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8085 [NoInterfaceObject] interface BluetoothSocket {
8086 readonly attribute <ref>BluetoothUUID</ref> uuid;
8087 readonly attribute <ref>BluetoothSocketState</ref> state;
8088 readonly attribute <ref>BluetoothDevice</ref> peer;
8089 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
8090 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
8091 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
8094 byte[] readData() raises(<ref>WebAPIException</ref>);
8097 void close() raises(<ref>WebAPIException</ref>);
8100 [NoInterfaceObject] interface BluetoothClass {
8101 readonly attribute octet major;
8103 readonly attribute octet minor;
8105 readonly attribute unsigned short [] services ;
8107 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
8110 [NoInterfaceObject] interface BluetoothClassDeviceMajor {
8112 const octet MISC = 0x00;
8113 const octet COMPUTER = 0x01;
8114 const octet PHONE = 0x02;
8115 const octet NETWORK = 0x03;
8116 const octet AUDIO_VIDEO = 0x04;
8117 const octet PERIPHERAL = 0x05;
8118 const octet IMAGING = 0x06;
8119 const octet WEARABLE = 0x07;
8120 const octet TOY = 0x08;
8121 const octet HEALTH = 0x09;
8122 const octet UNCATEGORIZED = 0x1F;
8125 [NoInterfaceObject] interface BluetoothClassDeviceMinor {
8126 const octet COMPUTER_UNCATEGORIZED = 0x00;
8127 const octet COMPUTER_DESKTOP = 0x01;
8128 const octet COMPUTER_SERVER = 0x02;
8129 const octet COMPUTER_LAPTOP = 0x03;
8130 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
8131 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
8132 const octet COMPUTER_WEARABLE = 0x06;
8134 const octet PHONE_UNCATEGORIZED = 0x00;
8135 const octet PHONE_CELLULAR = 0x01;
8136 const octet PHONE_CORDLESS = 0x02;
8137 const octet PHONE_SMARTPHONE = 0x03;
8138 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
8139 const octet PHONE_ISDN = 0x05;
8141 const octet AV_UNRECOGNIZED = 0x00;
8142 const octet AV_WEARABLE_HEADSET = 0x01;
8143 const octet AV_HANDSFREE = 0x02;
8144 const octet AV_MICROPHONE = 0x04;
8145 const octet AV_LOUDSPEAKER = 0x05;
8146 const octet AV_HEADPHONES = 0x06;
8147 const octet AV_PORTABLE_AUDIO = 0x07;
8148 const octet AV_CAR_AUDIO = 0x08;
8149 const octet AV_SETTOP_BOX = 0x09;
8150 const octet AV_HIFI = 0x0a;
8151 const octet AV_VCR = 0x0b;
8152 const octet AV_VIDEO_CAMERA = 0x0c;
8153 const octet AV_CAMCORDER = 0x0d;
8154 const octet AV_MONITOR = 0x0e;
8155 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
8156 const octet AV_VIDEO_CONFERENCING = 0x10;
8157 const octet AV_GAMING_TOY = 0x12;
8159 const octet PERIPHERAL_UNCATEGORIZED = 0;
8160 const octet PERIPHERAL_KEYBOARD = 0x10;
8161 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
8162 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
8163 const octet PERIPHERAL_JOYSTICK = 0x01;
8164 const octet PERIPHERAL_GAMEPAD = 0x02;
8165 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
8166 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
8167 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
8168 const octet PERIPHERAL_CARD_READER = 0x06;
8169 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
8170 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
8171 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
8173 const octet IMAGING_UNCATEGORIZED = 0x00;
8174 const octet IMAGING_DISPLAY = 0x04;
8175 const octet IMAGING_CAMERA = 0x08;
8176 const octet IMAGING_SCANNER = 0x10;
8177 const octet IMAGING_PRINTER = 0x20;
8179 const octet WEARABLE_WRITST_WATCH = 0x01;
8180 const octet WEARABLE_PAGER = 0x02;
8181 const octet WEARABLE_JACKET = 0x03;
8182 const octet WEARABLE_HELMET = 0x04;
8183 const octet WEARABLE_GLASSES = 0x05;
8185 const octet TOY_ROBOT = 0x01;
8186 const octet TOY_VEHICLE = 0x02;
8187 const octet TOY_DOLL = 0x03;
8188 const octet TOY_CONTROLLER = 0x04;
8189 const octet TOY_GAME = 0x05;
8191 const octet HEALTH_UNDEFINED = 0x00;
8192 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
8193 const octet HEALTH_THERMOMETER = 0x02;
8194 const octet HEALTH_WEIGHING_SCALE = 0x03;
8195 const octet HEALTH_GLUCOSE_METER = 0x04;
8196 const octet HEALTH_PULSE_OXIMETER = 0x05;
8197 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
8198 const octet HEALTH_DATA_DISPLAY = 0x07;
8199 const octet HEALTH_STEP_COUNTER = 0x08;
8200 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
8201 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
8202 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
8203 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
8204 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
8207 [NoInterfaceObject] interface BluetoothClassDeviceService {
8208 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
8209 const unsigned short POSITIONING = 0x0008;
8210 const unsigned short NETWORKING = 0x0010;
8211 const unsigned short RENDERING = 0x0020;
8212 const unsigned short CAPTURING = 0x0040;
8213 const unsigned short OBJECT_TRANSFER = 0x0080;
8214 const unsigned short AUDIO = 0x0100;
8215 const unsigned short TELEPHONY = 0x0200;
8216 const unsigned short INFORMATION = 0x0400;
8219 [NoInterfaceObject] interface BluetoothServiceHandler {
8220 readonly attribute <ref>BluetoothUUID</ref> uuid;
8221 readonly attribute DOMString name;
8222 readonly attribute boolean isConnected;
8223 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8225 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8228 [NoInterfaceObject] interface BluetoothProfileHandler {
8230 readonly attribute <ref>BluetoothProfileType</ref> profileType;
8235 [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
8237 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8239 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8244 [NoInterfaceObject] interface BluetoothHealthApplication {
8246 readonly attribute unsigned short dataType;
8248 readonly attribute DOMString name;
8250 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
8252 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8257 [NoInterfaceObject] interface BluetoothHealthChannel {
8259 readonly attribute <ref>BluetoothDevice</ref> peer;
8261 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
8263 readonly attribute <ref>BluetoothHealthApplication</ref> application;
8265 readonly attribute boolean isConnected;
8267 void close() raises(<ref>WebAPIException</ref>);
8269 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
8271 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8273 void unsetListener() raises(<ref>WebAPIException</ref>);
8278 [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
8279 void onstatechanged(boolean powered);
8280 void onnamechanged(DOMString name);
8281 void onvisibilitychanged(boolean visible);
8284 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
8285 void onsuccess(<ref>BluetoothDevice</ref> device);
8288 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
8289 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
8292 [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
8294 void ondevicefound(<ref>BluetoothDevice</ref> device);
8295 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
8296 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
8299 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
8300 void onsuccess(<ref>BluetoothSocket</ref> socket);
8303 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
8304 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
8307 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
8308 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
8312 [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
8313 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
8316 [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
8317 void onmessage(byte[] data);
8325 This specification defines interfaces and methods to manage Bluetooth.
8329 The following Bluetooth functionalities are provided:
8333 Controls local Bluetooth device, that is, turn Bluetooth on/off, etc. </li>
8335 Sets visibility </li>
8337 Discovers nearby Bluetooth devices (Device discovery). </li>
8339 Gets bonded devices information. </li>
8341 Controls bonding. </li>
8343 Connects to a service on a remote device and exchanges data. </li>
8345 Registers a service (RFCOMM) on a local device, which can be consumed by remote devices to exchange data. </li>
8348 For more information on the Bluetooth features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/bluetooth.htm">Bluetooth Guide</a>.
8354 <def-api-feature identifier="http://tizen.org/feature/network.bluetooth">
8358 To guarantee this application running on a device with Bluetooth feature, define below in the config file:
8364 <Typedef name="BluetoothAddress" id="::Bluetooth::BluetoothAddress">
8365 <webidl> typedef DOMString BluetoothAddress;</webidl>
8368 The address of a Bluetooth device.
8374 <Type type="DOMString"/>
8376 <Typedef name="BluetoothUUID" id="::Bluetooth::BluetoothUUID">
8377 <webidl> typedef DOMString BluetoothUUID;</webidl>
8380 The UUID of a Bluetooth service.
8386 <Type type="DOMString"/>
8388 <Enum name="BluetoothSocketState" id="::Bluetooth::BluetoothSocketState">
8389 <webidl> enum BluetoothSocketState { "CLOSED", "OPEN" };</webidl>
8392 The Bluetooth socket state.
8398 <EnumValue stringvalue="CLOSED">
8399 <webidl> "CLOSED</webidl>
8401 <EnumValue stringvalue="OPEN">
8402 <webidl> "OPEN</webidl>
8405 <Enum name="BluetoothProfileType" id="::Bluetooth::BluetoothProfileType">
8406 <webidl> enum BluetoothProfileType { "HEALTH" };</webidl>
8409 The Bluetooth profile.
8415 <EnumValue stringvalue="HEALTH">
8416 <webidl> "HEALTH</webidl>
8419 <Enum name="BluetoothHealthChannelType" id="::Bluetooth::BluetoothHealthChannelType">
8420 <webidl> enum BluetoothHealthChannelType { "RELIABLE", "STREAMING" };</webidl>
8423 The channel type of health device profile.
8429 <EnumValue stringvalue="RELIABLE">
8430 <webidl> "RELIABLE</webidl>
8432 <EnumValue stringvalue="STREAMING">
8433 <webidl> "STREAMING</webidl>
8436 <Interface name="BluetoothManagerObject" id="::Bluetooth::BluetoothManagerObject">
8437 <webidl> [NoInterfaceObject] interface BluetoothManagerObject {
8438 readonly attribute <ref>BluetoothManager</ref> bluetooth;
8442 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen platform.
8446 There is a <em>tizen.bluetooth</em> object that allows access to the Bluetooth API.
8453 <ExtendedAttributeList>
8454 <ExtendedAttribute name="NoInterfaceObject">
8455 <webidl>NoInterfaceObject</webidl>
8456 </ExtendedAttribute>
8457 </ExtendedAttributeList>
8458 <Attribute readonly="readonly" name="bluetooth" id="::Bluetooth::BluetoothManagerObject::bluetooth">
8459 <webidl> readonly attribute <ref>BluetoothManager</ref> bluetooth;</webidl>
8460 <Type name="BluetoothManager"/>
8463 <Implements name1="Tizen" name2="BluetoothManagerObject">
8464 <webidl> <ref>Tizen</ref> implements <ref>BluetoothManagerObject</ref>;</webidl>
8466 <Interface name="BluetoothManager" id="::Bluetooth::BluetoothManager">
8467 <webidl> [NoInterfaceObject] interface BluetoothManager {
8468 readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;
8469 readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;
8470 readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;
8471 <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
8475 This interface provides access to the <em>BluetoothAdapter</em> object.
8481 <ExtendedAttributeList>
8482 <ExtendedAttribute name="NoInterfaceObject">
8483 <webidl>NoInterfaceObject</webidl>
8484 </ExtendedAttribute>
8485 </ExtendedAttributeList>
8486 <Attribute readonly="readonly" name="deviceMajor" id="::Bluetooth::BluetoothManager::deviceMajor">
8487 <webidl> readonly attribute <ref>BluetoothClassDeviceMajor</ref> deviceMajor;</webidl>
8490 An attribute to access to a major device class identifiers of Bluetooth class of device (CoD).
8496 <Type name="BluetoothClassDeviceMajor"/>
8498 <Attribute readonly="readonly" name="deviceMinor" id="::Bluetooth::BluetoothManager::deviceMinor">
8499 <webidl> readonly attribute <ref>BluetoothClassDeviceMinor</ref> deviceMinor;</webidl>
8502 An attribute to access to a minor device class identifiers of Bluetooth class of device (CoD).
8508 <Type name="BluetoothClassDeviceMinor"/>
8510 <Attribute readonly="readonly" name="deviceService" id="::Bluetooth::BluetoothManager::deviceService">
8511 <webidl> readonly attribute <ref>BluetoothClassDeviceService</ref> deviceService;</webidl>
8514 Accessor to major service class identifiers of Bluetooth class of device (CoD).
8520 <Type name="BluetoothClassDeviceService"/>
8522 <Operation name="getDefaultAdapter" id="::Bluetooth::BluetoothManager::getDefaultAdapter">
8523 <webidl> <ref>BluetoothAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
8526 Gets the default local Bluetooth adapter.
8535 http://tizen.org/privilege/bluetooth.gap
8538 var adapter = tizen.bluetooth.getDefaultAdapter() ;
8540 console.log (err.name +": " + err.message);
8544 <Type name="BluetoothAdapter">
8547 BluetoothAdapter The local <em>BluetoothAdapter </em>object.
8553 <RaiseException name="WebAPIException">
8556 with error type SecurityError, if the application does not have the privilege to call this method.
8559 with error type NotSupportedError, if this feature is not supported.
8562 with error type UnknownError, if any other error occurs.
8569 <Interface name="BluetoothAdapter" id="::Bluetooth::BluetoothAdapter">
8570 <webidl> [NoInterfaceObject] interface BluetoothAdapter {
8571 readonly attribute DOMString name;
8572 readonly attribute <ref>BluetoothAddress</ref> address;
8573 readonly attribute boolean powered;
8574 readonly attribute boolean visible;
8576 void setName(DOMString name,
8577 optional <ref>SuccessCallback</ref>? successCallback,
8578 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8580 void setPowered(boolean state,
8581 optional <ref>SuccessCallback</ref>? successCallback,
8582 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8584 void setVisible(boolean mode,
8585 optional <ref>SuccessCallback</ref>? successCallback,
8586 optional <ref>ErrorCallback</ref>? errorCallback,
8587 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);
8589 void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
8591 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
8593 void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
8594 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8596 void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
8597 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8599 void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
8600 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8605 void getDevice(<ref>BluetoothAddress</ref> address,
8606 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8607 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8612 void createBonding(<ref>BluetoothAddress</ref> address,
8613 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
8614 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8616 void destroyBonding(<ref>BluetoothAddress</ref> address,
8617 optional <ref>SuccessCallback</ref>? successCallback,
8618 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8622 void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
8624 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
8625 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
8627 <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);
8632 This interface provides access to control the device's Bluetooth adapter.
8636 This interface offers methods to control local Bluetooth behavior, such as:
8640 Turning on/off Bluetooth radio </li>
8642 Changing device visibility </li>
8644 Scanning for remote devices </li>
8646 Accessing known devices </li>
8648 Registering a service in the device service database </li>
8655 <ExtendedAttributeList>
8656 <ExtendedAttribute name="NoInterfaceObject">
8657 <webidl>NoInterfaceObject</webidl>
8658 </ExtendedAttribute>
8659 </ExtendedAttributeList>
8660 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothAdapter::name">
8661 <webidl> readonly attribute DOMString name;</webidl>
8664 An attribute to store the readable name of the Bluetooth adapter.
8670 // Access adapter name
8671 var adapter = tizen.bluetooth.getDefaultAdapter();
8672 console.log ("Bluetooth adapter name: " + adapter.name);
8675 <Type type="DOMString"/>
8677 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothAdapter::address">
8678 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
8681 An attribute to store the unique hardware address of the Bluetooth adapter, also known as the MAC address.
8686 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8687 console.log("Bluetooth device address: " + adapter.address);
8690 <Type name="BluetoothAddress"/>
8692 <Attribute readonly="readonly" name="powered" id="::Bluetooth::BluetoothAdapter::powered">
8693 <webidl> readonly attribute boolean powered;</webidl>
8696 An attribute to indicate the current state of the Bluetooth adapter.
8697 This attribute holds one of the following 2 values:
8702 <var>true</var> - If Bluetooth adapter is currently on </li>
8704 <var>false</var> - If Bluetooth adapter is currently off </li>
8710 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8711 console.log("Bluetooth state: " + (adapter.powered ? "On" : "Off"));
8714 <Type type="boolean"/>
8716 <Attribute readonly="readonly" name="visible" id="::Bluetooth::BluetoothAdapter::visible">
8717 <webidl> readonly attribute boolean visible;</webidl>
8720 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.
8725 <Code> // Queries current visible state
8726 var adapter = tizen.bluetooth.getDefaultAdapter();
8727 console.log ("Bluetooth Visibility: " + (adapter.visible ? "On" : "Off"));
8730 <Type type="boolean"/>
8732 <Operation name="setName" id="::Bluetooth::BluetoothAdapter::setName">
8733 <webidl> void setName(DOMString name,
8734 optional <ref>SuccessCallback</ref>? successCallback,
8735 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8738 Sets the local Bluetooth adapter name.
8742 Sends a request to Bluetooth hardware to change the name of the local Bluetooth adapter to <em>name</em>.
8745 The ErrorCallback is launched with these error types:
8749 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
8751 ServiceNotAvailableError: If a Bluetooth device is turned off. </li>
8753 UnknownError: In any other error case. </li>
8763 http://tizen.org/privilege/bluetooth.admin
8765 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8767 function changeName(newName)
8769 if(adapter.name != newName) {
8770 // initiate change name
8771 adapter.setName(newName, function() {
8772 console.log("Adapter name changed to " + adapter.name);
8775 console.log("Failed to change name: " + e.message);
8780 changeName("myDevice");
8785 <Argument name="name">
8791 <Type type="DOMString"/>
8793 <Argument optional="optional" name="successCallback">
8796 The method to invoke when the asynchronous call completes successfully.
8799 <Type name="SuccessCallback" nullable="nullable"/>
8801 <Argument optional="optional" name="errorCallback">
8804 The method to invoke when an error occurs.
8807 <Type name="ErrorCallback" nullable="nullable"/>
8811 <RaiseException name="WebAPIException">
8814 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8817 with error type SecurityError, if the application does not have the privilege to call this method.
8820 with error type NotSupportedError, if this feature is not supported.
8826 <Operation name="setPowered" id="::Bluetooth::BluetoothAdapter::setPowered">
8827 <webidl> void setPowered(boolean state,
8828 optional <ref>SuccessCallback</ref>? successCallback,
8829 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
8832 Sets the state of a Bluetooth adapter to on or off by sending a request to Bluetooth hardware to change the power state.
8833 For most Bluetooth actions, the Bluetooth adapter must be powered on.
8837 The ErrorCallback is launched with these error names:
8841 ServiceNotAvailableError - If a Bluetooth device is busy. </li>
8843 UnknownError - If any other error occurs. </li>
8853 http://tizen.org/privilege/bluetooth.admin
8855 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8859 // If adapter is not powered on
8860 if(!adapter.powered) {
8861 // Initiates power on
8862 adapter.setPowered(true, function() {
8863 console.log("Bluetooth powered on success.");
8866 console.log("Failed to power on Bluetooth: " + e.message);
8874 if(adapter.powered) {
8875 // Initiates power off
8876 adapter.setPowered(false, function() {
8877 console.log("Bluetooth powered off successfully.");
8880 console.log("Failed to power off Bluetooth: " + e.message);
8888 <Argument name="state">
8891 The state to set: <var>true</var> to power on Bluetooth, <var>false</var> to power it off.
8894 <Type type="boolean"/>
8896 <Argument optional="optional" name="successCallback">
8899 The method to invoke on successful Bluetooth activation/deactivation.
8902 <Type name="SuccessCallback" nullable="nullable"/>
8904 <Argument optional="optional" name="errorCallback">
8907 The method to invoke on failure of a Bluetooth activation/deactivation.
8910 <Type name="ErrorCallback" nullable="nullable"/>
8914 <RaiseException name="WebAPIException">
8917 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
8920 with error type SecurityError, if the application does not have the privilege to call this method.
8923 with error type NotSupportedError, if this feature is not supported.
8929 <Operation name="setVisible" id="::Bluetooth::BluetoothAdapter::setVisible">
8930 <webidl> void setVisible(boolean mode,
8931 optional <ref>SuccessCallback</ref>? successCallback,
8932 optional <ref>ErrorCallback</ref>? errorCallback,
8933 optional unsigned short? timeout) raises(<ref>WebAPIException</ref>);</webidl>
8936 Sets the local device visibility by sending a request to a Bluetooth hardware to change the device visible state to <em>mode</em>.
8937 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.
8941 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.
8944 The ErrorCallback is launched with these error types:
8948 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
8950 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
8952 UnknownError - If any other error case occurs. </li>
8962 http://tizen.org/privilege/bluetoothmanager
8964 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
8968 if (adapter.visible == false) {
8970 adapter.setVisible(true,
8971 function() { console.log ('Device is visible to other devices for 3 minutes.'); },
8972 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
8975 console.log("Device is already in discoverable mode.");
8981 if (adapter.visible) {
8983 adapter.setVisible(false,
8984 function() { console.log('Device is in-visible now.'); },
8985 function(e) { console.log ('Error: ' + e.message + '(' + e.name + ')'); });
8988 console.log("Device is already in invisible mode.");
8995 <Argument name="mode">
8998 The boolean value to set visibility.
8999 It can either be set to: <var>true</var> - to show the device or <var>false</var> - to hide the device.
9002 <Type type="boolean"/>
9004 <Argument optional="optional" name="successCallback">
9007 The method to invoke when an asynchronous call completes successfully.
9010 <Type name="SuccessCallback" nullable="nullable"/>
9012 <Argument optional="optional" name="errorCallback">
9015 The method to invoke when an error occurs.
9018 <Type name="ErrorCallback" nullable="nullable"/>
9020 <Argument optional="optional" name="timeout">
9023 The visible timeout in seconds, used only when <em>mode</em> is <var>true</var>.
9026 <Type type="unsigned short" nullable="nullable"/>
9030 <RaiseException name="WebAPIException">
9033 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9036 with error type SecurityError, if the application does not have the privilege to call this method.
9039 with error type NotSupportedError, if this feature is not supported.
9045 <Operation name="setChangeListener" id="::Bluetooth::BluetoothAdapter::setChangeListener">
9046 <webidl> void setChangeListener(<ref>BluetoothAdapterChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
9049 Sets the listener to receive notifications about changes of Bluetooth adapter.
9054 <Code> var changeListener = {
9055 onstatechanged: function(powered) {
9056 console.log ("Power state is changed into: " + powered);
9058 onnamechanged: function(name) {
9059 console.log("Name is changed to: " + name);
9061 onvisibilitychanged: function(visible) {
9062 console.log("Visibility is changed into: " + visible);
9066 var adapter = tizen.bluetooth.getDefaultAdapter();
9067 adapter.setChangeListener(changeListener);
9072 <Argument name="listener">
9075 The Bluetooth Adapter event listener to set.
9078 <Type name="BluetoothAdapterChangeCallback"/>
9082 <RaiseException name="WebAPIException">
9085 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
9088 with error type SecurityError, if this functionality is not allowed.
9091 with error type UnknownError, if any other error occurs.
9097 <Operation name="unsetChangeListener" id="::Bluetooth::BluetoothAdapter::unsetChangeListener">
9098 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
9101 Unsets the listener, so stop receiving notifications about changes of Bluetooth adapter.
9106 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9108 var changeListener = {
9109 onstatechanged: function(powered) {
9110 console.log ("Power state is changed into: " + powered);
9112 adapter.unsetChangeListener();
9114 onnamechanged: function(name) {
9115 console.log("Name is changed to: " + name);
9117 onvisibilitychanged: function(visible) {
9118 console.log("Visibility is changed into: " + visible);
9122 adapter.setChangeListener(changeListener);
9128 <RaiseException name="WebAPIException">
9131 with error type SecurityError, if this functionality is not allowed.
9134 with error type UnknownError, if any other error occurs.
9140 <Operation name="discoverDevices" id="::Bluetooth::BluetoothAdapter::discoverDevices">
9141 <webidl> void discoverDevices(<ref>BluetoothDiscoverDevicesSuccessCallback</ref> successCallback,
9142 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9145 Discovers nearby Bluetooth devices if any, that is, devices within proximity to the local device.
9149 This method initiates the device discovery process. Depending on the progress of this process the following methods are invoked:
9153 <em>BluetoothDiscoverDevicesSuccessCallback.onstarted()</em> - when a discovery process starts successfully. </li>
9155 <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>
9157 <em>BluetoothDiscoverDevicesSuccessCallback.ondevicedisappeared()</em> - when a device goes out of proximity and this method is invoked with the address of the device. </li>
9159 <em>BluetoothDiscoverDevicesSuccessCallback.onfinished()</em> - when a discovery process is completed. </li>
9162 A discovery process can be canceled anytime, by calling <em>stopDiscovery() </em>on the <em>BluetoothAdapter</em>.
9165 The ErrorCallback is launched with these error types:
9169 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9171 UnknownError - If any other error occurs. </li>
9181 http://tizen.org/privilege/bluetooth.gap
9183 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9185 function startDiscovery() {
9187 var discoverDevicesSuccessCallback = {
9188 onstarted: function() {
9189 console.log ("Device discovery started...");
9191 ondevicefound: function(device) {
9192 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9194 ondevicedisappeared: function(address) {
9195 console.log("Device disappeared: " + address);
9197 onfinished: function(devices) {
9198 console.log("Found Devices");
9199 for (var i = 0; i < devices.length; i++) {
9200 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9202 console.log("Total: " + devices.length);
9206 // Starts searching for nearby devices, for about 12 sec.
9207 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9208 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9212 function onSetPoweredError(e) {
9213 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9216 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9221 <Argument name="successCallback">
9224 The method to invoke when an asynchronous call completes successfully.
9227 <Type name="BluetoothDiscoverDevicesSuccessCallback"/>
9229 <Argument optional="optional" name="errorCallback">
9232 The method to invoke when an error occurs.
9235 <Type name="ErrorCallback" nullable="nullable"/>
9239 <RaiseException name="WebAPIException">
9242 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9245 with error type SecurityError, if the application does not have the privilege to call this method.
9248 with error type NotSupportedError, if this feature is not supported.
9254 <Operation name="stopDiscovery" id="::Bluetooth::BluetoothAdapter::stopDiscovery">
9255 <webidl> void stopDiscovery(optional <ref>SuccessCallback</ref>? successCallback,
9256 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9259 Stops an active device discovery session.
9263 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.
9266 The ErrorCallback is launched with these error types:
9270 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9272 UnknownError - If any other error occurs. </li>
9282 http://tizen.org/privilege/bluetooth.gap
9284 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9286 // Calls this method whenever user finds one of the device
9287 function cancelDiscovery() {
9288 adapter.stopDiscovery(function() {
9289 console.log("Stop discovery success.");
9292 console.log("Error while stopDiscovery:" + e.message);
9296 function startDiscovery() {
9298 var discoverDevicesSuccessCallback = {
9299 onstarted: function() {
9300 console.log ("Device discovery started...") ;
9302 ondevicefound: function(device) {
9303 console.log("Found device - name: " + device.name + ", Address: "+ device.address);
9304 // Shows the device to user to check if this is the device user is looking for.
9305 // For example, add this to list view.
9309 ondevicedisappeared: function(address) {
9310 console.log("Device disappeared: " + address);
9311 // Removes from list, as it is no longer valid.
9313 onfinished: function(devices) {
9314 console.log("Found Devices");
9315 for (var i = 0; i < devices.length; i++) {
9316 console.log("Name: " + devices[i].name + ", Address: " + devices[i].address);
9318 console.log("Total: " + devices.length);
9322 // Starts searching for nearby devices, for about 12 sec.
9323 adapter.discoverDevices(discoverDevicesSuccessCallback, function(e){
9324 console.log ("Failed to search devices: " + e.message + "(" + e.name + ")");
9328 function onSetPoweredError(e) {
9329 console.log ("Could not turn on device, reason: " + e.message + "(" + e.name + ")");
9332 adapter.setPowered(true, startDiscovery, onSetPoweredError);
9337 <Argument optional="optional" name="successCallback">
9340 The method to invoke when an asynchronous call completes successfully.
9343 <Type name="SuccessCallback" nullable="nullable"/>
9345 <Argument optional="optional" name="errorCallback">
9348 The method to invoke when an error occurs.
9351 <Type name="ErrorCallback" nullable="nullable"/>
9355 <RaiseException name="WebAPIException">
9358 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
9361 with error type SecurityError, if the application does not have the privilege to call this method.
9364 with error type NotSupportedError, if this feature is not supported.
9370 <Operation name="getKnownDevices" id="::Bluetooth::BluetoothAdapter::getKnownDevices">
9371 <webidl> void getKnownDevices(<ref>BluetoothDeviceArraySuccessCallback</ref> successCallback,
9372 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9375 Gets all the known devices that have information stored in the local Bluetooth adapter.
9379 A known device is one of the following:
9383 a bonded device </li>
9385 a device found in last inquiry process </li>
9388 On success, it returns the list of currently known devices through <em>BluetoothDeviceArraySuccessCallback</em>.
9391 The ErrorCallback is launched with these error types:
9395 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9397 UnknownError - If any other error occurs. </li>
9407 http://tizen.org/privilege/bluetooth.gap
9409 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9411 function onGotDevices(devices) {
9412 console.log("Devices");
9413 for (var i = 0; i < devices.length; i++) {
9414 console.log(" Name: " + devices[i].name + ", Address: " + devices[i].address);
9416 console.log("Total: " + devices.length);
9419 function onError(e) {
9420 console.log ("Error: " + e.message);
9423 function onBluetoothsetPowered() {
9424 adapter.getKnownDevices(onGotDevices, onError);
9427 // Turns on Bluetooth
9428 adapter.setPowered(true, onBluetoothsetPowered);
9433 <Argument name="successCallback">
9436 The method to invoke at retrieval of a list of Bluetooth devices that were bonded (paired) to the local Bluetooth adapter.
9439 <Type name="BluetoothDeviceArraySuccessCallback"/>
9441 <Argument optional="optional" name="errorCallback">
9444 The method to invoke in case of failure in finding any bonded devices.
9447 <Type name="ErrorCallback" nullable="nullable"/>
9451 <RaiseException name="WebAPIException">
9454 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9457 with error type SecurityError, if the application does not have the privilege to call this method.
9460 with error type NotSupportedError, if this feature is not supported.
9466 <Operation name="getDevice" id="::Bluetooth::BluetoothAdapter::getDevice">
9467 <webidl> void getDevice(<ref>BluetoothAddress</ref> address,
9468 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9469 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9472 Gets the <em>BluetoothDevice</em> object for a given device hardware address.
9476 This method returns device information stored in the local Bluetooth adapter for the specified device <em>address</em> through
9477 BluetoothDeviceSuccessCallback.
9478 A valid hardware address must be passed, such as "35:F4:59:D1:7A:03".
9481 The ErrorCallback is launched with these error types:
9485 NotFoundError - If there is no device with the given address. </li>
9487 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9489 UnknownError - If any other error occurs. </li>
9499 http://tizen.org/privilege/bluetooth.gap
9501 <Code> function gotDeviceInfo(device) {
9502 console.log("Device Name: " + device.name);
9503 console.log("Device Address: " + device.address);
9504 console.log("Device Class: " + device.deviceClass.major);
9505 console.log("Is Bonded: " + (device.isBonded ? "Yes" : "No"));
9508 function onError(e) {
9509 console.log ("Could not get device info:" + e.message);
9512 var adapter = tizen.bluetooth.getDefaultAdapter();
9513 adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo, onError);
9518 <Argument name="address">
9521 The address of a remote Bluetooth device to get.
9524 <Type name="BluetoothAddress"/>
9526 <Argument name="successCallback">
9529 The method to invoke when an asynchronous call completes successfully.
9532 <Type name="BluetoothDeviceSuccessCallback"/>
9534 <Argument optional="optional" name="errorCallback">
9537 The method to invoke when an error occurs.
9540 <Type name="ErrorCallback" nullable="nullable"/>
9544 <RaiseException name="WebAPIException">
9547 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9550 with error type SecurityError, if the application does not have the privilege to call this method.
9553 with error type NotSupportedError, if this feature is not supported.
9559 <Operation name="createBonding" id="::Bluetooth::BluetoothAdapter::createBonding">
9560 <webidl> void createBonding(<ref>BluetoothAddress</ref> address,
9561 <ref>BluetoothDeviceSuccessCallback</ref> successCallback,
9562 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9565 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.
9569 If the bonding process is successful, the device information is sent in <em>successCallback</em>.
9572 The ErrorCallback is launched with these error types:
9576 NotFoundError - If there is no device with the given address. </li>
9578 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9580 UnknownError - If any other error occurs. </li>
9590 http://tizen.org/privilege/bluetooth.gap
9592 <Code> function onBondingSuccess(device) {
9593 console.log("Device Name:" + device.name);
9594 console.log("Device Address:" + device.address);
9595 console.log("Device Service UUIDs:" + device.uuids.join("\n"));
9598 function onError(e) {
9599 console.log ("Could not create bonding, reason:" + e.message);
9602 var adapter = tizen.bluetooth.getDefaultAdapter();
9603 adapter.createBonding("35:F4:59:D1:7A:03", onBondingSuccess, onError);
9608 <Argument name="address">
9611 The MAC address of remote Bluetooth address to bond with.
9614 <Type name="BluetoothAddress"/>
9616 <Argument name="successCallback">
9619 The method to invoke when an asynchronous call completes successfully.
9622 <Type name="BluetoothDeviceSuccessCallback"/>
9624 <Argument optional="optional" name="errorCallback">
9627 The method to invoke when an error occurs.
9630 <Type name="ErrorCallback" nullable="nullable"/>
9634 <RaiseException name="WebAPIException">
9637 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9640 with error type SecurityError, if the application does not have the privilege to call this method.
9643 with error type NotSupportedError, if this feature is not supported.
9649 <Operation name="destroyBonding" id="::Bluetooth::BluetoothAdapter::destroyBonding">
9650 <webidl> void destroyBonding(<ref>BluetoothAddress</ref> address,
9651 optional <ref>SuccessCallback</ref>? successCallback,
9652 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9655 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.
9659 The ErrorCallback is launched with these error types:
9663 NotFoundError - If there is no device with the given address. </li>
9665 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9667 UnknownError - If any other error occurs. </li>
9677 http://tizen.org/privilege/bluetooth.gap
9679 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9681 function gotDevice(device) {
9682 if (device.isBonded) {
9683 // Initiates destroying bonding
9684 adapter.destroyBonding(device.address, function() {
9685 console.log("Succeeded to destroy the bond success with:" + device.address);
9688 console.log("Failed to destroy the bond with " + device.address + ", reason: " + e.message);
9693 var deviceAddress = "35:F4:59:D1:7A:03";
9694 adapter.getDevice(deviceAddress, gotDevice, function(e) {
9695 console.log("Failed to get device info for " + deviceAddress + ", reason: " + e.message);
9701 <Argument name="address">
9704 The address of a bonded device.
9707 <Type name="BluetoothAddress"/>
9709 <Argument optional="optional" name="successCallback">
9712 The method to invoke when an asynchronous call completes successfully.
9715 <Type name="SuccessCallback" nullable="nullable"/>
9717 <Argument optional="optional" name="errorCallback">
9720 The method to invoke when an error occurs.
9723 <Type name="ErrorCallback" nullable="nullable"/>
9727 <RaiseException name="WebAPIException">
9730 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
9733 with error type SecurityError, if the application does not have the privilege to call this method.
9736 with error type NotSupportedError, if this feature is not supported.
9742 <Operation name="registerRFCOMMServiceByUUID" id="::Bluetooth::BluetoothAdapter::registerRFCOMMServiceByUUID">
9743 <webidl> void registerRFCOMMServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9745 <ref>BluetoothServiceSuccessCallback</ref> successCallback,
9746 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
9749 Registers a service record in the device service record database with the specified <em>uuid</em>, <em>name</em>.
9753 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.
9754 The service handler can be used to be notified on client connections or to unregister the service.
9755 User interaction is mandatory to connect to a registered service.
9758 If any client(remote device) connects to this service, then <em>BluetoothServiceHandler.onconnect()</em> is invoked with <em>BluetoothSocket</em> object.
9761 <em>BluetoothServiceHandler.unregister()</em> can be used to unregister the service record from the device service database and stop listening for client connections.
9764 The ErrorCallback is launched with these error types:
9768 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
9770 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
9772 UnknownError - If any other error occurs. </li>
9782 http://tizen.org/privilege/bluetooth.spp
9784 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9785 // Holds currently registered service record
9786 var chatServiceHandler = null;
9787 // Holds currently open socket
9788 var serviceSocket = null;
9790 function chatServiceSuccessCb(recordHandler) {
9791 console.log("Chat service registration succeeds!");
9792 chatServiceHandler = recordHandler;
9793 recordHandler.onconnect = function(socket) {
9794 console.log("Client connected: " + socket.peer.name + "," + socket.peer.address);
9795 serviceSocket = socket;
9796 // Messages received from remote device
9797 socket.onmessage = function() {
9798 var data = socket.readData();
9799 // Handles message code goes here
9803 socket.onclose = function() {
9804 console.log('The socket is closed.');
9805 serviceSocket = null;
9810 function publishChatService()
9812 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
9813 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
9816 console.log( "Could not register service record, Error: " + e.message);
9820 function unregisterChatService()
9822 if (chatServiceHandler != null) {
9823 chatServiceHandler.unregister(function() {
9824 console.log("Chat service is unregistered");
9825 chatServiceHandler = null;
9827 console.log("Failed to unregister service: " + e.message);
9835 <Argument name="uuid">
9838 The UUID of the service, to which clients connects.
9841 <Type name="BluetoothUUID"/>
9843 <Argument name="name">
9846 The Name of a service.
9849 <Type type="DOMString"/>
9851 <Argument name="successCallback">
9854 The method to invoke on successful service registration.
9857 <Type name="BluetoothServiceSuccessCallback"/>
9859 <Argument optional="optional" name="errorCallback">
9862 The method to invoke when an error occurs.
9865 <Type name="ErrorCallback" nullable="nullable"/>
9869 <RaiseException name="WebAPIException">
9872 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9875 with error type SecurityError, if the application does not have the privilege to call this method.
9878 with error type NotSupportedError, if this feature is not supported.
9884 <Operation name="getBluetoothProfileHandler" id="::Bluetooth::BluetoothAdapter::getBluetoothProfileHandler">
9885 <webidl> <ref>BluetoothProfileHandler</ref> getBluetoothProfileHandler(<ref>BluetoothProfileType</ref> profileType) raises(<ref>WebAPIException</ref>);</webidl>
9888 Gets the profile handler for the given type.
9893 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9894 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
9897 <Type name="BluetoothProfileHandler"/>
9899 <Argument name="profileType">
9902 The type of Bluetooth Profile.
9905 <Type name="BluetoothProfileType"/>
9909 <RaiseException name="WebAPIException">
9912 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
9915 with error type NotSupportedError, if this feature is not supported.
9918 with error type UnknownError, if any other error occurs.
9925 <Interface name="BluetoothDevice" id="::Bluetooth::BluetoothDevice">
9926 <webidl> [NoInterfaceObject] interface BluetoothDevice {
9927 readonly attribute DOMString name;
9928 readonly attribute <ref>BluetoothAddress</ref> address;
9929 readonly attribute <ref>BluetoothClass</ref> deviceClass;
9930 readonly attribute boolean isBonded;
9931 readonly attribute boolean isTrusted;
9932 readonly attribute boolean isConnected;
9933 readonly attribute <ref>BluetoothUUID</ref>[] uuids;
9935 void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
9936 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
9937 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
9941 This interface represents a remote Bluetooth device.
9945 A <em>BluetoothDevice</em> object can be retrieved using one of the following APIs:
9949 BluetoothAdapter.getDevice() </li>
9951 BluetoothAdapter.getKnownDevices() </li>
9953 BluetoothAdapter.discoverDevices() </li>
9955 BluetoothAdapter.createBonding() </li>
9962 <ExtendedAttributeList>
9963 <ExtendedAttribute name="NoInterfaceObject">
9964 <webidl>NoInterfaceObject</webidl>
9965 </ExtendedAttribute>
9966 </ExtendedAttributeList>
9967 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothDevice::name">
9968 <webidl> readonly attribute DOMString name;</webidl>
9971 An attribute to store the readable name of this remote device.
9976 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9977 adapter.getDevice("11:22:33:44:55:66", function(device) {
9978 console.log("Device Name: " + device.name);
9982 <Type type="DOMString"/>
9984 <Attribute readonly="readonly" name="address" id="::Bluetooth::BluetoothDevice::address">
9985 <webidl> readonly attribute <ref>BluetoothAddress</ref> address;</webidl>
9988 An attribute to store the hardware address of this remote device.
9993 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
9994 adapter.getDevice("11:22:33:44:55:66", function(device) {
9995 console.log("Device Address: " + device.address);
9999 <Type name="BluetoothAddress"/>
10001 <Attribute readonly="readonly" name="deviceClass" id="::Bluetooth::BluetoothDevice::deviceClass">
10002 <webidl> readonly attribute <ref>BluetoothClass</ref> deviceClass;</webidl>
10005 An attribute to indicate a device class, which represents the type of the device and the services it provides.
10010 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10011 adapter.getDevice("11:22:33:44:55:66", function(device) {
10012 console.log("Device Major Class: " + device.deviceClass.major);
10016 <Type name="BluetoothClass"/>
10018 <Attribute readonly="readonly" name="isBonded" id="::Bluetooth::BluetoothDevice::isBonded">
10019 <webidl> readonly attribute boolean isBonded;</webidl>
10022 An attribute to check the bond state of this remote device with the local device.
10027 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10028 adapter.getDevice("11:22:33:44:55:66", function(device) {
10029 console.log("Is bonded: " + (device.isBonded ? "Yes" : "No"));
10033 <Type type="boolean"/>
10035 <Attribute readonly="readonly" name="isTrusted" id="::Bluetooth::BluetoothDevice::isTrusted">
10036 <webidl> readonly attribute boolean isTrusted;</webidl>
10039 An attribute to check whether the local device recognizes this remote device as a trusted device or not.
10044 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10045 adapter.getDevice("11:22:33:44:55:66", function(device) {
10046 console.log("Is trusted: " + (device.isTrusted ? "Yes" : "No"));
10050 <Type type="boolean"/>
10052 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothDevice::isConnected">
10053 <webidl> readonly attribute boolean isConnected;</webidl>
10056 An attribute to check the connection state of this remote device with the local device.
10061 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10062 adapter.getDevice("11:22:33:44:55:66", function(device) {
10063 console.log("Is connected: " + (device.isConnected ? "Yes" : "No"));
10067 <Type type="boolean"/>
10069 <Attribute readonly="readonly" name="uuids" id="::Bluetooth::BluetoothDevice::uuids">
10070 <webidl> readonly attribute <ref>BluetoothUUID</ref>[] uuids;</webidl>
10073 An attribute to store the list of 128 bit service UUIDs available on this remote device.
10078 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10079 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
10080 adapter.getDevice("11:22:33:44:55:66", function(device) {
10081 var uuids = device.uuids;
10082 var services = "";
10083 for (var i = 0; i < uuids.length; i++) {
10084 services += uuids[i] + "\n";
10086 console.log ("Services found: " + services);
10087 if (uuids.indexOf(CHAT_SERVICE_UUID) != -1) {
10088 // Connects to service
10089 device.connectToServiceByUUID(CHAT_SERVICE_UUID, function(socket) {
10091 // Connected to service, handle socket
10094 console.log("Could not connect to chat service !!!. Error: " + e.message);
10100 <Type type="array">
10101 <Type name="BluetoothUUID"/>
10104 <Operation name="connectToServiceByUUID" id="::Bluetooth::BluetoothDevice::connectToServiceByUUID">
10105 <webidl> void connectToServiceByUUID(<ref>BluetoothUUID</ref> uuid,
10106 <ref>BluetoothSocketSuccessCallback</ref> successCallback,
10107 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
10110 Connects to a specified service identified by <em>uuid</em> on this remote device.
10114 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.
10117 The ErrorCallback is launched with these error types:
10121 NotFoundError - If there is no service with the specified <em>uuid</em>. </li>
10123 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
10125 UnknownError - If any other error occurs. </li>
10135 http://tizen.org/privilege/bluetooth.spp
10137 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10138 var clientSocket = null;
10140 // Calls a method that is invoked when user wants to send a message to a remote device
10141 function sendMessage(msg) {
10142 // Validates socket state, if everything is ok.
10143 if (clientSocket != null && clientSocket.state == "OPEN") {
10144 // Sends the message
10145 clientSocket.writeData(msg);
10149 // Calls a method that is invoked when a socket is open
10150 function onSocketConnected(socket) {
10151 clientSocket = socket;
10152 console.log("Opening a socket successfully!!!");
10153 socket.onmessage = function () {
10154 var data = socket.readData();
10155 var recvmsg = "";
10156 for (var i = 0; i < data.length; i++)
10158 recvmsg += String.fromCharCode(data[i]);
10160 console.log("server msg >> " + recvmsg);
10163 socket.onclose = function() {
10164 console.log("socket disconnected.");
10168 function onDeviceReady(device) {
10169 // Validates device and service uuid
10170 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10172 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, function(e) {
10173 console.log ("Error connecting to service. Reason: " + e.message);
10177 console.log ("Chat service is not supported by this device");
10181 function onSetPowered() {
10182 // Gets the BluetoothDevice object
10183 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10186 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10189 <Type type="void"/>
10191 <Argument name="uuid">
10194 The 128 bit unique identifier, which represents the service record on the device.
10197 <Type name="BluetoothUUID"/>
10199 <Argument name="successCallback">
10202 The method to invoke when an asynchronous call completes successfully.
10205 <Type name="BluetoothSocketSuccessCallback"/>
10207 <Argument optional="optional" name="errorCallback">
10210 The method to invoke when opening of a socket fails.
10213 <Type name="ErrorCallback" nullable="nullable"/>
10217 <RaiseException name="WebAPIException">
10220 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter
10223 with error type SecurityError, if the application does not have the privilege to call this method.
10226 with error type NotSupportedError, if this feature is not supported.
10233 <Interface name="BluetoothSocket" id="::Bluetooth::BluetoothSocket">
10234 <webidl> [NoInterfaceObject] interface BluetoothSocket {
10235 readonly attribute <ref>BluetoothUUID</ref> uuid;
10236 readonly attribute <ref>BluetoothSocketState</ref> state;
10237 readonly attribute <ref>BluetoothDevice</ref> peer;
10238 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);
10239 [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);
10240 unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);
10243 byte[] readData() raises(<ref>WebAPIException</ref>);
10246 void close() raises(<ref>WebAPIException</ref>);
10250 This interface represents the Bluetooth socket.
10254 The socket object is created by <em>BluetoothDevice.connectToServiceByUUID()</em> or <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
10261 <ExtendedAttributeList>
10262 <ExtendedAttribute name="NoInterfaceObject">
10263 <webidl>NoInterfaceObject</webidl>
10264 </ExtendedAttribute>
10265 </ExtendedAttributeList>
10266 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothSocket::uuid">
10267 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
10270 An attribute to store the service UUID to which this socket is connected.
10276 <Type name="BluetoothUUID"/>
10278 <Attribute readonly="readonly" name="state" id="::Bluetooth::BluetoothSocket::state">
10279 <webidl> readonly attribute <ref>BluetoothSocketState</ref> state;</webidl>
10282 An attribute to indicate the socket state.
10288 <Type name="BluetoothSocketState"/>
10290 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothSocket::peer">
10291 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
10294 The peer device to which this socket is connected.
10300 <Type name="BluetoothDevice"/>
10302 <Attribute name="onmessage" id="::Bluetooth::BluetoothSocket::onmessage">
10303 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onmessage raises(<ref>WebAPIException</ref>);</webidl>
10306 The success callback to be invoked when an incoming message is received from the peer.
10307 By default, this attribute is set to null.
10313 <ExtendedAttributeList>
10314 <ExtendedAttribute name="TreatNonCallableAsNull">
10315 <webidl>TreatNonCallableAsNull</webidl>
10316 </ExtendedAttribute>
10317 </ExtendedAttributeList>
10318 <Type name="SuccessCallback" nullable="nullable"/>
10320 <RaiseException name="WebAPIException">
10323 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10329 <Attribute name="onclose" id="::Bluetooth::BluetoothSocket::onclose">
10330 <webidl> [TreatNonCallableAsNull] attribute <ref>SuccessCallback</ref>? onclose raises(<ref>WebAPIException</ref>);</webidl>
10333 The success callback to be invoked when the socket is closed.
10334 By default, this attribute is set to null.
10340 <ExtendedAttributeList>
10341 <ExtendedAttribute name="TreatNonCallableAsNull">
10342 <webidl>TreatNonCallableAsNull</webidl>
10343 </ExtendedAttribute>
10344 </ExtendedAttributeList>
10345 <Type name="SuccessCallback" nullable="nullable"/>
10347 <RaiseException name="WebAPIException">
10350 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
10356 <Operation name="writeData" id="::Bluetooth::BluetoothSocket::writeData">
10357 <webidl> unsigned long writeData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
10360 Writes data as a sequence of bytes onto the socket and returns the number of bytes actually written.
10369 http://tizen.org/privilege/bluetooth.spp
10372 var adapter = tizen.bluetooth.getDefaultAdapter();
10374 function onSocketConnected(socket) {
10375 console.log ("Opened connection to remote device");
10376 socket.onmessage = function () {
10377 console.log ("Message received: " + socket.readData());
10380 socket.onclose = function() {
10381 console.log("Socket closed with " + socket.peer.name);
10384 // Sends data to peer.
10385 var textmsg = "Test";
10386 var sendtextmsg = new Array();
10387 for (var i = 0; i < textmsg.length; i++)
10389 sendtextmsg[i] = textmsg.charCodeAt(i);
10391 socket.writeData (sendtextmsg);
10394 function onSocketError(e) {
10395 console.log ("Error connecting to service. Reason: " + e.message);
10398 function onDeviceReady(device) {
10399 // Validates device and service uuid
10400 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10402 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onSocketError );
10405 function onSetPowered() {
10406 // Gets the BluetoothDevice object
10407 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10410 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10413 <Type type="unsigned long">
10416 unsigned long The number of bytes actually sent.
10421 <Argument name="data">
10427 <Type type="array">
10428 <Type type="byte"/>
10433 <RaiseException name="WebAPIException">
10436 with error type TypeMismatchError, if any input parameters not compatible with the expected type for that parameter.
10439 with error type SecurityError, if the application does not have the privilege to call this method.
10442 with error type NotSupportedError, if this feature is not supported.
10445 with error type UnknownError, if any other error occurs.
10451 <Operation name="readData" id="::Bluetooth::BluetoothSocket::readData">
10452 <webidl> byte[] readData() raises(<ref>WebAPIException</ref>);</webidl>
10455 Reads data from the socket.
10459 This method should be called only in the <em>BluetoothSocket.onmessage</em> handler, that is, when data is ready on the socket.
10469 http://tizen.org/privilege/bluetooth.spp
10471 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10473 function onError(e) {
10474 console.log ("Error connecting to service. Reason: " + e.message);
10477 function onSocketConnected(socket) {
10478 console.log ("Opening socket success!!!");
10480 socket.onmessage = function() {
10481 // Has got a message from peer, reads it
10482 var data = socket.readData();
10485 // Code to evaluate message goes here
10489 socket.onclose = function() {
10490 console.log("Socket closed with " + socket.peer.name);
10494 function onDeviceReady(device) {
10495 // Validates device and service uuid
10496 if (device.uuids.indexOf("5BCE9431-6C75-32AB-AFE0-2EC108A30860") != -1) {
10498 device.connectToServiceByUUID("5BCE9431-6C75-32AB-AFE0-2EC108A30860", onSocketConnected, onError);
10501 function onSetPowered() {
10502 // Gets the BluetoothDevice object
10503 adapter.getDevice("35:F4:59:D1:7A:03", onDeviceReady, function(e) { console.log("Error: " + e.message); });
10506 adapter.setPowered(true, onSetPowered, function(e) {console.log ("Could not turn on Bluetooth adapter. reason: " + e.message); });
10509 <Type type="array">
10512 byte[] The sequence of bytes successfully read.
10515 <Type type="byte"/>
10519 <RaiseException name="WebAPIException">
10522 with error type SecurityError, if the application does not have the privilege to call this method.
10525 with error type NotSupportedError, if this feature is not supported.
10528 with error type UnknownError, if any other error occurs.
10534 <Operation name="close" id="::Bluetooth::BluetoothSocket::close">
10535 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
10542 <b>BluetoothSocket.state</b> changes to <var>CLOSED</var>, and <em>BluetoothSocket.onclose()</em> is invoked on success.
10552 http://tizen.org/privilege/bluetooth.spp
10555 <Type type="void"/>
10558 <RaiseException name="WebAPIException">
10561 with error type NotSupportedError, if this feature is not supported.
10564 with error type SecurityError, if the application does not have the privilege to call this method.
10567 with error type UnknownError, if any other error occurs.
10574 <Interface name="BluetoothClass" id="::Bluetooth::BluetoothClass">
10575 <webidl> [NoInterfaceObject] interface BluetoothClass {
10576 readonly attribute octet major;
10578 readonly attribute octet minor;
10580 readonly attribute unsigned short [] services ;
10582 boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);
10586 This interface represents Bluetooth Class of Device/Service(CoD).
10590 Bluetooth device class describes the characteristics and capabilities of a device.
10593 Bluetooth CoD is a 24 bit integer created by the union of three components:
10597 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>
10599 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>
10601 Zero or more <b>Major Service Classes</b>(bits 13-23) - Represents the services supported by the device. </li>
10604 The Major and Minor classes are intended to define a general family of devices with which any particular implementation wishes to be associated.
10605 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.
10612 <ExtendedAttributeList>
10613 <ExtendedAttribute name="NoInterfaceObject">
10614 <webidl>NoInterfaceObject</webidl>
10615 </ExtendedAttribute>
10616 </ExtendedAttributeList>
10617 <Attribute readonly="readonly" name="major" id="::Bluetooth::BluetoothClass::major">
10618 <webidl> readonly attribute octet major;</webidl>
10621 The major device class and it refers to the <em>BluetoothClassDeviceMajor</em> interface for the list of possible
10627 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10629 function evaluateDevice(address) {
10630 adapter.getDevice(address, function(device) {
10631 if (device.deviceClass.major == tizen.bluetooth.deviceMajor.COMPUTER) {
10632 // Shows computer icon for this device
10633 console.log("Device is computer");
10634 } else if (device.deviceClass.major == tizen.bluetooth.deviceMajor.PHONE) {
10635 // Shows phone icon
10636 console.log("Device is a Phone");
10639 console.log("Couldn't get any device with the given address: " + e.message);
10643 evaluateDevice("11:22:33:44:55:66");
10647 <Type type="octet"/>
10649 <Attribute readonly="readonly" name="minor" id="::Bluetooth::BluetoothClass::minor">
10650 <webidl> readonly attribute octet minor;</webidl>
10653 The minor device class and it refer to the <em>BluetoothClassDeviceMinor</em> interface for the list of possible values.
10659 <Type type="octet"/>
10661 <Attribute readonly="readonly" name="services" id="::Bluetooth::BluetoothClass::services">
10662 <webidl> readonly attribute unsigned short [] services ;</webidl>
10665 The services provided by this device and it refers to the <em>BluetoothClassDeviceService</em> interface for the list of possible
10672 <Type type="array">
10673 <Type type="unsigned short"/>
10676 <Operation name="hasService" id="::Bluetooth::BluetoothClass::hasService">
10677 <webidl> boolean hasService(unsigned short service) raises(<ref>WebAPIException</ref>);</webidl>
10680 Checks whether the given service exists in the <em>services</em>.
10689 http://tizen.org/privilege/bluetooth.gap
10691 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
10692 adapter.getDevice("12:34:56:78:9A:BC", function(device) {
10693 if (device.deviceClass.hasService(tizen.bluetooth.deviceService.POSITIONING)) {
10694 console.log("Device supports Positioning service");
10697 console.log("Couldn't get device for given address: " + e.message);
10701 <Type type="boolean"/>
10703 <Argument name="service">
10706 The service to check.
10709 <Type type="unsigned short"/>
10713 <RaiseException name="WebAPIException">
10716 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
10719 with error type NotSupportedError, if this feature is not supported.
10722 with error type SecurityError, if the application does not have the privilege to call this method.
10725 with error type UnknownError, if any other error occurs.
10732 <Interface name="BluetoothClassDeviceMajor" id="::Bluetooth::BluetoothClassDeviceMajor">
10733 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMajor {
10735 const octet MISC = 0x00;
10736 const octet COMPUTER = 0x01;
10737 const octet PHONE = 0x02;
10738 const octet NETWORK = 0x03;
10739 const octet AUDIO_VIDEO = 0x04;
10740 const octet PERIPHERAL = 0x05;
10741 const octet IMAGING = 0x06;
10742 const octet WEARABLE = 0x07;
10743 const octet TOY = 0x08;
10744 const octet HEALTH = 0x09;
10745 const octet UNCATEGORIZED = 0x1F;
10749 This interface holds the identifiers for major device classes of Bluetooth CoD.
10755 <ExtendedAttributeList>
10756 <ExtendedAttribute name="NoInterfaceObject">
10757 <webidl>NoInterfaceObject</webidl>
10758 </ExtendedAttribute>
10759 </ExtendedAttributeList>
10760 <Const name="MISC" value="0x00" id="::Bluetooth::BluetoothClassDeviceMajor::MISC">
10761 <webidl> const octet MISC = 0x00;</webidl>
10762 <Type type="octet"/>
10764 <Const name="COMPUTER" value="0x01" id="::Bluetooth::BluetoothClassDeviceMajor::COMPUTER">
10765 <webidl> const octet COMPUTER = 0x01;</webidl>
10766 <Type type="octet"/>
10768 <Const name="PHONE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMajor::PHONE">
10769 <webidl> const octet PHONE = 0x02;</webidl>
10770 <Type type="octet"/>
10772 <Const name="NETWORK" value="0x03" id="::Bluetooth::BluetoothClassDeviceMajor::NETWORK">
10773 <webidl> const octet NETWORK = 0x03;</webidl>
10774 <Type type="octet"/>
10776 <Const name="AUDIO_VIDEO" value="0x04" id="::Bluetooth::BluetoothClassDeviceMajor::AUDIO_VIDEO">
10777 <webidl> const octet AUDIO_VIDEO = 0x04;</webidl>
10778 <Type type="octet"/>
10780 <Const name="PERIPHERAL" value="0x05" id="::Bluetooth::BluetoothClassDeviceMajor::PERIPHERAL">
10781 <webidl> const octet PERIPHERAL = 0x05;</webidl>
10782 <Type type="octet"/>
10784 <Const name="IMAGING" value="0x06" id="::Bluetooth::BluetoothClassDeviceMajor::IMAGING">
10785 <webidl> const octet IMAGING = 0x06;</webidl>
10786 <Type type="octet"/>
10788 <Const name="WEARABLE" value="0x07" id="::Bluetooth::BluetoothClassDeviceMajor::WEARABLE">
10789 <webidl> const octet WEARABLE = 0x07;</webidl>
10790 <Type type="octet"/>
10792 <Const name="TOY" value="0x08" id="::Bluetooth::BluetoothClassDeviceMajor::TOY">
10793 <webidl> const octet TOY = 0x08;</webidl>
10794 <Type type="octet"/>
10796 <Const name="HEALTH" value="0x09" id="::Bluetooth::BluetoothClassDeviceMajor::HEALTH">
10797 <webidl> const octet HEALTH = 0x09;</webidl>
10798 <Type type="octet"/>
10800 <Const name="UNCATEGORIZED" value="0x1F" id="::Bluetooth::BluetoothClassDeviceMajor::UNCATEGORIZED">
10801 <webidl> const octet UNCATEGORIZED = 0x1F;</webidl>
10802 <Type type="octet"/>
10805 <Interface name="BluetoothClassDeviceMinor" id="::Bluetooth::BluetoothClassDeviceMinor">
10806 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceMinor {
10807 const octet COMPUTER_UNCATEGORIZED = 0x00;
10808 const octet COMPUTER_DESKTOP = 0x01;
10809 const octet COMPUTER_SERVER = 0x02;
10810 const octet COMPUTER_LAPTOP = 0x03;
10811 const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;
10812 const octet COMPUTER_PALM_PC_OR_PDA = 0x05;
10813 const octet COMPUTER_WEARABLE = 0x06;
10815 const octet PHONE_UNCATEGORIZED = 0x00;
10816 const octet PHONE_CELLULAR = 0x01;
10817 const octet PHONE_CORDLESS = 0x02;
10818 const octet PHONE_SMARTPHONE = 0x03;
10819 const octet PHONE_MODEM_OR_GATEWAY = 0x04;
10820 const octet PHONE_ISDN = 0x05;
10822 const octet AV_UNRECOGNIZED = 0x00;
10823 const octet AV_WEARABLE_HEADSET = 0x01;
10824 const octet AV_HANDSFREE = 0x02;
10825 const octet AV_MICROPHONE = 0x04;
10826 const octet AV_LOUDSPEAKER = 0x05;
10827 const octet AV_HEADPHONES = 0x06;
10828 const octet AV_PORTABLE_AUDIO = 0x07;
10829 const octet AV_CAR_AUDIO = 0x08;
10830 const octet AV_SETTOP_BOX = 0x09;
10831 const octet AV_HIFI = 0x0a;
10832 const octet AV_VCR = 0x0b;
10833 const octet AV_VIDEO_CAMERA = 0x0c;
10834 const octet AV_CAMCORDER = 0x0d;
10835 const octet AV_MONITOR = 0x0e;
10836 const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;
10837 const octet AV_VIDEO_CONFERENCING = 0x10;
10838 const octet AV_GAMING_TOY = 0x12;
10840 const octet PERIPHERAL_UNCATEGORIZED = 0;
10841 const octet PERIPHERAL_KEYBOARD = 0x10;
10842 const octet PERIPHERAL_POINTING_DEVICE = 0x20;
10843 const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;
10844 const octet PERIPHERAL_JOYSTICK = 0x01;
10845 const octet PERIPHERAL_GAMEPAD = 0x02;
10846 const octet PERIPHERAL_REMOTE_CONTROL = 0x03;
10847 const octet PERIPHERAL_SENSING_DEVICE = 0x04;
10848 const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;
10849 const octet PERIPHERAL_CARD_READER = 0x06;
10850 const octet PERIPHERAL_DIGITAL_PEN = 0x07;
10851 const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;
10852 const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;
10854 const octet IMAGING_UNCATEGORIZED = 0x00;
10855 const octet IMAGING_DISPLAY = 0x04;
10856 const octet IMAGING_CAMERA = 0x08;
10857 const octet IMAGING_SCANNER = 0x10;
10858 const octet IMAGING_PRINTER = 0x20;
10860 const octet WEARABLE_WRITST_WATCH = 0x01;
10861 const octet WEARABLE_PAGER = 0x02;
10862 const octet WEARABLE_JACKET = 0x03;
10863 const octet WEARABLE_HELMET = 0x04;
10864 const octet WEARABLE_GLASSES = 0x05;
10866 const octet TOY_ROBOT = 0x01;
10867 const octet TOY_VEHICLE = 0x02;
10868 const octet TOY_DOLL = 0x03;
10869 const octet TOY_CONTROLLER = 0x04;
10870 const octet TOY_GAME = 0x05;
10872 const octet HEALTH_UNDEFINED = 0x00;
10873 const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;
10874 const octet HEALTH_THERMOMETER = 0x02;
10875 const octet HEALTH_WEIGHING_SCALE = 0x03;
10876 const octet HEALTH_GLUCOSE_METER = 0x04;
10877 const octet HEALTH_PULSE_OXIMETER = 0x05;
10878 const octet HEALTH_PULSE_RATE_MONITOR = 0x06;
10879 const octet HEALTH_DATA_DISPLAY = 0x07;
10880 const octet HEALTH_STEP_COUNTER = 0x08;
10881 const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;
10882 const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;
10883 const octet HEALTH_MEDICATION_MONITOR = 0x0b;
10884 const octet HEALTH_KNEE_PROSTHESIS = 0x0c;
10885 const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;
10889 This interface holds the identifiers for minor device classes of Bluetooth CoD.
10895 <ExtendedAttributeList>
10896 <ExtendedAttribute name="NoInterfaceObject">
10897 <webidl>NoInterfaceObject</webidl>
10898 </ExtendedAttribute>
10899 </ExtendedAttributeList>
10900 <Const name="COMPUTER_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_UNCATEGORIZED">
10901 <webidl> const octet COMPUTER_UNCATEGORIZED = 0x00;</webidl>
10902 <Type type="octet"/>
10904 <Const name="COMPUTER_DESKTOP" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_DESKTOP">
10905 <webidl> const octet COMPUTER_DESKTOP = 0x01;</webidl>
10906 <Type type="octet"/>
10908 <Const name="COMPUTER_SERVER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_SERVER">
10909 <webidl> const octet COMPUTER_SERVER = 0x02;</webidl>
10910 <Type type="octet"/>
10912 <Const name="COMPUTER_LAPTOP" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_LAPTOP">
10913 <webidl> const octet COMPUTER_LAPTOP = 0x03;</webidl>
10914 <Type type="octet"/>
10916 <Const name="COMPUTER_HANDHELD_PC_OR_PDA" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_HANDHELD_PC_OR_PDA">
10917 <webidl> const octet COMPUTER_HANDHELD_PC_OR_PDA = 0x04;</webidl>
10918 <Type type="octet"/>
10920 <Const name="COMPUTER_PALM_PC_OR_PDA" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_PALM_PC_OR_PDA">
10921 <webidl> const octet COMPUTER_PALM_PC_OR_PDA = 0x05;</webidl>
10922 <Type type="octet"/>
10924 <Const name="COMPUTER_WEARABLE" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::COMPUTER_WEARABLE">
10925 <webidl> const octet COMPUTER_WEARABLE = 0x06;</webidl>
10926 <Type type="octet"/>
10928 <Const name="PHONE_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_UNCATEGORIZED">
10929 <webidl> const octet PHONE_UNCATEGORIZED = 0x00;</webidl>
10930 <Type type="octet"/>
10932 <Const name="PHONE_CELLULAR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CELLULAR">
10933 <webidl> const octet PHONE_CELLULAR = 0x01;</webidl>
10934 <Type type="octet"/>
10936 <Const name="PHONE_CORDLESS" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_CORDLESS">
10937 <webidl> const octet PHONE_CORDLESS = 0x02;</webidl>
10938 <Type type="octet"/>
10940 <Const name="PHONE_SMARTPHONE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_SMARTPHONE">
10941 <webidl> const octet PHONE_SMARTPHONE = 0x03;</webidl>
10942 <Type type="octet"/>
10944 <Const name="PHONE_MODEM_OR_GATEWAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_MODEM_OR_GATEWAY">
10945 <webidl> const octet PHONE_MODEM_OR_GATEWAY = 0x04;</webidl>
10946 <Type type="octet"/>
10948 <Const name="PHONE_ISDN" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PHONE_ISDN">
10949 <webidl> const octet PHONE_ISDN = 0x05;</webidl>
10950 <Type type="octet"/>
10952 <Const name="AV_UNRECOGNIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::AV_UNRECOGNIZED">
10953 <webidl> const octet AV_UNRECOGNIZED = 0x00;</webidl>
10954 <Type type="octet"/>
10956 <Const name="AV_WEARABLE_HEADSET" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::AV_WEARABLE_HEADSET">
10957 <webidl> const octet AV_WEARABLE_HEADSET = 0x01;</webidl>
10958 <Type type="octet"/>
10960 <Const name="AV_HANDSFREE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HANDSFREE">
10961 <webidl> const octet AV_HANDSFREE = 0x02;</webidl>
10962 <Type type="octet"/>
10964 <Const name="AV_MICROPHONE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MICROPHONE">
10965 <webidl> const octet AV_MICROPHONE = 0x04;</webidl>
10966 <Type type="octet"/>
10968 <Const name="AV_LOUDSPEAKER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::AV_LOUDSPEAKER">
10969 <webidl> const octet AV_LOUDSPEAKER = 0x05;</webidl>
10970 <Type type="octet"/>
10972 <Const name="AV_HEADPHONES" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HEADPHONES">
10973 <webidl> const octet AV_HEADPHONES = 0x06;</webidl>
10974 <Type type="octet"/>
10976 <Const name="AV_PORTABLE_AUDIO" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::AV_PORTABLE_AUDIO">
10977 <webidl> const octet AV_PORTABLE_AUDIO = 0x07;</webidl>
10978 <Type type="octet"/>
10980 <Const name="AV_CAR_AUDIO" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAR_AUDIO">
10981 <webidl> const octet AV_CAR_AUDIO = 0x08;</webidl>
10982 <Type type="octet"/>
10984 <Const name="AV_SETTOP_BOX" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::AV_SETTOP_BOX">
10985 <webidl> const octet AV_SETTOP_BOX = 0x09;</webidl>
10986 <Type type="octet"/>
10988 <Const name="AV_HIFI" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::AV_HIFI">
10989 <webidl> const octet AV_HIFI = 0x0a;</webidl>
10990 <Type type="octet"/>
10992 <Const name="AV_VCR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VCR">
10993 <webidl> const octet AV_VCR = 0x0b;</webidl>
10994 <Type type="octet"/>
10996 <Const name="AV_VIDEO_CAMERA" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CAMERA">
10997 <webidl> const octet AV_VIDEO_CAMERA = 0x0c;</webidl>
10998 <Type type="octet"/>
11000 <Const name="AV_CAMCORDER" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::AV_CAMCORDER">
11001 <webidl> const octet AV_CAMCORDER = 0x0d;</webidl>
11002 <Type type="octet"/>
11004 <Const name="AV_MONITOR" value="0x0e" id="::Bluetooth::BluetoothClassDeviceMinor::AV_MONITOR">
11005 <webidl> const octet AV_MONITOR = 0x0e;</webidl>
11006 <Type type="octet"/>
11008 <Const name="AV_DISPLAY_AND_LOUDSPEAKER" value="0x0f" id="::Bluetooth::BluetoothClassDeviceMinor::AV_DISPLAY_AND_LOUDSPEAKER">
11009 <webidl> const octet AV_DISPLAY_AND_LOUDSPEAKER = 0x0f;</webidl>
11010 <Type type="octet"/>
11012 <Const name="AV_VIDEO_CONFERENCING" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::AV_VIDEO_CONFERENCING">
11013 <webidl> const octet AV_VIDEO_CONFERENCING = 0x10;</webidl>
11014 <Type type="octet"/>
11016 <Const name="AV_GAMING_TOY" value="0x12" id="::Bluetooth::BluetoothClassDeviceMinor::AV_GAMING_TOY">
11017 <webidl> const octet AV_GAMING_TOY = 0x12;</webidl>
11018 <Type type="octet"/>
11020 <Const name="PERIPHERAL_UNCATEGORIZED" value="0" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_UNCATEGORIZED">
11021 <webidl> const octet PERIPHERAL_UNCATEGORIZED = 0;</webidl>
11022 <Type type="octet"/>
11024 <Const name="PERIPHERAL_KEYBOARD" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD">
11025 <webidl> const octet PERIPHERAL_KEYBOARD = 0x10;</webidl>
11026 <Type type="octet"/>
11028 <Const name="PERIPHERAL_POINTING_DEVICE" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_POINTING_DEVICE">
11029 <webidl> const octet PERIPHERAL_POINTING_DEVICE = 0x20;</webidl>
11030 <Type type="octet"/>
11032 <Const name="PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE" value="0x30" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE">
11033 <webidl> const octet PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE = 0x30;</webidl>
11034 <Type type="octet"/>
11036 <Const name="PERIPHERAL_JOYSTICK" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_JOYSTICK">
11037 <webidl> const octet PERIPHERAL_JOYSTICK = 0x01;</webidl>
11038 <Type type="octet"/>
11040 <Const name="PERIPHERAL_GAMEPAD" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_GAMEPAD">
11041 <webidl> const octet PERIPHERAL_GAMEPAD = 0x02;</webidl>
11042 <Type type="octet"/>
11044 <Const name="PERIPHERAL_REMOTE_CONTROL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_REMOTE_CONTROL">
11045 <webidl> const octet PERIPHERAL_REMOTE_CONTROL = 0x03;</webidl>
11046 <Type type="octet"/>
11048 <Const name="PERIPHERAL_SENSING_DEVICE" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_SENSING_DEVICE">
11049 <webidl> const octet PERIPHERAL_SENSING_DEVICE = 0x04;</webidl>
11050 <Type type="octet"/>
11052 <Const name="PERIPHERAL_DEGITIZER_TABLET" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DEGITIZER_TABLET">
11053 <webidl> const octet PERIPHERAL_DEGITIZER_TABLET = 0x05;</webidl>
11054 <Type type="octet"/>
11056 <Const name="PERIPHERAL_CARD_READER" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_CARD_READER">
11057 <webidl> const octet PERIPHERAL_CARD_READER = 0x06;</webidl>
11058 <Type type="octet"/>
11060 <Const name="PERIPHERAL_DIGITAL_PEN" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_DIGITAL_PEN">
11061 <webidl> const octet PERIPHERAL_DIGITAL_PEN = 0x07;</webidl>
11062 <Type type="octet"/>
11064 <Const name="PERIPHERAL_HANDHELD_SCANNER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_SCANNER">
11065 <webidl> const octet PERIPHERAL_HANDHELD_SCANNER = 0x08;</webidl>
11066 <Type type="octet"/>
11068 <Const name="PERIPHERAL_HANDHELD_INPUT_DEVICE" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::PERIPHERAL_HANDHELD_INPUT_DEVICE">
11069 <webidl> const octet PERIPHERAL_HANDHELD_INPUT_DEVICE = 0x09;</webidl>
11070 <Type type="octet"/>
11072 <Const name="IMAGING_UNCATEGORIZED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_UNCATEGORIZED">
11073 <webidl> const octet IMAGING_UNCATEGORIZED = 0x00;</webidl>
11074 <Type type="octet"/>
11076 <Const name="IMAGING_DISPLAY" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_DISPLAY">
11077 <webidl> const octet IMAGING_DISPLAY = 0x04;</webidl>
11078 <Type type="octet"/>
11080 <Const name="IMAGING_CAMERA" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_CAMERA">
11081 <webidl> const octet IMAGING_CAMERA = 0x08;</webidl>
11082 <Type type="octet"/>
11084 <Const name="IMAGING_SCANNER" value="0x10" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_SCANNER">
11085 <webidl> const octet IMAGING_SCANNER = 0x10;</webidl>
11086 <Type type="octet"/>
11088 <Const name="IMAGING_PRINTER" value="0x20" id="::Bluetooth::BluetoothClassDeviceMinor::IMAGING_PRINTER">
11089 <webidl> const octet IMAGING_PRINTER = 0x20;</webidl>
11090 <Type type="octet"/>
11092 <Const name="WEARABLE_WRITST_WATCH" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_WRITST_WATCH">
11093 <webidl> const octet WEARABLE_WRITST_WATCH = 0x01;</webidl>
11094 <Type type="octet"/>
11096 <Const name="WEARABLE_PAGER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_PAGER">
11097 <webidl> const octet WEARABLE_PAGER = 0x02;</webidl>
11098 <Type type="octet"/>
11100 <Const name="WEARABLE_JACKET" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_JACKET">
11101 <webidl> const octet WEARABLE_JACKET = 0x03;</webidl>
11102 <Type type="octet"/>
11104 <Const name="WEARABLE_HELMET" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_HELMET">
11105 <webidl> const octet WEARABLE_HELMET = 0x04;</webidl>
11106 <Type type="octet"/>
11108 <Const name="WEARABLE_GLASSES" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::WEARABLE_GLASSES">
11109 <webidl> const octet WEARABLE_GLASSES = 0x05;</webidl>
11110 <Type type="octet"/>
11112 <Const name="TOY_ROBOT" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_ROBOT">
11113 <webidl> const octet TOY_ROBOT = 0x01;</webidl>
11114 <Type type="octet"/>
11116 <Const name="TOY_VEHICLE" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_VEHICLE">
11117 <webidl> const octet TOY_VEHICLE = 0x02;</webidl>
11118 <Type type="octet"/>
11120 <Const name="TOY_DOLL" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_DOLL">
11121 <webidl> const octet TOY_DOLL = 0x03;</webidl>
11122 <Type type="octet"/>
11124 <Const name="TOY_CONTROLLER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_CONTROLLER">
11125 <webidl> const octet TOY_CONTROLLER = 0x04;</webidl>
11126 <Type type="octet"/>
11128 <Const name="TOY_GAME" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::TOY_GAME">
11129 <webidl> const octet TOY_GAME = 0x05;</webidl>
11130 <Type type="octet"/>
11132 <Const name="HEALTH_UNDEFINED" value="0x00" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_UNDEFINED">
11133 <webidl> const octet HEALTH_UNDEFINED = 0x00;</webidl>
11134 <Type type="octet"/>
11136 <Const name="HEALTH_BLOOD_PRESSURE_MONITOR" value="0x01" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BLOOD_PRESSURE_MONITOR">
11137 <webidl> const octet HEALTH_BLOOD_PRESSURE_MONITOR = 0x01;</webidl>
11138 <Type type="octet"/>
11140 <Const name="HEALTH_THERMOMETER" value="0x02" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_THERMOMETER">
11141 <webidl> const octet HEALTH_THERMOMETER = 0x02;</webidl>
11142 <Type type="octet"/>
11144 <Const name="HEALTH_WEIGHING_SCALE" value="0x03" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_WEIGHING_SCALE">
11145 <webidl> const octet HEALTH_WEIGHING_SCALE = 0x03;</webidl>
11146 <Type type="octet"/>
11148 <Const name="HEALTH_GLUCOSE_METER" value="0x04" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_GLUCOSE_METER">
11149 <webidl> const octet HEALTH_GLUCOSE_METER = 0x04;</webidl>
11150 <Type type="octet"/>
11152 <Const name="HEALTH_PULSE_OXIMETER" value="0x05" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_OXIMETER">
11153 <webidl> const octet HEALTH_PULSE_OXIMETER = 0x05;</webidl>
11154 <Type type="octet"/>
11156 <Const name="HEALTH_PULSE_RATE_MONITOR" value="0x06" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PULSE_RATE_MONITOR">
11157 <webidl> const octet HEALTH_PULSE_RATE_MONITOR = 0x06;</webidl>
11158 <Type type="octet"/>
11160 <Const name="HEALTH_DATA_DISPLAY" value="0x07" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_DATA_DISPLAY">
11161 <webidl> const octet HEALTH_DATA_DISPLAY = 0x07;</webidl>
11162 <Type type="octet"/>
11164 <Const name="HEALTH_STEP_COUNTER" value="0x08" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_STEP_COUNTER">
11165 <webidl> const octet HEALTH_STEP_COUNTER = 0x08;</webidl>
11166 <Type type="octet"/>
11168 <Const name="HEALTH_BODY_COMPOSITION_ANALYZER" value="0x09" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_BODY_COMPOSITION_ANALYZER">
11169 <webidl> const octet HEALTH_BODY_COMPOSITION_ANALYZER = 0x09;</webidl>
11170 <Type type="octet"/>
11172 <Const name="HEALTH_PEAK_FLOW_MONITOR" value="0x0a" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_PEAK_FLOW_MONITOR">
11173 <webidl> const octet HEALTH_PEAK_FLOW_MONITOR = 0x0a;</webidl>
11174 <Type type="octet"/>
11176 <Const name="HEALTH_MEDICATION_MONITOR" value="0x0b" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_MEDICATION_MONITOR">
11177 <webidl> const octet HEALTH_MEDICATION_MONITOR = 0x0b;</webidl>
11178 <Type type="octet"/>
11180 <Const name="HEALTH_KNEE_PROSTHESIS" value="0x0c" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_KNEE_PROSTHESIS">
11181 <webidl> const octet HEALTH_KNEE_PROSTHESIS = 0x0c;</webidl>
11182 <Type type="octet"/>
11184 <Const name="HEALTH_ANKLE_PROSTHESIS" value="0x0d" id="::Bluetooth::BluetoothClassDeviceMinor::HEALTH_ANKLE_PROSTHESIS">
11185 <webidl> const octet HEALTH_ANKLE_PROSTHESIS = 0x0d;</webidl>
11186 <Type type="octet"/>
11189 <Interface name="BluetoothClassDeviceService" id="::Bluetooth::BluetoothClassDeviceService">
11190 <webidl> [NoInterfaceObject] interface BluetoothClassDeviceService {
11191 const unsigned short LIMITED_DISCOVERABILITY = 0x0001;
11192 const unsigned short POSITIONING = 0x0008;
11193 const unsigned short NETWORKING = 0x0010;
11194 const unsigned short RENDERING = 0x0020;
11195 const unsigned short CAPTURING = 0x0040;
11196 const unsigned short OBJECT_TRANSFER = 0x0080;
11197 const unsigned short AUDIO = 0x0100;
11198 const unsigned short TELEPHONY = 0x0200;
11199 const unsigned short INFORMATION = 0x0400;
11203 This interface holds identifiers for the major service classes of Bluetooth CoD.
11209 <ExtendedAttributeList>
11210 <ExtendedAttribute name="NoInterfaceObject">
11211 <webidl>NoInterfaceObject</webidl>
11212 </ExtendedAttribute>
11213 </ExtendedAttributeList>
11214 <Const name="LIMITED_DISCOVERABILITY" value="0x0001" id="::Bluetooth::BluetoothClassDeviceService::LIMITED_DISCOVERABILITY">
11215 <webidl> const unsigned short LIMITED_DISCOVERABILITY = 0x0001;</webidl>
11216 <Type type="unsigned short"/>
11218 <Const name="POSITIONING" value="0x0008" id="::Bluetooth::BluetoothClassDeviceService::POSITIONING">
11219 <webidl> const unsigned short POSITIONING = 0x0008;</webidl>
11220 <Type type="unsigned short"/>
11222 <Const name="NETWORKING" value="0x0010" id="::Bluetooth::BluetoothClassDeviceService::NETWORKING">
11223 <webidl> const unsigned short NETWORKING = 0x0010;</webidl>
11224 <Type type="unsigned short"/>
11226 <Const name="RENDERING" value="0x0020" id="::Bluetooth::BluetoothClassDeviceService::RENDERING">
11227 <webidl> const unsigned short RENDERING = 0x0020;</webidl>
11228 <Type type="unsigned short"/>
11230 <Const name="CAPTURING" value="0x0040" id="::Bluetooth::BluetoothClassDeviceService::CAPTURING">
11231 <webidl> const unsigned short CAPTURING = 0x0040;</webidl>
11232 <Type type="unsigned short"/>
11234 <Const name="OBJECT_TRANSFER" value="0x0080" id="::Bluetooth::BluetoothClassDeviceService::OBJECT_TRANSFER">
11235 <webidl> const unsigned short OBJECT_TRANSFER = 0x0080;</webidl>
11236 <Type type="unsigned short"/>
11238 <Const name="AUDIO" value="0x0100" id="::Bluetooth::BluetoothClassDeviceService::AUDIO">
11239 <webidl> const unsigned short AUDIO = 0x0100;</webidl>
11240 <Type type="unsigned short"/>
11242 <Const name="TELEPHONY" value="0x0200" id="::Bluetooth::BluetoothClassDeviceService::TELEPHONY">
11243 <webidl> const unsigned short TELEPHONY = 0x0200;</webidl>
11244 <Type type="unsigned short"/>
11246 <Const name="INFORMATION" value="0x0400" id="::Bluetooth::BluetoothClassDeviceService::INFORMATION">
11247 <webidl> const unsigned short INFORMATION = 0x0400;</webidl>
11248 <Type type="unsigned short"/>
11251 <Interface name="BluetoothServiceHandler" id="::Bluetooth::BluetoothServiceHandler">
11252 <webidl> [NoInterfaceObject] interface BluetoothServiceHandler {
11253 readonly attribute <ref>BluetoothUUID</ref> uuid;
11254 readonly attribute DOMString name;
11255 readonly attribute boolean isConnected;
11256 [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11258 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11262 This interface provides methods to handle Bluetooth service.
11268 <ExtendedAttributeList>
11269 <ExtendedAttribute name="NoInterfaceObject">
11270 <webidl>NoInterfaceObject</webidl>
11271 </ExtendedAttribute>
11272 </ExtendedAttributeList>
11273 <Attribute readonly="readonly" name="uuid" id="::Bluetooth::BluetoothServiceHandler::uuid">
11274 <webidl> readonly attribute <ref>BluetoothUUID</ref> uuid;</webidl>
11277 The UUID of the service.
11283 <Type name="BluetoothUUID"/>
11285 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothServiceHandler::name">
11286 <webidl> readonly attribute DOMString name;</webidl>
11289 The name of the service.
11295 <Type type="DOMString"/>
11297 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothServiceHandler::isConnected">
11298 <webidl> readonly attribute boolean isConnected;</webidl>
11301 An attribute to check whether any remote devices is using this service or not.
11307 <Type type="boolean"/>
11309 <Attribute name="onconnect" id="::Bluetooth::BluetoothServiceHandler::onconnect">
11310 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothSocketSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11313 The success callback to be invoked when a remote device is connected to this service.
11314 By default, this attribute is set to null.
11320 <ExtendedAttributeList>
11321 <ExtendedAttribute name="TreatNonCallableAsNull">
11322 <webidl>TreatNonCallableAsNull</webidl>
11323 </ExtendedAttribute>
11324 </ExtendedAttributeList>
11325 <Type name="BluetoothSocketSuccessCallback" nullable="nullable"/>
11327 <RaiseException name="WebAPIException">
11330 with error type TypeMismatchError, if any input attribute is not compatible with the expected type for this attribute.
11336 <Operation name="unregister" id="::Bluetooth::BluetoothServiceHandler::unregister">
11337 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11340 Unregisters a service record from the Bluetooth services record database and stops listening for new connections to this service.
11344 The ErrorCallback is launched with these error types:
11348 UnknownError - If any other error occurs. </li>
11358 http://tizen.org/privilege/bluetooth.spp
11360 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11361 var chatServiceHandler = null;
11363 function chatServiceSuccessCb(handler) {
11364 console.log("Chat service registration was successful!");
11366 chatServiceHandler = handler;
11367 handler.onconnect = function(socket) {
11368 console.log("Client is connected: " + socket.peer.name + "," + socket.peer.address);
11369 socket.onmessage = function() {
11370 var data = socket.readData();
11371 // Handle message code goes here
11376 socket.onclose = function() {
11377 console.log('The socket is closed.');
11382 function publishChatService()
11384 var CHAT_SERVICE_UUID = "5BCE9431-6C75-32AB-AFE0-2EC108A30860";
11385 adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCb,
11388 console.log( "Could not register service record, Error: " + e.message);
11392 function unRegisterChatService()
11394 if (chatServiceHandler != null) {
11395 chatServiceHandler.unregister(function() {
11396 chatServiceHandler = null;
11397 console.log("Chat service is unregistered.");
11400 console.log ("Error: " + e.message);
11406 <Type type="void"/>
11408 <Argument optional="optional" name="successCallback">
11411 The method to be invoked when the record is removed successfully from the service records database.
11414 <Type name="SuccessCallback" nullable="nullable"/>
11416 <Argument optional="optional" name="errorCallback">
11419 The method to be invoked in case of failure (to unregister).
11422 <Type name="ErrorCallback" nullable="nullable"/>
11426 <RaiseException name="WebAPIException">
11429 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
11432 with error type SecurityError, if the application does not have the privilege to call this method.
11435 with error type NotSupportedError, if this feature is not supported.
11442 <Interface name="BluetoothProfileHandler" id="::Bluetooth::BluetoothProfileHandler">
11443 <webidl> [NoInterfaceObject] interface BluetoothProfileHandler {
11445 readonly attribute <ref>BluetoothProfileType</ref> profileType;
11450 This interface represents the Bluetooth profile handler.
11456 <ExtendedAttributeList>
11457 <ExtendedAttribute name="NoInterfaceObject">
11458 <webidl>NoInterfaceObject</webidl>
11459 </ExtendedAttribute>
11460 </ExtendedAttributeList>
11461 <Attribute readonly="readonly" name="profileType" id="::Bluetooth::BluetoothProfileHandler::profileType">
11462 <webidl> readonly attribute <ref>BluetoothProfileType</ref> profileType;</webidl>
11465 The type of Bluetooth profile.
11471 <Type name="BluetoothProfileType"/>
11474 <Interface name="BluetoothHealthProfileHandler" id="::Bluetooth::BluetoothHealthProfileHandler">
11475 <webidl> [NoInterfaceObject] interface BluetoothHealthProfileHandler : <ref>BluetoothProfileHandler</ref> {
11477 void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11479 void connectToSource(<ref>BluetoothDevice</ref> peer, <ref>BluetoothHealthApplication</ref> application, <ref>BluetoothHealthChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11484 This interface represents the handler of Bluetooth health device profile.
11485 The BluetoothHealthProfileHandler object is created by <em>BluetoothAdapter.getBluetoothProfileHandler()</em>.
11491 <ExtendedAttributeList>
11492 <ExtendedAttribute name="NoInterfaceObject">
11493 <webidl>NoInterfaceObject</webidl>
11494 </ExtendedAttribute>
11495 </ExtendedAttributeList>
11496 <InterfaceInheritance>
11497 <Name name="BluetoothProfileHandler"/>
11498 </InterfaceInheritance>
11499 <Operation name="registerSinkApplication" id="::Bluetooth::BluetoothHealthProfileHandler::registerSinkApplication">
11500 <webidl> void registerSinkApplication(unsigned short dataType, DOMString name, <ref>BluetoothHealthApplicationSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11503 Registers an application for the Sink role.
11507 The ErrorCallback is launched with these error types:
11511 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11513 UnknownError - If any other error occurs. </li>
11523 http://tizen.org/privilege/bluetooth.health
11525 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11526 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11528 function healthRegisterSuccess(app) {
11529 console.log("Registered application: " + app.name);
11532 function healthRegisterError(e) {
11533 console.log("Failed to register application: " + e.message);
11536 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11539 <Type type="void"/>
11541 <Argument name="dataType">
11544 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.
11547 <Type type="unsigned short"/>
11549 <Argument name="name">
11552 The friendly name associated with sink application.
11555 <Type type="DOMString"/>
11557 <Argument name="successCallback">
11560 The method to invoke when a sink application is registered successfully.
11563 <Type name="BluetoothHealthApplicationSuccessCallback"/>
11565 <Argument optional="optional" name="errorCallback">
11568 The method to invoke when an error occurs.
11571 <Type name="ErrorCallback" nullable="nullable"/>
11575 <RaiseException name="WebAPIException">
11578 with error type SecurityError, if the application does not have the privilege to call this method.
11581 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11584 with error type NotSupportedError, if this feature is not supported.
11590 <Operation name="connectToSource" id="::Bluetooth::BluetoothHealthProfileHandler::connectToSource">
11591 <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>
11594 Connect to the health device which acts as the Source role.
11598 The ErrorCallback is launched with these error types:
11602 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11604 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
11606 UnknownError - If any other error occurs. </li>
11616 http://tizen.org/privilege/bluetooth.health
11618 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11619 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11620 var registerHealthApp = null;
11622 function healthConnectSuccess(channel) {
11623 console.log("Health device is connected");
11626 function healthConnectError(e) {
11627 console.log("Failed to connect to source: " + e.message);
11630 function gotDeviceInfo(device) {
11631 healthProfileHandler.connectToSource(device, registerHealthApp, healthConnectSuccess, healthConnectError);
11634 function healthRegisterSuccess(app) {
11635 console.log("Registered application: " + app.name);
11636 registerHealthApp = app;
11637 var peer = adapter.getDevice("35:F4:59:D1:7A:03", gotDeviceInfo);
11640 function healthRegisterError(e) {
11641 console.log("Failed to register application: " + e.message);
11644 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11647 <Type type="void"/>
11649 <Argument name="peer">
11652 The remote device which acts as the Source role.
11655 <Type name="BluetoothDevice"/>
11657 <Argument name="application">
11660 The registered application for the Sink role.
11663 <Type name="BluetoothHealthApplication"/>
11665 <Argument name="successCallback">
11668 The method to invoke when a connection is established successfully.
11671 <Type name="BluetoothHealthChannelSuccessCallback"/>
11673 <Argument optional="optional" name="errorCallback">
11676 The method to invoke when an error occurs.
11679 <Type name="ErrorCallback" nullable="nullable"/>
11683 <RaiseException name="WebAPIException">
11686 with error type SecurityError, if the application does not have the privilege to call this method.
11689 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11692 with error type NotSupportedError, if this feature is not supported.
11699 <Interface name="BluetoothHealthApplication" id="::Bluetooth::BluetoothHealthApplication">
11700 <webidl> [NoInterfaceObject] interface BluetoothHealthApplication {
11702 readonly attribute unsigned short dataType;
11704 readonly attribute DOMString name;
11706 [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);
11708 void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
11713 This interface represents the Bluetooth health application.
11719 <ExtendedAttributeList>
11720 <ExtendedAttribute name="NoInterfaceObject">
11721 <webidl>NoInterfaceObject</webidl>
11722 </ExtendedAttribute>
11723 </ExtendedAttributeList>
11724 <Attribute readonly="readonly" name="dataType" id="::Bluetooth::BluetoothHealthApplication::dataType">
11725 <webidl> readonly attribute unsigned short dataType;</webidl>
11728 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.
11734 <Type type="unsigned short"/>
11736 <Attribute readonly="readonly" name="name" id="::Bluetooth::BluetoothHealthApplication::name">
11737 <webidl> readonly attribute DOMString name;</webidl>
11740 The friendly name associated with sink application.
11746 <Type type="DOMString"/>
11748 <Attribute name="onconnect" id="::Bluetooth::BluetoothHealthApplication::onconnect">
11749 <webidl> [TreatNonCallableAsNull] attribute <ref>BluetoothHealthChannelSuccessCallback</ref>? onconnect raises(<ref>WebAPIException</ref>);</webidl>
11752 The callback invoked when a health device is connected through this application.
11753 By default, this attribute is set to null.
11759 <ExtendedAttributeList>
11760 <ExtendedAttribute name="TreatNonCallableAsNull">
11761 <webidl>TreatNonCallableAsNull</webidl>
11762 </ExtendedAttribute>
11763 </ExtendedAttributeList>
11764 <Type name="BluetoothHealthChannelSuccessCallback" nullable="nullable"/>
11766 <RaiseException name="WebAPIException">
11769 with error type TypeMismatchError, if an input attribute is not compatible with the expected type for this attribute.
11775 <Operation name="unregister" id="::Bluetooth::BluetoothHealthApplication::unregister">
11776 <webidl> void unregister(optional <ref>SuccessCallback</ref>? successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
11779 Unregisters this application.
11783 The ErrorCallback is launched with these error types:
11787 ServiceNotAvailableError - If a Bluetooth device is turned off. </li>
11789 UnknownError - If any other error occurs. </li>
11799 http://tizen.org/privilege/bluetooth.health
11801 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11802 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11803 var healthApp = null;
11805 function healthRegisterSuccess(app) {
11806 console.log("Registered application: " + app.name);
11808 healthApp.onconnect = function(channel) {
11809 console.log("Connected!!");
11813 function healthRegisterError(e) {
11814 console.log("Failed to register application: " + e.message);
11817 function startSink() {
11819 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11821 console.log("Error: " + e.message);
11825 function stopSink() {
11827 if(healthApp != null) {
11828 healthApp.unregister(function() {
11830 console.log("Health application is unregistered.");
11833 console.log ("Error: " + e.message);
11837 console.log("Error: " + err.message);
11842 <Type type="void"/>
11844 <Argument optional="optional" name="successCallback">
11847 The method to invoke when a sink application is registered successfully.
11850 <Type name="SuccessCallback" nullable="nullable"/>
11852 <Argument optional="optional" name="errorCallback">
11855 The method to invoke when an error occurs.
11858 <Type name="ErrorCallback" nullable="nullable"/>
11862 <RaiseException name="WebAPIException">
11865 with error type SecurityError, if the application does not have the privilege to call this method.
11868 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
11871 with error type NotSupportedError, if this feature is not supported.
11878 <Interface name="BluetoothHealthChannel" id="::Bluetooth::BluetoothHealthChannel">
11879 <webidl> [NoInterfaceObject] interface BluetoothHealthChannel {
11881 readonly attribute <ref>BluetoothDevice</ref> peer;
11883 readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;
11885 readonly attribute <ref>BluetoothHealthApplication</ref> application;
11887 readonly attribute boolean isConnected;
11889 void close() raises(<ref>WebAPIException</ref>);
11891 unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);
11893 void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
11895 void unsetListener() raises(<ref>WebAPIException</ref>);
11900 This interface represents the Bluetooth health channel.
11906 <ExtendedAttributeList>
11907 <ExtendedAttribute name="NoInterfaceObject">
11908 <webidl>NoInterfaceObject</webidl>
11909 </ExtendedAttribute>
11910 </ExtendedAttributeList>
11911 <Attribute readonly="readonly" name="peer" id="::Bluetooth::BluetoothHealthChannel::peer">
11912 <webidl> readonly attribute <ref>BluetoothDevice</ref> peer;</webidl>
11915 The remote device to which this channel is connected.
11921 <Type name="BluetoothDevice"/>
11923 <Attribute readonly="readonly" name="channelType" id="::Bluetooth::BluetoothHealthChannel::channelType">
11924 <webidl> readonly attribute <ref>BluetoothHealthChannelType</ref> channelType;</webidl>
11927 The type of of this channel.
11933 <Type name="BluetoothHealthChannelType"/>
11935 <Attribute readonly="readonly" name="application" id="::Bluetooth::BluetoothHealthChannel::application">
11936 <webidl> readonly attribute <ref>BluetoothHealthApplication</ref> application;</webidl>
11939 The health application which is used to communicate with the remote device.
11945 <Type name="BluetoothHealthApplication"/>
11947 <Attribute readonly="readonly" name="isConnected" id="::Bluetooth::BluetoothHealthChannel::isConnected">
11948 <webidl> readonly attribute boolean isConnected;</webidl>
11951 An attrbitue to check whether any remote device is connected or not.
11957 <Type type="boolean"/>
11959 <Operation name="close" id="::Bluetooth::BluetoothHealthChannel::close">
11960 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
11963 Close the connected channel.
11964 <em>BluetoothHealthChannel.isConnected</em> is changed to <var>false</var> and <em>BluetoothHealthChannelChangeCallback.onclose</em> is invoked when this channel is closed successfully.
11973 http://tizen.org/privilege/bluetooth.health
11975 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
11976 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
11978 function healthRegisterSuccess(app) {
11979 console.log("Registered application: " + app.name);
11980 app.onconnect = function(channel) {;
11981 console.log("Health device is connected");
11986 function healthRegisterError(e) {
11987 console.log("Failed to register application: " + e.message);
11990 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
11993 <Type type="void"/>
11996 <RaiseException name="WebAPIException">
11999 with error type SecurityError, if the application does not have the privilege to call this method.
12002 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12005 with error type UnknownError, if any other error occurs.
12008 with error type NotSupportedError, if this feature is not supported.
12014 <Operation name="sendData" id="::Bluetooth::BluetoothHealthChannel::sendData">
12015 <webidl> unsigned long sendData(byte[] data) raises(<ref>WebAPIException</ref>);</webidl>
12018 Send data and returns the number of bytes actually written.
12027 http://tizen.org/privilege/bluetooth.health
12029 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12030 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12032 function healthRegisterSuccess(app) {
12033 console.log("Registered application: " + app.name);
12034 app.onconnect = function(channel) {
12035 console.log("Health device is connected");
12036 channel.sendData(dataToSend);
12040 function healthRegisterError(e) {
12041 console.log("Failed to register application: " + e.message);
12044 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12047 <Type type="unsigned long">
12050 unsigned long The number of bytes actually sent.
12055 <Argument name="data">
12061 <Type type="array">
12062 <Type type="byte"/>
12067 <RaiseException name="WebAPIException">
12070 with error type SecurityError, if the application does not have the privilege to call this method.
12073 with error type ServiceNotAvailableError - If a Bluetooth device is turned off.
12076 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
12079 with error type UnknownError, if any other error occurs.
12082 with error type NotSupportedError, if this feature is not supported.
12088 <Operation name="setListener" id="::Bluetooth::BluetoothHealthChannel::setListener">
12089 <webidl> void setListener(<ref>BluetoothHealthChannelChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
12092 Sets the listener to receive notifications.
12101 http://tizen.org/privilege/bluetooth.health
12103 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12104 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12106 var channelCallback = {
12107 onmessage: function(data) {
12108 console.log("data is received")
12110 onclose: function() {
12111 console.log("channel is closed");
12115 function healthRegisterSuccess(app) {
12116 console.log("Registered application: " + app.name);
12117 app.onconnect = function(channel) {;
12118 console.log("Health device is connected");
12119 channel.setListener(channelCallback);
12123 function healthRegisterError(e) {
12124 console.log("Failed to register application: " + e.message);
12127 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12130 <Type type="void"/>
12132 <Argument name="listener">
12135 The event listener of Bluetooth health channel.
12138 <Type name="BluetoothHealthChannelChangeCallback"/>
12142 <RaiseException name="WebAPIException">
12145 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
12148 with error type SecurityError, if the application does not have the privilege to call this method.
12151 with error type UnknownError, if any other error occurs.
12157 <Operation name="unsetListener" id="::Bluetooth::BluetoothHealthChannel::unsetListener">
12158 <webidl> void unsetListener() raises(<ref>WebAPIException</ref>);</webidl>
12161 Unsets the listener, so stop receiving notifications.
12170 http://tizen.org/privilege/bluetooth.health
12172 <Code> var adapter = tizen.bluetooth.getDefaultAdapter();
12173 var healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
12174 var connectedChannel = null;
12176 var channelCallback = {
12177 onmessage: function(data) {
12178 console.log("data is received")
12180 onclose: function() {
12181 console.log("channel is closed");
12182 connectedChannel.unsetListener();
12186 function healthRegisterSuccess(app) {
12187 console.log("Registered application: " + app.name);
12188 app.onconnect = function(channel) {;
12189 console.log("Health device is connected");
12190 connectedChannel = channel;
12191 connectedChannel.setListener(channelCallback);
12195 function healthRegisterError(e) {
12196 console.log("Failed to register application: " + e.message);
12199 healthProfileHandler.registerSinkApplication(4100, "testSinkApp", healthRegisterSuccess, healthRegisterError);
12202 <Type type="void"/>
12205 <RaiseException name="WebAPIException">
12208 with error type SecurityError, if the application does not have the privilege to call this method.
12211 with error type UnknownError, if any other error occurs.
12218 <Interface name="BluetoothAdapterChangeCallback" id="::Bluetooth::BluetoothAdapterChangeCallback">
12219 <webidl> [Callback, NoInterfaceObject] interface BluetoothAdapterChangeCallback {
12220 void onstatechanged(boolean powered);
12221 void onnamechanged(DOMString name);
12222 void onvisibilitychanged(boolean visible);
12226 This interface specifies a set of methods to be invoked when the changes of Bluetooth adapter occur.
12232 <ExtendedAttributeList>
12233 <ExtendedAttribute name="Callback">
12234 <webidl>Callback</webidl>
12235 </ExtendedAttribute>
12236 <ExtendedAttribute name="NoInterfaceObject">
12237 <webidl> NoInterfaceObject</webidl>
12238 </ExtendedAttribute>
12239 </ExtendedAttributeList>
12240 <Operation name="onstatechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onstatechanged">
12241 <webidl> void onstatechanged(boolean powered);</webidl>
12244 The method to be invoked when the power state is changed.
12250 <Type type="void"/>
12252 <Argument name="powered">
12255 The power state of local Bluetooth: <var>true</var> means power-on, <var>false</var> means power-off.
12258 <Type type="boolean"/>
12262 <Operation name="onnamechanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onnamechanged">
12263 <webidl> void onnamechanged(DOMString name);</webidl>
12266 The method to be invoked when the name is changed.
12272 <Type type="void"/>
12274 <Argument name="name">
12277 The name of local Bluetooth.
12280 <Type type="DOMString"/>
12284 <Operation name="onvisibilitychanged" id="::Bluetooth::BluetoothAdapterChangeCallback::onvisibilitychanged">
12285 <webidl> void onvisibilitychanged(boolean visible);</webidl>
12288 The method to be invoked when the visibility is changed.
12294 <Type type="void"/>
12296 <Argument name="visible">
12299 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.
12302 <Type type="boolean"/>
12307 <Interface name="BluetoothDeviceSuccessCallback" id="::Bluetooth::BluetoothDeviceSuccessCallback">
12308 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceSuccessCallback {
12309 void onsuccess(<ref>BluetoothDevice</ref> device);
12313 This interface implements the success callback <em>BluetoothAdapter.getDevice() </em>and <em>BluetoothAdapter.createBonding()</em>.
12319 <ExtendedAttributeList>
12320 <ExtendedAttribute name="Callback" value="FunctionOnly">
12321 <webidl>Callback</webidl>
12322 </ExtendedAttribute>
12323 <ExtendedAttribute name="NoInterfaceObject">
12324 <webidl> NoInterfaceObject</webidl>
12325 </ExtendedAttribute>
12326 </ExtendedAttributeList>
12327 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceSuccessCallback::onsuccess">
12328 <webidl> void onsuccess(<ref>BluetoothDevice</ref> device);</webidl>
12331 The method to be invoked on success.
12337 <Type type="void"/>
12339 <Argument name="device">
12342 The BluetoothDevice object.
12345 <Type name="BluetoothDevice"/>
12350 <Interface name="BluetoothDeviceArraySuccessCallback" id="::Bluetooth::BluetoothDeviceArraySuccessCallback">
12351 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothDeviceArraySuccessCallback {
12352 void onsuccess(<ref>BluetoothDevice</ref>[] devices);
12356 The success callback for <em>BluetoothAdapter.getKnownDevices()</em>.
12362 <ExtendedAttributeList>
12363 <ExtendedAttribute name="Callback" value="FunctionOnly">
12364 <webidl>Callback</webidl>
12365 </ExtendedAttribute>
12366 <ExtendedAttribute name="NoInterfaceObject">
12367 <webidl> NoInterfaceObject</webidl>
12368 </ExtendedAttribute>
12369 </ExtendedAttributeList>
12370 <Operation name="onsuccess" id="::Bluetooth::BluetoothDeviceArraySuccessCallback::onsuccess">
12371 <webidl> void onsuccess(<ref>BluetoothDevice</ref>[] devices);</webidl>
12374 The method to be invoked when device information is ready.
12380 <Type type="void"/>
12382 <Argument name="devices">
12385 List of devices known to local Bluetooth adapter. Each element is a BluetoothDevice.
12388 <Type type="array">
12389 <Type name="BluetoothDevice"/>
12395 <Interface name="BluetoothDiscoverDevicesSuccessCallback" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback">
12396 <webidl> [Callback, NoInterfaceObject] interface BluetoothDiscoverDevicesSuccessCallback {
12398 void ondevicefound(<ref>BluetoothDevice</ref> device);
12399 void ondevicedisappeared(<ref>BluetoothAddress</ref> address);
12400 void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);
12404 The success callback for <em>BluetoothAdapter.discoverDevices()</em>.
12410 <ExtendedAttributeList>
12411 <ExtendedAttribute name="Callback">
12412 <webidl>Callback</webidl>
12413 </ExtendedAttribute>
12414 <ExtendedAttribute name="NoInterfaceObject">
12415 <webidl> NoInterfaceObject</webidl>
12416 </ExtendedAttribute>
12417 </ExtendedAttributeList>
12418 <Operation name="onstarted" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onstarted">
12419 <webidl> void onstarted();</webidl>
12422 The method to be invoked at the beginning of a device discovery process for finding the nearby Bluetooth device.
12428 <Type type="void"/>
12431 <Operation name="ondevicefound" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicefound">
12432 <webidl> void ondevicefound(<ref>BluetoothDevice</ref> device);</webidl>
12435 The method to be invoked when a new device is discovered in the process of inquiry/discovery.
12441 <Type type="void"/>
12443 <Argument name="device">
12449 <Type name="BluetoothDevice"/>
12453 <Operation name="ondevicedisappeared" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::ondevicedisappeared">
12454 <webidl> void ondevicedisappeared(<ref>BluetoothAddress</ref> address);</webidl>
12457 The method to be invoked when a device is lost from proximity.
12458 After that, this device is no longer visible.
12464 <Type type="void"/>
12466 <Argument name="address">
12469 The address of the device that is no longer in range or visible.
12472 <Type name="BluetoothAddress"/>
12476 <Operation name="onfinished" id="::Bluetooth::BluetoothDiscoverDevicesSuccessCallback::onfinished">
12477 <webidl> void onfinished(<ref>BluetoothDevice</ref>[] foundDevices);</webidl>
12480 The method to be invoked when the device discovery process has finished.
12486 <Type type="void"/>
12488 <Argument name="foundDevices">
12491 The array of devices found in this discovery session. </p></description>
12493 <Type type="array">
12494 <Type name="BluetoothDevice"/>
12500 <Interface name="BluetoothSocketSuccessCallback" id="::Bluetooth::BluetoothSocketSuccessCallback">
12501 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothSocketSuccessCallback {
12502 void onsuccess(<ref>BluetoothSocket</ref> socket);
12506 The success method for <em>BluetoothDevice.connectToServiceByUUID()</em>.
12512 <ExtendedAttributeList>
12513 <ExtendedAttribute name="Callback" value="FunctionOnly">
12514 <webidl>Callback</webidl>
12515 </ExtendedAttribute>
12516 <ExtendedAttribute name="NoInterfaceObject">
12517 <webidl> NoInterfaceObject</webidl>
12518 </ExtendedAttribute>
12519 </ExtendedAttributeList>
12520 <Operation name="onsuccess" id="::Bluetooth::BluetoothSocketSuccessCallback::onsuccess">
12521 <webidl> void onsuccess(<ref>BluetoothSocket</ref> socket);</webidl>
12524 The method to be invoked when the connection to a service is ready.
12530 <Type type="void"/>
12532 <Argument name="socket">
12535 The socket to connect to the specified service on a remote device.
12538 <Type name="BluetoothSocket"/>
12543 <Interface name="BluetoothServiceSuccessCallback" id="::Bluetooth::BluetoothServiceSuccessCallback">
12544 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothServiceSuccessCallback {
12545 void onsuccess(<ref>BluetoothServiceHandler</ref> handler);
12549 This interface implements the success callback for <em>BluetoothAdapter.registerRFCOMMServiceByUUID()</em>.
12555 <ExtendedAttributeList>
12556 <ExtendedAttribute name="Callback" value="FunctionOnly">
12557 <webidl>Callback</webidl>
12558 </ExtendedAttribute>
12559 <ExtendedAttribute name="NoInterfaceObject">
12560 <webidl> NoInterfaceObject</webidl>
12561 </ExtendedAttribute>
12562 </ExtendedAttributeList>
12563 <Operation name="onsuccess" id="::Bluetooth::BluetoothServiceSuccessCallback::onsuccess">
12564 <webidl> void onsuccess(<ref>BluetoothServiceHandler</ref> handler);</webidl>
12567 The method to be invoked when registering a service with the local device is successful.
12573 <Type type="void"/>
12575 <Argument name="handler">
12578 Bluetooth service handler.
12581 <Type name="BluetoothServiceHandler"/>
12586 <Interface name="BluetoothHealthApplicationSuccessCallback" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback">
12587 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthApplicationSuccessCallback {
12588 void onsuccess(<ref>BluetoothHealthApplication</ref> application);
12592 The success method for <em>BluetoothHealthProfileHandler.registerSinkApplication()</em>.
12598 <ExtendedAttributeList>
12599 <ExtendedAttribute name="Callback" value="FunctionOnly">
12600 <webidl>Callback</webidl>
12601 </ExtendedAttribute>
12602 <ExtendedAttribute name="NoInterfaceObject">
12603 <webidl> NoInterfaceObject</webidl>
12604 </ExtendedAttribute>
12605 </ExtendedAttributeList>
12606 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthApplicationSuccessCallback::onsuccess">
12607 <webidl> void onsuccess(<ref>BluetoothHealthApplication</ref> application);</webidl>
12610 The method to be invoked when the application is registered successfully.
12616 <Type type="void"/>
12618 <Argument name="application">
12621 The registered health application.
12624 <Type name="BluetoothHealthApplication"/>
12629 <Interface name="BluetoothHealthChannelSuccessCallback" id="::Bluetooth::BluetoothHealthChannelSuccessCallback">
12630 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface BluetoothHealthChannelSuccessCallback {
12631 void onsuccess(<ref>BluetoothHealthChannel</ref> channel);
12635 The success method for <em>BluetoothHealthProfileHandler.connectToSource()</em> and the event callback for <em>BluetoothHealthApplication.onconnect</em>.
12641 <ExtendedAttributeList>
12642 <ExtendedAttribute name="Callback" value="FunctionOnly">
12643 <webidl>Callback</webidl>
12644 </ExtendedAttribute>
12645 <ExtendedAttribute name="NoInterfaceObject">
12646 <webidl> NoInterfaceObject</webidl>
12647 </ExtendedAttribute>
12648 </ExtendedAttributeList>
12649 <Operation name="onsuccess" id="::Bluetooth::BluetoothHealthChannelSuccessCallback::onsuccess">
12650 <webidl> void onsuccess(<ref>BluetoothHealthChannel</ref> channel);</webidl>
12653 The method to be invoked when a connection is established.
12659 <Type type="void"/>
12661 <Argument name="channel">
12664 The connected health channel.
12667 <Type name="BluetoothHealthChannel"/>
12672 <Interface name="BluetoothHealthChannelChangeCallback" id="::Bluetooth::BluetoothHealthChannelChangeCallback">
12673 <webidl> [Callback, NoInterfaceObject] interface BluetoothHealthChannelChangeCallback {
12674 void onmessage(byte[] data);
12680 This interface specifies a set of methods to be invoked when the changes of heath channel occur.
12686 <ExtendedAttributeList>
12687 <ExtendedAttribute name="Callback">
12688 <webidl>Callback</webidl>
12689 </ExtendedAttribute>
12690 <ExtendedAttribute name="NoInterfaceObject">
12691 <webidl> NoInterfaceObject</webidl>
12692 </ExtendedAttribute>
12693 </ExtendedAttributeList>
12694 <Operation name="onmessage" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onmessage">
12695 <webidl> void onmessage(byte[] data);</webidl>
12698 The method to be invoked when the message is received.
12704 <Type type="void"/>
12706 <Argument name="data">
12712 <Type type="array">
12713 <Type type="byte"/>
12718 <Operation name="onclose" id="::Bluetooth::BluetoothHealthChannelChangeCallback::onclose">
12719 <webidl> void onclose();</webidl>
12722 The method to be invoked when the health channel is closed.
12728 <Type type="void"/>
12733 <Module name="Bookmark" id="::Bookmark">
12734 <webidl>module Bookmark {
12736 typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;
12739 [NoInterfaceObject] interface BookmarkManagerObject {
12740 readonly attribute <ref>BookmarkManager</ref> bookmark;
12742 <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;
12745 [NoInterfaceObject] interface BookmarkManager {
12747 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12749 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12751 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12756 [Constructor(DOMString title, DOMString url)]
12758 interface BookmarkItem {
12760 readonly attribute <ref>BookmarkFolder</ref>? parent;
12762 readonly attribute DOMString title;
12764 readonly attribute DOMString url;
12768 [Constructor(DOMString title)]
12770 interface BookmarkFolder {
12772 readonly attribute <ref>BookmarkFolder</ref>? parent;
12774 readonly attribute DOMString title;
12780 This API provides interfaces and methods for accessing Bookmark.
12781 This API provides functionality to get, add, and remove bookmarks.
12785 For more information on the Bookmark features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/bookmark.htm">Bookmark Guide</a>.
12792 <Typedef name="Bookmark" id="::Bookmark::Bookmark">
12793 <webidl> typedef (<ref>BookmarkItem</ref> or <ref>BookmarkFolder</ref>) Bookmark;</webidl>
12796 A bookmark, which could be either a <em>BookmarkItem </em>or a <em>BookmarkFolder</em>.
12802 <Type type="union">
12803 <Type name="BookmarkItem"/>
12804 <Type name="BookmarkFolder"/>
12807 <Interface name="BookmarkManagerObject" id="::Bookmark::BookmarkManagerObject">
12808 <webidl> [NoInterfaceObject] interface BookmarkManagerObject {
12809 readonly attribute <ref>BookmarkManager</ref> bookmark;
12813 Defines what is instantiated by the Tizen object from the Tizen Platform.
12817 There will be a <em>tizen.bookmark </em>object that allows to access the functionality of the Bookmark API.
12824 <ExtendedAttributeList>
12825 <ExtendedAttribute name="NoInterfaceObject">
12826 <webidl>NoInterfaceObject</webidl>
12827 </ExtendedAttribute>
12828 </ExtendedAttributeList>
12829 <Attribute readonly="readonly" name="bookmark" id="::Bookmark::BookmarkManagerObject::bookmark">
12830 <webidl> readonly attribute <ref>BookmarkManager</ref> bookmark;</webidl>
12831 <Type name="BookmarkManager"/>
12834 <Implements name1="Tizen" name2="BookmarkManagerObject">
12835 <webidl> <ref>Tizen</ref> implements <ref>BookmarkManagerObject</ref>;</webidl>
12837 <Interface name="BookmarkManager" id="::Bookmark::BookmarkManager">
12838 <webidl> [NoInterfaceObject] interface BookmarkManager {
12840 <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);
12842 void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);
12844 void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);
12849 This interface provides access to the bookmark folder and bookmark item.
12853 It provides access to the API functionalities through the <em>tizen.bookmark </em>interface.
12860 <ExtendedAttributeList>
12861 <ExtendedAttribute name="NoInterfaceObject">
12862 <webidl>NoInterfaceObject</webidl>
12863 </ExtendedAttribute>
12864 </ExtendedAttributeList>
12865 <Operation name="get" id="::Bookmark::BookmarkManager::get">
12866 <webidl> <ref>Bookmark</ref>[] get(optional <ref>BookmarkFolder</ref>? parentFolder, optional boolean? recursive) raises(<ref>WebAPIException</ref>);</webidl>
12869 Gets all bookmark items and bookmark folders.
12873 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12874 In this case, the return will contain bookmarks under the root bookmark folder.
12881 http://tizen.org/privilege/bookmark.read
12887 // retrieve bookmarks from the root bookmark folder recursively
12888 var allBookmarks = tizen.bookmark.get(null, true);
12890 console.log (err.name +": " + err.message);
12894 <Type type="array">
12897 Bookmark[] Array of Bookmarks.
12900 <Type name="Bookmark"/>
12903 <Argument optional="optional" name="parentFolder">
12906 The parent bookmark folder to retrieve the result bookmarks.
12909 <Type name="BookmarkFolder" nullable="nullable"/>
12911 <Argument optional="optional" name="recursive">
12914 The flag indicating whether sub-bookmarks are also retrieved recursively or not<br/> (The default value is <em>false</em>).
12917 <Type type="boolean" nullable="nullable"/>
12921 <RaiseException name="WebAPIException">
12924 with error type NotFoundError, if the parentFolder parameter isn't found in bookmark database.
12927 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
12930 with error type SecurityError, if the application does not have the privilege to call this method.
12933 with error type UnknownError, if any other error occurs.
12939 <Operation name="add" id="::Bookmark::BookmarkManager::add">
12940 <webidl> void add(<ref>Bookmark</ref> bookmark, optional <ref>BookmarkFolder</ref>? parentFolder) raises(<ref>WebAPIException</ref>);</webidl>
12943 Adds a bookmark item or a bookmark folder.
12947 If no parentFolder is passed, or the parentFolder contains <var>null</var>, it is considered as the default bookmark folder(The root bookmark folder).
12948 In this case, the bookmark is added under the root bookmark folder.
12955 http://tizen.org/privilege/bookmark.write
12961 // add a bookmark item to root bookmark folder.
12962 tizen.bookmark.add(new tizen.BookmarkItem("tizen", "https://www.tizen.org"));
12964 console.log (err.name +": " + err.message);
12968 <Type type="void"/>
12970 <Argument name="bookmark">
12973 The bookmark to be added.
12976 <Type name="Bookmark"/>
12978 <Argument optional="optional" name="parentFolder">
12981 The parent folder of a bookmark to be added.
12984 <Type name="BookmarkFolder" nullable="nullable"/>
12988 <RaiseException name="WebAPIException">
12991 with error type NotFoundError, if a parentFolder parameter isn't found in bookmark database.
12994 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.
12997 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
13000 with error type SecurityError, if the application does not have the privilege to call this method.
13003 with error type UnknownError, if any other error occurs.
13009 <Operation name="remove" id="::Bookmark::BookmarkManager::remove">
13010 <webidl> void remove(optional <ref>Bookmark</ref>? bookmark) raises(<ref>WebAPIException</ref>);</webidl>
13013 Removes a bookmark item or a bookmark folder.
13017 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).
13018 In this case, all the bookmarks will be removed.
13025 http://tizen.org/privilege/bookmark.write
13031 // remove all the bookmark folders and items
13032 tizen.bookmark.remove();
13034 console.log (err.name +": " + err.message);
13038 <Type type="void"/>
13040 <Argument optional="optional" name="bookmark">
13043 The bookmark to be removed.
13046 <Type name="Bookmark" nullable="nullable"/>
13050 <RaiseException name="WebAPIException">
13053 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
13056 with error type SecurityError, if the application does not have the privilege to call this method.
13059 with error type UnknownError, if any other error occurs.
13066 <Interface name="BookmarkItem" id="::Bookmark::BookmarkItem">
13067 <webidl> [Constructor(DOMString title, DOMString url)]
13069 interface BookmarkItem {
13071 readonly attribute <ref>BookmarkFolder</ref>? parent;
13073 readonly attribute DOMString title;
13075 readonly attribute DOMString url;
13080 This interface implements the <em>BookmarkItem </em>object.
13086 <ExtendedAttributeList>
13087 <ExtendedAttribute name="Constructor">
13088 <webidl>Constructor(DOMString title, DOMString url)</webidl>
13091 // create a bookmark item
13092 var tizen = new tizen.BookmarkItem("tizen", "https://www.tizen.org");
13094 console.log (err.name +": " + err.message);
13099 <Argument name="title">
13100 <Type type="DOMString"/>
13102 <Argument name="url">
13103 <Type type="DOMString"/>
13106 </ExtendedAttribute>
13107 </ExtendedAttributeList>
13108 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkItem::parent">
13109 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13112 The parent bookmark folder.
13116 This attribute is meaningful when this object is successfully added or retrieved.
13117 If this BookmarkItem is not added yet, its value is set to undefined.
13120 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13127 <Type name="BookmarkFolder" nullable="nullable"/>
13129 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkItem::title">
13130 <webidl> readonly attribute DOMString title;</webidl>
13133 The title of the bookmark.
13139 <Type type="DOMString"/>
13141 <Attribute readonly="readonly" name="url" id="::Bookmark::BookmarkItem::url">
13142 <webidl> readonly attribute DOMString url;</webidl>
13145 The uri of the bookmark.
13151 <Type type="DOMString"/>
13154 <Interface name="BookmarkFolder" id="::Bookmark::BookmarkFolder">
13155 <webidl> [Constructor(DOMString title)]
13157 interface BookmarkFolder {
13159 readonly attribute <ref>BookmarkFolder</ref>? parent;
13161 readonly attribute DOMString title;
13166 This interface implements the <em>BookmarkFolder </em>object.
13172 <ExtendedAttributeList>
13173 <ExtendedAttribute name="Constructor">
13174 <webidl>Constructor(DOMString title)</webidl>
13177 // create a bookmark folder
13178 var folder = new tizen.BookmarkFolder("folder");
13180 console.log (err.name +": " + err.message);
13185 <Argument name="title">
13186 <Type type="DOMString"/>
13189 </ExtendedAttribute>
13190 </ExtendedAttributeList>
13191 <Attribute readonly="readonly" name="parent" id="::Bookmark::BookmarkFolder::parent">
13192 <webidl> readonly attribute <ref>BookmarkFolder</ref>? parent;</webidl>
13195 The parent bookmark folder.
13199 This attribute is meaningful when this object is successfully added or retrieved.
13200 If this BookmarkFolder is not added yet, its value is set to undefined.
13203 If the parent bookmark folder indicates the root bookmark folder, the value will be <var>null</var>.
13210 <Type name="BookmarkFolder" nullable="nullable"/>
13212 <Attribute readonly="readonly" name="title" id="::Bookmark::BookmarkFolder::title">
13213 <webidl> readonly attribute DOMString title;</webidl>
13216 The title of the bookmark folder.
13222 <Type type="DOMString"/>
13226 <Module name="Calendar" id="::Calendar">
13227 <webidl>module Calendar {
13228 typedef DOMString CalendarId;
13230 typedef DOMString CalendarTaskId;
13232 typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;
13234 enum CalendarType { "EVENT", "TASK" };
13236 enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };
13238 enum AlarmMethod { "SOUND", "DISPLAY" };
13241 enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };
13243 enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };
13245 enum EventAvailability { "BUSY", "FREE" };
13247 enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };
13249 enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };
13251 enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };
13253 enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };
13255 enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };
13257 enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };
13259 [NoInterfaceObject] interface CalendarManagerObject{
13260 readonly attribute <ref>CalendarManager</ref> calendar;
13262 <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;
13264 [NoInterfaceObject] interface CalendarManager {
13265 void getCalendars(<ref>CalendarType</ref> type,
13266 <ref>CalendarArraySuccessCallback</ref> successCallback,
13267 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13269 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13271 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
13273 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
13276 [NoInterfaceObject] interface Calendar {
13278 readonly attribute <ref>CalendarId</ref> id;
13280 readonly attribute DOMString name;
13282 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13284 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
13286 void addBatch(<ref>CalendarItem</ref>[] items,
13287 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
13288 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13290 void update(<ref>CalendarItem</ref> item,
13291 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13293 void updateBatch(<ref>CalendarItem</ref>[] items,
13294 optional <ref>SuccessCallback</ref>? successCallback,
13295 optional <ref>ErrorCallback</ref>? errorCallback,
13296 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
13298 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
13300 void removeBatch(<ref>CalendarItemId</ref>[] ids,
13301 optional <ref>SuccessCallback</ref>? successCallback,
13302 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13304 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
13305 optional <ref>ErrorCallback</ref>? errorCallback,
13306 optional <ref>AbstractFilter</ref>? filter,
13307 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
13309 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
13311 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
13314 dictionary CalendarItemInit {
13315 DOMString description;
13318 <ref>TZDate</ref> startDate;
13319 <ref>TimeDuration</ref> duration;
13320 DOMString location;
13321 <ref>SimpleCoordinates</ref> geolocation;
13322 DOMString organizer;
13323 <ref>CalendarItemVisibility</ref> visibility;
13324 <ref>CalendarItemStatus</ref> status;
13325 <ref>CalendarItemPriority</ref> priority;
13326 <ref>CalendarAlarm</ref>[] alarms;
13327 DOMString[] categories;
13328 <ref>CalendarAttendee</ref>[] attendees;
13331 dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
13332 <ref>TZDate</ref> dueDate;
13333 <ref>TZDate</ref> completedDate;
13337 dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
13338 <ref>TZDate</ref> endDate;
13339 <ref>EventAvailability</ref> availability;
13340 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
13343 [NoInterfaceObject] interface CalendarItem {
13344 readonly attribute <ref>CalendarItemId</ref>? id;
13346 readonly attribute <ref>CalendarId</ref>? calendarId;
13348 readonly attribute <ref>TZDate</ref>? lastModificationDate;
13350 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
13352 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
13354 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
13356 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
13358 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
13360 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
13362 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
13364 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
13366 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
13368 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
13370 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
13372 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
13374 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
13376 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
13378 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
13380 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
13383 [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
13384 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13385 interface CalendarTask : <ref>CalendarItem</ref> {
13386 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
13388 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
13390 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
13393 [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
13394 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
13395 interface CalendarEvent : <ref>CalendarItem</ref> {
13396 readonly attribute boolean isDetached;
13398 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
13400 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
13402 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
13404 void expandRecurrence(<ref>TZDate</ref> startDate,
13405 <ref>TZDate</ref> endDate,
13406 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
13407 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
13410 dictionary CalendarAttendeeInit {
13412 <ref>AttendeeRole</ref> role;
13413 <ref>AttendeeStatus</ref> status;
13415 <ref>AttendeeType</ref> type;
13417 DOMString delegatorURI;
13418 DOMString delegateURI;
13419 <ref>ContactRef</ref> contactRef;
13422 [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
13423 interface CalendarAttendee
13425 attribute DOMString uri;
13427 attribute DOMString? name;
13429 attribute <ref>AttendeeRole</ref> role;
13431 attribute <ref>AttendeeStatus</ref> status;
13433 attribute boolean RSVP;
13435 attribute <ref>AttendeeType</ref> type;
13437 attribute DOMString? group;
13439 attribute DOMString? delegatorURI;
13441 attribute DOMString? delegateURI;
13443 attribute <ref>ContactRef</ref>? contactRef;
13446 dictionary CalendarRecurrenceRuleInit {
13448 <ref>TZDate</ref> untilDate;
13449 long occurrenceCount;
13450 <ref>ByDayValue</ref>[] daysOfTheWeek;
13451 short[] setPositions;
13452 <ref>TZDate</ref>[] exceptions;
13455 [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
13456 interface CalendarRecurrenceRule
13458 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
13460 attribute unsigned short interval;
13462 attribute <ref>TZDate</ref>? untilDate;
13464 attribute long occurrenceCount;
13466 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
13468 attribute short[] setPositions;
13470 attribute <ref>TZDate</ref>[] exceptions;
13473 [Constructor(DOMString uid, optional DOMString? rid)]
13474 interface CalendarEventId {
13475 attribute DOMString uid;
13477 attribute DOMString? rid;
13480 [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
13481 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
13482 interface CalendarAlarm {
13483 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
13485 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
13487 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
13489 attribute DOMString? description;
13492 [Callback=FunctionOnly, NoInterfaceObject]
13493 interface CalendarEventArraySuccessCallback {
13494 void onsuccess(<ref>CalendarEvent</ref>[] events);
13497 [Callback=FunctionOnly, NoInterfaceObject]
13498 interface CalendarItemArraySuccessCallback {
13499 void onsuccess(<ref>CalendarItem</ref>[] items);
13502 [Callback=FunctionOnly, NoInterfaceObject]
13503 interface CalendarArraySuccessCallback {
13504 void onsuccess(<ref>Calendar</ref>[] calendars);
13507 [Callback, NoInterfaceObject] interface CalendarChangeCallback {
13508 void onitemsadded(<ref>CalendarItem</ref>[] items);
13510 void onitemsupdated(<ref>CalendarItem</ref>[] items);
13512 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
13517 This API provides interfaces and methods for users to manage their schedule.
13518 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.
13522 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>.
13525 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.
13528 For more information on the Calendar features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/calendar.htm">Calendar Guide</a>.
13535 <Typedef name="CalendarId" id="::Calendar::CalendarId">
13536 <webidl> typedef DOMString CalendarId;</webidl>
13539 An attribute to identify the calendar.
13545 <Type type="DOMString"/>
13547 <Typedef name="CalendarTaskId" id="::Calendar::CalendarTaskId">
13548 <webidl> typedef DOMString CalendarTaskId;</webidl>
13551 An attribute to identify a calendar task.
13557 <Type type="DOMString"/>
13559 <Typedef name="CalendarItemId" id="::Calendar::CalendarItemId">
13560 <webidl> typedef (<ref>CalendarEventId</ref> or <ref>CalendarTaskId</ref>) CalendarItemId;</webidl>
13563 A calendar item identifier, which can either be a <em>CalendarEventId </em>or a <em>CalendarTaskId</em>.
13569 <Type type="union">
13570 <Type name="CalendarEventId"/>
13571 <Type name="CalendarTaskId"/>
13574 <Enum name="CalendarType" id="::Calendar::CalendarType">
13575 <webidl> enum CalendarType { "EVENT", "TASK" };</webidl>
13578 An enumerator that indicates the type of a calendar.
13582 The following types are supported:
13586 EVENT - if a calendar contains events (VEVENT objects) </li>
13588 TASK - if a calendar contains tasks (VTODO objects) </li>
13595 <EnumValue stringvalue="EVENT">
13596 <webidl> "EVENT</webidl>
13598 <EnumValue stringvalue="TASK">
13599 <webidl> "TASK</webidl>
13602 <Enum name="CalendarTextFormat" id="::Calendar::CalendarTextFormat">
13603 <webidl> enum CalendarTextFormat { "ICALENDAR_20", "VCALENDAR_10" };</webidl>
13606 An enumerator that indicates the type of textual format of a Calendar.
13610 The following values are supported:
13614 ICALENDAR_20 - if the textual format is iCalendar v2.0 </li>
13616 VCALENDAR_10 - if the textual format is vCalendar v1.0 </li>
13623 <EnumValue stringvalue="ICALENDAR_20">
13624 <webidl> "ICALENDAR_20</webidl>
13626 <EnumValue stringvalue="VCALENDAR_10">
13627 <webidl> "VCALENDAR_10</webidl>
13630 <Enum name="AlarmMethod" id="::Calendar::AlarmMethod">
13631 <webidl> enum AlarmMethod { "SOUND", "DISPLAY" };</webidl>
13634 An enumerator that indicates the type of an alarm.
13638 The following values are supported:
13642 SOUND - if sound is played to alert the user </li>
13644 DISPLAY - if display on screen without any sound is used to alert the user </li>
13651 <EnumValue stringvalue="SOUND">
13652 <webidl> "SOUND</webidl>
13654 <EnumValue stringvalue="DISPLAY">
13655 <webidl> "DISPLAY</webidl>
13658 <Enum name="RecurrenceRuleFrequency" id="::Calendar::RecurrenceRuleFrequency">
13659 <webidl> enum RecurrenceRuleFrequency { "DAILY", "WEEKLY", "MONTHLY", "YEARLY" };</webidl>
13662 An enumerator that indicates the type of frequency for the recurrence of an event.
13666 Only the following values are valid for this attribute:
13670 DAILY - if the event occurs daily </li>
13672 WEEKLY - if the event occurs weekly </li>
13674 MONTHLY - if the event occurs monthly </li>
13676 YEARLY - if the event occurs yearly </li>
13683 <EnumValue stringvalue="DAILY">
13684 <webidl> "DAILY</webidl>
13686 <EnumValue stringvalue="WEEKLY">
13687 <webidl> "WEEKLY</webidl>
13689 <EnumValue stringvalue="MONTHLY">
13690 <webidl> "MONTHLY</webidl>
13692 <EnumValue stringvalue="YEARLY">
13693 <webidl> "YEARLY</webidl>
13696 <Enum name="ByDayValue" id="::Calendar::ByDayValue">
13697 <webidl> enum ByDayValue { "MO", "TU", "WE", "TH", "FR", "SA", "SU" };</webidl>
13700 An enumerator that indicates the values for <em>CalendarRecurrenceRule.daysOfWeek</em>.
13704 "MO" to "SU" correspond to "Monday" to "Sunday".
13711 <EnumValue stringvalue="MO">
13712 <webidl> "MO</webidl>
13714 <EnumValue stringvalue="TU">
13715 <webidl> "TU</webidl>
13717 <EnumValue stringvalue="WE">
13718 <webidl> "WE</webidl>
13720 <EnumValue stringvalue="TH">
13721 <webidl> "TH</webidl>
13723 <EnumValue stringvalue="FR">
13724 <webidl> "FR</webidl>
13726 <EnumValue stringvalue="SA">
13727 <webidl> "SA</webidl>
13729 <EnumValue stringvalue="SU">
13730 <webidl> "SU</webidl>
13733 <Enum name="EventAvailability" id="::Calendar::EventAvailability">
13734 <webidl> enum EventAvailability { "BUSY", "FREE" };</webidl>
13737 An enumerator that indicates the availability of time for an event.
13741 The following values are supported:
13745 FREE - if the specified time slot is vacant </li>
13747 BUSY - if the specified time slot is not vacant </li>
13749 BUSY-UNAVAILABLE - if the specified time slot is not vacant and can not be scheduled </li>
13751 BUSY-TENTATIVE - if the specified time slot is not vacant because one or more events have been tentatively scheduled for that interval </li>
13758 <EnumValue stringvalue="BUSY">
13759 <webidl> "BUSY</webidl>
13761 <EnumValue stringvalue="FREE">
13762 <webidl> "FREE</webidl>
13765 <Enum name="AttendeeType" id="::Calendar::AttendeeType">
13766 <webidl> enum AttendeeType { "INDIVIDUAL", "GROUP", "RESOURCE", "ROOM", "UNKNOWN" };</webidl>
13769 An enumerator that indicates the type of attendee.
13773 At least the following values must be supported:
13777 INDIVIDUAL - Individual </li>
13779 GROUP - Group of individuals </li>
13781 RESOURCE - Physical resource </li>
13783 ROOM - Room resource </li>
13785 UNKNOWN - Unknown </li>
13792 <EnumValue stringvalue="INDIVIDUAL">
13793 <webidl> "INDIVIDUAL</webidl>
13795 <EnumValue stringvalue="GROUP">
13796 <webidl> "GROUP</webidl>
13798 <EnumValue stringvalue="RESOURCE">
13799 <webidl> "RESOURCE</webidl>
13801 <EnumValue stringvalue="ROOM">
13802 <webidl> "ROOM</webidl>
13804 <EnumValue stringvalue="UNKNOWN">
13805 <webidl> "UNKNOWN</webidl>
13808 <Enum name="AttendeeStatus" id="::Calendar::AttendeeStatus">
13809 <webidl> enum AttendeeStatus { "PENDING", "ACCEPTED", "DECLINED", "TENTATIVE", "DELEGATED", "COMPLETED", "IN_PROCESS" };</webidl>
13812 An enumerator that indicates the attendance status of a participant.
13816 At least the following values must be supported:
13820 PENDING - if the participant has not yet responded to the event </li>
13822 ACCEPTED - if the participant has accepted the event </li>
13824 DECLINED - if the participant has declined the event </li>
13826 TENTATIVE - if the participant has tentatively accepted the event </li>
13828 DELEGATED - if the participant has delegated attendance to another participant </li>
13830 COMPLETED - if the participant's event has been completed </li>
13832 IN_PROCESS - if the participant's event is currently in process </li>
13839 <EnumValue stringvalue="PENDING">
13840 <webidl> "PENDING</webidl>
13842 <EnumValue stringvalue="ACCEPTED">
13843 <webidl> "ACCEPTED</webidl>
13845 <EnumValue stringvalue="DECLINED">
13846 <webidl> "DECLINED</webidl>
13848 <EnumValue stringvalue="TENTATIVE">
13849 <webidl> "TENTATIVE</webidl>
13851 <EnumValue stringvalue="DELEGATED">
13852 <webidl> "DELEGATED</webidl>
13854 <EnumValue stringvalue="COMPLETED">
13855 <webidl> "COMPLETED</webidl>
13857 <EnumValue stringvalue="IN_PROCESS">
13858 <webidl> "IN_PROCESS</webidl>
13861 <Enum name="AttendeeRole" id="::Calendar::AttendeeRole">
13862 <webidl> enum AttendeeRole { "REQ_PARTICIPANT", "OPT_PARTICIPANT", "NON_PARTICIPANT", "CHAIR" };</webidl>
13865 An enumerator that indicates the role of an attendee.
13869 At least the following values must be supported:
13873 REQ_PARTICIPANT - if the participation of an attendee is mandatory </li>
13875 OPT_PARTICIPANT - if the participation of an attendee is optional </li>
13877 NON_PARTICIPANT - if the attendee is not a participant but is copied for information purposes </li>
13879 CHAIR - if the attendee is the chairperson of the event. </li>
13886 <EnumValue stringvalue="REQ_PARTICIPANT">
13887 <webidl> "REQ_PARTICIPANT</webidl>
13889 <EnumValue stringvalue="OPT_PARTICIPANT">
13890 <webidl> "OPT_PARTICIPANT</webidl>
13892 <EnumValue stringvalue="NON_PARTICIPANT">
13893 <webidl> "NON_PARTICIPANT</webidl>
13895 <EnumValue stringvalue="CHAIR">
13896 <webidl> "CHAIR</webidl>
13899 <Enum name="CalendarItemPriority" id="::Calendar::CalendarItemPriority">
13900 <webidl> enum CalendarItemPriority { "HIGH", "MEDIUM", "LOW" };</webidl>
13903 An enumerator that indicates the priority of a calendar item.
13907 The following values are supported:
13911 HIGH - if item priority is high </li>
13913 MEDIUM - if item priority is medium </li>
13915 LOW - if item priority is low </li>
13922 <EnumValue stringvalue="HIGH">
13923 <webidl> "HIGH</webidl>
13925 <EnumValue stringvalue="MEDIUM">
13926 <webidl> "MEDIUM</webidl>
13928 <EnumValue stringvalue="LOW">
13929 <webidl> "LOW</webidl>
13932 <Enum name="CalendarItemVisibility" id="::Calendar::CalendarItemVisibility">
13933 <webidl> enum CalendarItemVisibility { "PUBLIC", "PRIVATE", "CONFIDENTIAL" };</webidl>
13936 An enumerator that indicates the visibility type of a calendar item.
13940 The following values are supported:
13944 PUBLIC - if item visibility is public </li>
13946 PRIVATE - if item visibility is private </li>
13948 CONFIDENTIAL - if item visibility is confidential </li>
13955 <EnumValue stringvalue="PUBLIC">
13956 <webidl> "PUBLIC</webidl>
13958 <EnumValue stringvalue="PRIVATE">
13959 <webidl> "PRIVATE</webidl>
13961 <EnumValue stringvalue="CONFIDENTIAL">
13962 <webidl> "CONFIDENTIAL</webidl>
13965 <Enum name="CalendarItemStatus" id="::Calendar::CalendarItemStatus">
13966 <webidl> enum CalendarItemStatus { "TENTATIVE", "CONFIRMED", "CANCELLED", "NEEDS_ACTION", "IN_PROCESS", "COMPLETED" };</webidl>
13969 An enumerator that indicates the status of a calendar item.
13973 For an event, the possible values are:
13977 TENTATIVE - if the event is tentative </li>
13979 CONFIRMED - if the event is confirmed </li>
13981 CANCELLED - if the event is cancelled </li>
13984 For a task, the possible values are:
13988 NEEDS_ACTION - if the task needs action </li>
13990 IN_PROCESS - if the task is in process or being worked on </li>
13992 COMPLETED - if the task has been completed </li>
13994 CANCELLED - if the task has been cancelled </li>
14001 <EnumValue stringvalue="TENTATIVE">
14002 <webidl> "TENTATIVE</webidl>
14004 <EnumValue stringvalue="CONFIRMED">
14005 <webidl> "CONFIRMED</webidl>
14007 <EnumValue stringvalue="CANCELLED">
14008 <webidl> "CANCELLED</webidl>
14010 <EnumValue stringvalue="NEEDS_ACTION">
14011 <webidl> "NEEDS_ACTION</webidl>
14013 <EnumValue stringvalue="IN_PROCESS">
14014 <webidl> "IN_PROCESS</webidl>
14016 <EnumValue stringvalue="COMPLETED">
14017 <webidl> "COMPLETED</webidl>
14020 <Interface name="CalendarManagerObject" id="::Calendar::CalendarManagerObject">
14021 <webidl> [NoInterfaceObject] interface CalendarManagerObject{
14022 readonly attribute <ref>CalendarManager</ref> calendar;
14026 This interface gives access to the Calendar API from the <em>tizen.calendar </em>object.
14032 <ExtendedAttributeList>
14033 <ExtendedAttribute name="NoInterfaceObject">
14034 <webidl>NoInterfaceObject</webidl>
14035 </ExtendedAttribute>
14036 </ExtendedAttributeList>
14037 <Attribute readonly="readonly" name="calendar" id="::Calendar::CalendarManagerObject::calendar">
14038 <webidl> readonly attribute <ref>CalendarManager</ref> calendar;</webidl>
14039 <Type name="CalendarManager"/>
14042 <Implements name1="Tizen" name2="CalendarManagerObject">
14043 <webidl> <ref>Tizen</ref> implements <ref>CalendarManagerObject</ref>;</webidl>
14045 <Interface name="CalendarManager" id="::Calendar::CalendarManager">
14046 <webidl> [NoInterfaceObject] interface CalendarManager {
14047 void getCalendars(<ref>CalendarType</ref> type,
14048 <ref>CalendarArraySuccessCallback</ref> successCallback,
14049 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14051 <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14053 <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);
14055 <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);
14059 This interface provides methods to access calendars and attributes for calendars.
14060 Once a calendar object is obtained, it is possible to add, remove, or update the information it contains through the Calendar interface methods.
14066 <ExtendedAttributeList>
14067 <ExtendedAttribute name="NoInterfaceObject">
14068 <webidl>NoInterfaceObject</webidl>
14069 </ExtendedAttribute>
14070 </ExtendedAttributeList>
14071 <Operation name="getCalendars" id="::Calendar::CalendarManager::getCalendars">
14072 <webidl> void getCalendars(<ref>CalendarType</ref> type,
14073 <ref>CalendarArraySuccessCallback</ref> successCallback,
14074 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14077 Gets an array of Calendar objects.
14081 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.
14084 If no Calendar object is available, the <em>successCallback()</em> is invoked with an empty array.
14087 The errorCallback is launched with these error types:
14091 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
14093 UnknownError - if any other error occurs. </li>
14103 http://tizen.org/privilege/calendar.read
14105 <Code> var calendar;
14107 function eventFoundCallback(events) {
14108 // The event has been successfully found
14109 // Changes the summary
14110 events[0].summary = 'HTML6 Webinar';
14111 calendar.update(events[0]);
14112 console.log('First event was updated!');
14115 // Defines the error callback for all the asynchronous calls
14116 function errorCallback(response) {
14117 console.log( 'The following error occurred: ' + response.name);
14120 // Defines the success callback for retrieving the list of calendars
14121 function calendarListCallback(calendars) {
14122 if(calendars.length > 0) {
14123 calendar = calendars[0];
14124 console.log('The calendar id is ' + calendar.id + ' and name ' + calendar.name);
14126 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14127 summary:'HTML5 Webinar',
14128 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14129 duration: new tizen.TimeDuration(1, "HOURS"),
14130 location:'Huesca'});
14133 // The event has been successfully added
14134 // Checks if the added event can be retrieved from the calendar
14135 // If the calendar was empty, only the item added through add() should be returned
14136 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14137 calendar.find(eventFoundCallback, errorCallback, filter);
14141 // Gets a list of available calendars
14142 tizen.calendar.getCalendars("EVENT", calendarListCallback, errorCallback);
14145 <Type type="void"/>
14147 <Argument name="type">
14150 The type of calendar.
14153 <Type name="CalendarType"/>
14155 <Argument name="successCallback">
14158 The method to invoke when the invocation ends successfully.
14161 <Type name="CalendarArraySuccessCallback"/>
14163 <Argument optional="optional" name="errorCallback">
14166 The method to invoke when an error occurs.
14169 <Type name="ErrorCallback" nullable="nullable"/>
14173 <RaiseException name="WebAPIException">
14176 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14179 with error type SecurityError, if the application does not have the privilege to call this method.
14182 with error type NotSupportedError, if this feature is not supported.
14188 <Operation name="getUnifiedCalendar" id="::Calendar::CalendarManager::getUnifiedCalendar">
14189 <webidl> <ref>Calendar</ref> getUnifiedCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14192 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>.
14196 If an item is added to the unified calendar, it will be saved in the default calendar.
14206 http://tizen.org/privilege/calendar.read
14208 <Code> var unifiedCalendar;
14210 // Defines the error callback for all the asynchronous calls
14211 function errorCallback(response) {
14212 console.log( 'The following error occurred: ' + response.name);
14215 function eventFoundCallback(events) {
14216 // The event has been successfully found
14217 // Changes the summary
14218 events[0].summary = 'HTML6 Webinar';
14219 unifiedCalendar.update(events[0]);
14220 console.log('First event was updated!');
14223 // Gets the unified calendar
14224 unifiedCalendar = tizen.calendar.getUnifiedCalendar("EVENT");
14226 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14227 summary:'HTML5 Webinar ',
14228 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14229 duration: new tizen.TimeDuration(1, "HOURS"),
14230 location:'Huesca'});
14232 unifiedCalendar.add(ev);
14234 // The event has been added
14235 // Checks if the added event can be retrieved from the calendar
14236 // If the calendar was empty, only the item added through add() should be returned
14237 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14238 unifiedCalendar.find(eventFoundCallback, errorCallback, filter);
14242 <Type name="Calendar">
14245 Calendar The unified Calendar object.
14250 <Argument name="type">
14253 The type of a calendar.
14256 <Type name="CalendarType"/>
14260 <RaiseException name="WebAPIException">
14263 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14266 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14269 with error type SecurityError, if the application does not have the privilege to call this method.
14272 with error type NotSupportedError, if this feature is not supported.
14275 with error type UnknownError, if any other error occurs.
14281 <Operation name="getDefaultCalendar" id="::Calendar::CalendarManager::getDefaultCalendar">
14282 <webidl> <ref>Calendar</ref> getDefaultCalendar(<ref>CalendarType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
14285 Gets the default calendar, which is used for new items.
14294 http://tizen.org/privilege/calendar.read
14296 <Code> var myCalendar;
14298 // Defines the error callback for all the asynchronous calls
14299 function errorCallback(response) {
14300 console.log( 'The following error occurred: ' + response.name);
14303 function eventFoundCallback(events) {
14304 // The event has been successfully found
14305 // Changes the summary
14306 events[0].summary = 'HTML6 Webinar';
14307 myCalendar.update(events[0]);
14308 console.log('First event was updated!');
14311 // Gets the default calendar
14312 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14314 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14315 summary:'HTML5 Webinar ',
14316 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14317 duration: new tizen.TimeDuration(1, "HOURS"),
14318 location:'Huesca'});
14320 myCalendar.add(ev);
14322 // The event has been added
14323 // Checks if the added event can be retrieved from the calendar
14324 // If the calendar was empty, only the item added through add() should be returned
14325 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'HTML5');
14326 myCalendar.find(eventFoundCallback, errorCallback, filter);
14330 <Type name="Calendar">
14333 Calendar The default Calendar object.
14338 <Argument name="type">
14341 The type of a calendar.
14344 <Type name="CalendarType"/>
14348 <RaiseException name="WebAPIException">
14351 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14354 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14357 with error type SecurityError, if the application does not have the privilege to call this method.
14360 with error type NotSupportedError, if this feature is not supported.
14363 with error type UnknownError, if any other error occurs.
14369 <Operation name="getCalendar" id="::Calendar::CalendarManager::getCalendar">
14370 <webidl> <ref>Calendar</ref> getCalendar(<ref>CalendarType</ref> type, <ref>CalendarId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14373 Gets the calendar with the specified identifier and type.
14382 http://tizen.org/privilege/calendar.read
14384 <Code> var calendarId; // calendarId supposed to be initialized
14386 var calendar = tizen.calendar.getCalendar("EVENT", calendarId);
14387 console.log("Successfully retrieved event calendar with id: " + calendarId);
14389 console.log("Error: " + err.name);
14393 <Type name="Calendar">
14396 Calendar The matching Calendar object.
14401 <Argument name="type">
14404 The type of a calendar.
14407 <Type name="CalendarType"/>
14409 <Argument name="id">
14412 The calendar identifier.
14415 <Type name="CalendarId"/>
14419 <RaiseException name="WebAPIException">
14422 with error type NotFoundError, if there is no calendar with the given identifier.
14425 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14428 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14431 with error type SecurityError, if the application does not have the privilege to call this method.
14434 with error type NotSupportedError, if this feature is not supported.
14437 with error type UnknownError, if any other error occurs.
14444 <Interface name="Calendar" id="::Calendar::Calendar">
14445 <webidl> [NoInterfaceObject] interface Calendar {
14447 readonly attribute <ref>CalendarId</ref> id;
14449 readonly attribute DOMString name;
14451 <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14453 void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);
14455 void addBatch(<ref>CalendarItem</ref>[] items,
14456 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14457 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14459 void update(<ref>CalendarItem</ref> item,
14460 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14462 void updateBatch(<ref>CalendarItem</ref>[] items,
14463 optional <ref>SuccessCallback</ref>? successCallback,
14464 optional <ref>ErrorCallback</ref>? errorCallback,
14465 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);
14467 void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);
14469 void removeBatch(<ref>CalendarItemId</ref>[] ids,
14470 optional <ref>SuccessCallback</ref>? successCallback,
14471 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
14473 void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
14474 optional <ref>ErrorCallback</ref>? errorCallback,
14475 optional <ref>AbstractFilter</ref>? filter,
14476 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
14478 long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
14480 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
14484 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.
14488 This interface offers the following methods to manage events in a calendar:
14492 Finding items using a key-value filter. </li>
14494 Adding items to a specific calendar using <em>add() </em>/ <em>addBatch() </em>methods. </li>
14496 Updating existing items using <em>update() </em>/ <em>updateBatch()</em> methods. </li>
14498 Deleting existing items using <em>remove()</em> / <em>removeBatch() </em>methods. </li>
14500 Tracking calendar changes using <em>addChangeListener()</em> / <em>removeChangeListener() </em>methods. </li>
14507 <ExtendedAttributeList>
14508 <ExtendedAttribute name="NoInterfaceObject">
14509 <webidl>NoInterfaceObject</webidl>
14510 </ExtendedAttribute>
14511 </ExtendedAttributeList>
14512 <Attribute readonly="readonly" name="id" id="::Calendar::Calendar::id">
14513 <webidl> readonly attribute <ref>CalendarId</ref> id;</webidl>
14516 An attribute to uniquely identify a calendar.
14522 <Type name="CalendarId"/>
14524 <Attribute readonly="readonly" name="name" id="::Calendar::Calendar::name">
14525 <webidl> readonly attribute DOMString name;</webidl>
14528 An attribute to assign a readable (descriptive) name for a calendar, such as work, personal, etc.
14533 <Code> // Gets the default calendar and show its name
14534 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14535 console.log('The calendar name is ' + calendar.name);
14538 <Type type="DOMString"/>
14540 <Operation name="get" id="::Calendar::Calendar::get">
14541 <webidl> <ref>CalendarItem</ref> get(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14544 Gets the calendar item with the specified identifier.
14553 http://tizen.org/privilege/calendar.read
14555 <Code> var myCalendar; // Calendar supposed to be initialized
14556 var itemId; // Calendar item identifier
14558 var item = myCalendar.get(itemId);
14559 console.log("Successfully retrieved item with id: " + itemId);
14561 console.log("Error: " + err.name);
14565 <Type name="CalendarItem">
14568 CalendarItem The matching <em>CalendarItem </em>object.
14573 <Argument name="id">
14576 The Calendar item identifier.
14579 <Type name="CalendarItemId"/>
14583 <RaiseException name="WebAPIException">
14586 with error type NotFoundError, if there is no calendar item with the given identifier.
14589 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14592 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14595 with error type SecurityError, if the application does not have the privilege to call this method.
14598 with error type NotSupportedError, if this feature is not supported.
14601 with error type UnknownError, if any other error occurs.
14607 <Operation name="add" id="::Calendar::Calendar::add">
14608 <webidl> void add(<ref>CalendarItem</ref> item) raises(<ref>WebAPIException</ref>);</webidl>
14611 Adds an item to the calendar synchronously.
14615 If the item is successfully inserted in the calendar, the <em>CalendarItem </em>will have its identifier (id attribute) set when the method returns.
14618 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.
14628 http://tizen.org/privilege/calendar.write
14630 <Code> // Gets the default calendar
14631 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14633 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14634 summary:'HTML5 Webinar ',
14635 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14636 duration: new tizen.TimeDuration(1, "HOURS"),
14637 location:'Huesca'});
14640 console.log('Event added with uid ' + ev.id.uid);
14643 <Type type="void"/>
14645 <Argument name="item">
14648 The calendar item to be added.
14651 <Type name="CalendarItem"/>
14655 <RaiseException name="WebAPIException">
14658 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14661 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14664 with error type SecurityError, if the application does not have the privilege to call this method.
14667 with error type NotSupportedError, if the feature is not supported.
14670 with error type UnknownError, if any other error occurs.
14676 <Operation name="addBatch" id="::Calendar::Calendar::addBatch">
14677 <webidl> void addBatch(<ref>CalendarItem</ref>[] items,
14678 optional <ref>CalendarItemArraySuccessCallback</ref>? successCallback,
14679 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
14682 Adds an array of items to the calendar asynchronously.
14686 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).
14689 The <em>errorCallback()</em> is launched with these error types:
14693 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>
14695 UnknownError - if any other error occurs. </li>
14698 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.
14708 http://tizen.org/privilege/calendar.write
14710 <Code> // Defines the error callback.
14711 function errorCallback(response) {
14712 console.log( 'The following error occurred: ' + response.name);
14715 function addEventsSuccess(events) {
14716 console.log("Successfully added " + events.length + " events!");
14719 // Gets the default calendar
14720 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
14722 var ev = new tizen.CalendarEvent({description:'HTML5 Introduction',
14723 summary:'HTML5 Webinar ',
14724 startDate: new tizen.TZDate(2011, 3, 30, 10, 0),
14725 duration: new tizen.TimeDuration(1, "HOURS"),
14726 location:'Huesca'});
14728 calendar.addBatch([ev], addEventsSuccess, errorCallback);
14731 <Type type="void"/>
14733 <Argument name="items">
14736 The list of calendar items to add.
14739 <Type type="array">
14740 <Type name="CalendarItem"/>
14743 <Argument optional="optional" name="successCallback">
14746 The method to call when the invocation ends successfully.
14749 <Type name="CalendarItemArraySuccessCallback" nullable="nullable"/>
14751 <Argument optional="optional" name="errorCallback">
14754 The method to invoke when the request fails.
14757 <Type name="ErrorCallback" nullable="nullable"/>
14761 <RaiseException name="WebAPIException">
14764 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14767 with error type SecurityError, if the application does not have the privilege to call this method.
14770 with error type NotSupportedError, if the feature is not supported.
14776 <Operation name="update" id="::Calendar::Calendar::update">
14777 <webidl> void update(<ref>CalendarItem</ref> item,
14778 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14781 Updates an existing item in the calendar synchronously with the one specified in the argument.
14785 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>.
14795 http://tizen.org/privilege/calendar.write
14797 <Code> var myCalendar;
14799 // Defines the error callback.
14800 function errorCallback(response) {
14801 console.log( 'The following error occurred: ' + response.name);
14804 // Defines the event success callback.
14805 function eventSearchSuccessCallback(events) {
14806 events[0].description = 'New Description';
14807 // Updates the first existing event.
14808 myCalendar.update(events[0]);
14809 console.log("The first item description was updated!");
14812 // Gets the default calendar
14813 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14815 // Finds all events in a Calendar
14816 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14819 <Type type="void"/>
14821 <Argument name="item">
14824 The Item object to update.
14827 <Type name="CalendarItem"/>
14829 <Argument optional="optional" name="updateAllInstances">
14832 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.
14835 <Type type="boolean" nullable="nullable"/>
14839 <RaiseException name="WebAPIException">
14842 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14845 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
14848 with error type SecurityError, if the application does not have the privilege to call this method.
14851 with error type NotSupportedError, if the feature is not supported.
14854 with error type UnknownError, if any other error occurs.
14860 <Operation name="updateBatch" id="::Calendar::Calendar::updateBatch">
14861 <webidl> void updateBatch(<ref>CalendarItem</ref>[] items,
14862 optional <ref>SuccessCallback</ref>? successCallback,
14863 optional <ref>ErrorCallback</ref>? errorCallback,
14864 optional boolean? updateAllInstances) raises(<ref>WebAPIException</ref>);</webidl>
14867 Updates an array of existing items in the calendar asynchronously with the specified values in the argument.
14871 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.
14874 The <em>errorCallback() </em>is launched with these error types:
14878 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>
14880 UnknownError - if any other error occurs. </li>
14890 http://tizen.org/privilege/calendar.write
14892 <Code> var myCalendar;
14894 // Defines the error callback.
14895 function errorCallback(response) {
14896 console.log( 'The following error occurred: ' + response.name);
14899 // Defines the success callback
14900 function updateEventsSuccess() {
14901 console.log("Successfully updated !" );
14904 // Defines the event success callback.
14905 function eventSearchSuccessCallback(events) {
14906 events[0].description = 'New Description 1';
14907 events[1].description = 'New Description 2';
14908 // Update the first two existing events.
14909 myCalendar.updateBatch(events.slice(0,2), updateEventsSuccess, errorCallback);
14912 // Gets the default calendar
14913 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
14915 // Finds all events in Calendar
14916 myCalendar.find(eventSearchSuccessCallback, errorCallback);
14919 <Type type="void"/>
14921 <Argument name="items">
14924 The list of calendar item objects to update.
14927 <Type type="array">
14928 <Type name="CalendarItem"/>
14931 <Argument optional="optional" name="successCallback">
14934 The method to invoke when the <em>updateEvents() </em>request succeeds.
14937 <Type name="SuccessCallback" nullable="nullable"/>
14939 <Argument optional="optional" name="errorCallback">
14942 The method to invoke when the <em>updateEvents() </em>request fails.
14945 <Type name="ErrorCallback" nullable="nullable"/>
14947 <Argument optional="optional" name="updateAllInstances">
14950 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.
14953 <Type type="boolean" nullable="nullable"/>
14957 <RaiseException name="WebAPIException">
14960 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
14963 with error type SecurityError, if the application does not have the privilege to call this method.
14966 with error type NotSupportedError, if the feature is not supported.
14972 <Operation name="remove" id="::Calendar::Calendar::remove">
14973 <webidl> void remove(<ref>CalendarItemId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
14976 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.
14985 http://tizen.org/privilege/calendar.write
14988 <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.
14990 <Code> var myCalendar;
14992 // Defines the error callback.
14993 function errorCallback(response) {
14994 console.log( 'The following error occurred: ' + response.name);
14997 // Defines the event success callback.
14998 function eventSearchSuccessCallback(events) {
14999 // Deletes the first existing event.
15000 myCalendar.remove(events[0].id);
15001 console.log('The first event was removed');
15004 // Gets default calendar
15005 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15007 // Finds all events in Calendar
15008 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15011 <Type type="void"/>
15013 <Argument name="id">
15016 The identifier (ID attribute) of the item object to delete.
15019 <Type name="CalendarItemId"/>
15023 <RaiseException name="WebAPIException">
15026 with error type NotFoundError, if the identifier does not match any item in the calendar.
15029 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15032 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15035 with error type SecurityError, if the application does not have the privilege to call this method.
15038 with error type NotSupportedError, if the feature is not supported.
15041 with error type UnknownError, if the item could not be removed because of an unknown error.
15047 <Operation name="removeBatch" id="::Calendar::Calendar::removeBatch">
15048 <webidl> void removeBatch(<ref>CalendarItemId</ref>[] ids,
15049 optional <ref>SuccessCallback</ref>? successCallback,
15050 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
15053 Removes several items from the calendar asynchronously depending on the specified identifiers.
15057 The errorCallback is launched with these error types:
15061 NotFoundError - if an identifier in the <em>ids </em>parameter does not correspond to the ID attribute of an item in the calendar. </li>
15063 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15065 UnknownError - if any other error occurs. </li>
15075 http://tizen.org/privilege/calendar.write
15078 <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.
15080 <Code> var myCalendar;
15082 // Defines the error callback.
15083 function errorCallback(response) {
15084 console.log( 'The following error occurred: ' + response.name);
15087 // Defines the removeBatch callback
15088 function removeBatchCallback() {
15089 console.log("Requested events were successfully removed.");
15092 // Defines the event search success callback.
15093 function eventSearchSuccessCallback(events) {
15094 // Deletes the first two existing events.
15095 myCalendar.removeBatch([events[0].id, events[1].id],
15096 removeBatchCallback,
15100 // Gets default calendar
15101 myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
15103 // Retrieves all events in Calendar
15104 myCalendar.find(eventSearchSuccessCallback, errorCallback);
15107 <Type type="void"/>
15109 <Argument name="ids">
15112 The identifiers (<em>id </em>attribute) of the items to delete.
15115 <Type type="array">
15116 <Type name="CalendarItemId"/>
15119 <Argument optional="optional" name="successCallback">
15122 The method to invoke when the <em>removeBatch()</em> request succeeds.
15125 <Type name="SuccessCallback" nullable="nullable"/>
15127 <Argument optional="optional" name="errorCallback">
15130 The method to invoke when the <em>removeBatch()</em> request fails.
15133 <Type name="ErrorCallback" nullable="nullable"/>
15137 <RaiseException name="WebAPIException">
15140 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15143 with error type SecurityError, if the application does not have the privilege to call this method.
15146 with error type NotSupportedError, if the feature is not supported.
15152 <Operation name="find" id="::Calendar::Calendar::find">
15153 <webidl> void find(<ref>CalendarItemArraySuccessCallback</ref> successCallback,
15154 optional <ref>ErrorCallback</ref>? errorCallback,
15155 optional <ref>AbstractFilter</ref>? filter,
15156 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
15159 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.
15163 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>.
15164 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>.
15165 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.
15168 The errorCallback is launched with these error types:
15172 InvalidValuesError - if any of the input parameters contain an invalid value. </li>
15174 UnknownError - if any other error occurs. </li>
15177 <b>Filter specific remarks:</b> </p>
15180 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>
15182 For event filtering based on the identifier, the identifier type should be CalendarEventID (<em>uid</em> and <em>rid</em>).
15183 If no recurrence ID is given, the filter will match both the parent event and all its detached instances. </li>
15193 http://tizen.org/privilege/calendar.read
15195 <Code> // Defines the error callback.
15196 function errorCallback(response) {
15197 console.log( 'The following error occurred: ' + response.name);
15200 // Defines the event search success callback.
15201 function eventSearchSuccessCallback(events) {
15202 console.log(events.length + ' results found.');
15205 // Gets default calendar
15206 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
15208 // Finds all events the calendar that contain in the summary the string Tizen.
15209 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
15211 // The events returned by the find() query will be sorted by ascending summary
15212 var sortingMode = new tizen.SortMode('summary', 'ASC');
15214 calendar.find(eventSearchSuccessCallback, errorCallback, filter, sortingMode);
15217 <Type type="void"/>
15219 <Argument name="successCallback">
15222 The method to call when the invocation ends successfully.
15225 <Type name="CalendarItemArraySuccessCallback"/>
15227 <Argument optional="optional" name="errorCallback">
15230 The method to call when an error occurs.
15233 <Type name="ErrorCallback" nullable="nullable"/>
15235 <Argument optional="optional" name="filter">
15238 The supplied data used to filter the results of the <em>find() </em>method.
15241 <Type name="AbstractFilter" nullable="nullable"/>
15243 <Argument optional="optional" name="sortMode">
15246 The sort order in which the items return.
15249 <Type name="SortMode" nullable="nullable"/>
15253 <RaiseException name="WebAPIException">
15256 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15259 with error type SecurityError, if the application does not have the privilege to call this method.
15262 with error type NotSupportedError, if the feature is not supported.
15268 <Operation name="addChangeListener" id="::Calendar::Calendar::addChangeListener">
15269 <webidl> long addChangeListener(<ref>CalendarChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
15272 Adds a listener to receive notifications about calendar changes.
15276 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.
15286 http://tizen.org/privilege/calendar.read
15288 <Code> var watcherId = 0; // watcher identifier
15289 var calendar; // This example assumes calendar is initialized
15292 onitemsadded: function(items) {
15293 console.log(items.length + ' items were added');
15295 onitemsupdated: function(items) {
15296 console.log(items.length + ' items were updated');
15298 onitemsremoved: function(ids) {
15299 console.log(ids.length + ' items were removed');
15303 // Registers to be notified when the calendar changes
15304 watcherId = calendar.addChangeListener(watcher);
15310 long The identifier used to clear the watch subscription.
15315 <Argument name="successCallback">
15318 The methods to invoke on receiving calendar change notifications.
15321 <Type name="CalendarChangeCallback"/>
15325 <RaiseException name="WebAPIException">
15328 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15331 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15334 with error type SecurityError, if the application does not have the privilege to call this method.
15337 with error type NotSupportedError, if the feature is not supported.
15340 with error type UnknownError, if any other error occurs.
15346 <Operation name="removeChangeListener" id="::Calendar::Calendar::removeChangeListener">
15347 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
15350 Unsubscribes from receiving notification for a calendar item changes.
15354 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.
15364 http://tizen.org/privilege/calendar.read
15366 <Code> var watcherId = 0; // watcher identifier
15367 var calendar; // This example assumes calendar is initialized
15369 // Receives calendar changes
15371 onitemsadded: function(items) {
15372 console.log(items.length + ' items were added');
15374 onitemsupdated: function(items) {
15375 console.log(evitemsents.length + ' items were updated');
15377 onitemsremoved: function(ids) {
15378 console.log(ids.length + ' items were removed');
15382 // Registers to be notified when the calendar changes
15383 watcherId = calendar.addChangeListener(watcher);
15385 // Cancels the watch operation
15386 calendar.removeChangeListener(watcherId);
15389 <Type type="void"/>
15391 <Argument name="watchId">
15394 Subscription Identifier.
15397 <Type type="long"/>
15401 <RaiseException name="WebAPIException">
15404 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
15407 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
15410 with error type SecurityError, if the application does not have the privilege to call this method.
15413 with error type NotSupportedError, if the feature is not supported.
15416 with error type UnknownError if any other error occurs.
15423 <Dictionary name="CalendarItemInit" id="::Calendar::CalendarItemInit">
15424 <webidl> dictionary CalendarItemInit {
15425 DOMString description;
15428 <ref>TZDate</ref> startDate;
15429 <ref>TimeDuration</ref> duration;
15430 DOMString location;
15431 <ref>SimpleCoordinates</ref> geolocation;
15432 DOMString organizer;
15433 <ref>CalendarItemVisibility</ref> visibility;
15434 <ref>CalendarItemStatus</ref> status;
15435 <ref>CalendarItemPriority</ref> priority;
15436 <ref>CalendarAlarm</ref>[] alarms;
15437 DOMString[] categories;
15438 <ref>CalendarAttendee</ref>[] attendees;
15442 A dictionary that is used for creating calendar items.
15446 These attributes are shared by both calendar events and tasks.
15453 <DictionaryMember name="description" id="::Calendar::CalendarItemInit::description">
15454 <webidl> DOMString description;</webidl>
15455 <Type type="DOMString"/>
15456 </DictionaryMember>
15457 <DictionaryMember name="summary" id="::Calendar::CalendarItemInit::summary">
15458 <webidl> DOMString summary;</webidl>
15459 <Type type="DOMString"/>
15460 </DictionaryMember>
15461 <DictionaryMember name="isAllDay" id="::Calendar::CalendarItemInit::isAllDay">
15462 <webidl> boolean isAllDay;</webidl>
15463 <Type type="boolean"/>
15464 </DictionaryMember>
15465 <DictionaryMember name="startDate" id="::Calendar::CalendarItemInit::startDate">
15466 <webidl> <ref>TZDate</ref> startDate;</webidl>
15467 <Type name="TZDate"/>
15468 </DictionaryMember>
15469 <DictionaryMember name="duration" id="::Calendar::CalendarItemInit::duration">
15470 <webidl> <ref>TimeDuration</ref> duration;</webidl>
15471 <Type name="TimeDuration"/>
15472 </DictionaryMember>
15473 <DictionaryMember name="location" id="::Calendar::CalendarItemInit::location">
15474 <webidl> DOMString location;</webidl>
15475 <Type type="DOMString"/>
15476 </DictionaryMember>
15477 <DictionaryMember name="geolocation" id="::Calendar::CalendarItemInit::geolocation">
15478 <webidl> <ref>SimpleCoordinates</ref> geolocation;</webidl>
15479 <Type name="SimpleCoordinates"/>
15480 </DictionaryMember>
15481 <DictionaryMember name="organizer" id="::Calendar::CalendarItemInit::organizer">
15482 <webidl> DOMString organizer;</webidl>
15483 <Type type="DOMString"/>
15484 </DictionaryMember>
15485 <DictionaryMember name="visibility" id="::Calendar::CalendarItemInit::visibility">
15486 <webidl> <ref>CalendarItemVisibility</ref> visibility;</webidl>
15487 <Type name="CalendarItemVisibility"/>
15488 </DictionaryMember>
15489 <DictionaryMember name="status" id="::Calendar::CalendarItemInit::status">
15490 <webidl> <ref>CalendarItemStatus</ref> status;</webidl>
15491 <Type name="CalendarItemStatus"/>
15492 </DictionaryMember>
15493 <DictionaryMember name="priority" id="::Calendar::CalendarItemInit::priority">
15494 <webidl> <ref>CalendarItemPriority</ref> priority;</webidl>
15495 <Type name="CalendarItemPriority"/>
15496 </DictionaryMember>
15497 <DictionaryMember name="alarms" id="::Calendar::CalendarItemInit::alarms">
15498 <webidl> <ref>CalendarAlarm</ref>[] alarms;</webidl>
15499 <Type type="array">
15500 <Type name="CalendarAlarm"/>
15502 </DictionaryMember>
15503 <DictionaryMember name="categories" id="::Calendar::CalendarItemInit::categories">
15504 <webidl> DOMString[] categories;</webidl>
15505 <Type type="array">
15506 <Type type="DOMString"/>
15508 </DictionaryMember>
15509 <DictionaryMember name="attendees" id="::Calendar::CalendarItemInit::attendees">
15510 <webidl> <ref>CalendarAttendee</ref>[] attendees;</webidl>
15511 <Type type="array">
15512 <Type name="CalendarAttendee"/>
15514 </DictionaryMember>
15516 <Dictionary name="CalendarTaskInit" id="::Calendar::CalendarTaskInit">
15517 <webidl> dictionary CalendarTaskInit: <ref>CalendarItemInit</ref> {
15518 <ref>TZDate</ref> dueDate;
15519 <ref>TZDate</ref> completedDate;
15524 A dictionary that is used for creating calendar tasks.
15528 It also provides an interface for specifying task attributes upon task creation (in the <em>CalendarTask </em>constructor).
15531 All the attributes are optional and are undefined by default.
15538 <DictionaryInheritance>
15539 <Name name="CalendarItemInit"/>
15540 </DictionaryInheritance>
15541 <DictionaryMember name="dueDate" id="::Calendar::CalendarTaskInit::dueDate">
15542 <webidl> <ref>TZDate</ref> dueDate;</webidl>
15543 <Type name="TZDate"/>
15544 </DictionaryMember>
15545 <DictionaryMember name="completedDate" id="::Calendar::CalendarTaskInit::completedDate">
15546 <webidl> <ref>TZDate</ref> completedDate;</webidl>
15547 <Type name="TZDate"/>
15548 </DictionaryMember>
15549 <DictionaryMember name="progress" id="::Calendar::CalendarTaskInit::progress">
15550 <webidl> short progress;</webidl>
15551 <Type type="short"/>
15552 </DictionaryMember>
15554 <Dictionary name="CalendarEventInit" id="::Calendar::CalendarEventInit">
15555 <webidl> dictionary CalendarEventInit: <ref>CalendarItemInit</ref> {
15556 <ref>TZDate</ref> endDate;
15557 <ref>EventAvailability</ref> availability;
15558 <ref>CalendarRecurrenceRule</ref> recurrenceRule;
15562 A dictionary that is used for creating calendar events.
15566 Provides an interface for specifying event attributes upon event creation (in the <em>CalendarEvent </em>constructor).
15569 All the attributes are optional and are undefined by default.
15576 <DictionaryInheritance>
15577 <Name name="CalendarItemInit"/>
15578 </DictionaryInheritance>
15579 <DictionaryMember name="endDate" id="::Calendar::CalendarEventInit::endDate">
15580 <webidl> <ref>TZDate</ref> endDate;</webidl>
15581 <Type name="TZDate"/>
15582 </DictionaryMember>
15583 <DictionaryMember name="availability" id="::Calendar::CalendarEventInit::availability">
15584 <webidl> <ref>EventAvailability</ref> availability;</webidl>
15585 <Type name="EventAvailability"/>
15586 </DictionaryMember>
15587 <DictionaryMember name="recurrenceRule" id="::Calendar::CalendarEventInit::recurrenceRule">
15588 <webidl> <ref>CalendarRecurrenceRule</ref> recurrenceRule;</webidl>
15589 <Type name="CalendarRecurrenceRule"/>
15590 </DictionaryMember>
15592 <Interface name="CalendarItem" id="::Calendar::CalendarItem">
15593 <webidl> [NoInterfaceObject] interface CalendarItem {
15594 readonly attribute <ref>CalendarItemId</ref>? id;
15596 readonly attribute <ref>CalendarId</ref>? calendarId;
15598 readonly attribute <ref>TZDate</ref>? lastModificationDate;
15600 attribute DOMString? description setraises(<ref>WebAPIException</ref>);
15602 attribute DOMString? summary setraises(<ref>WebAPIException</ref>);
15604 attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);
15606 attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);
15608 attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);
15610 attribute DOMString? location setraises(<ref>WebAPIException</ref>);
15612 attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);
15614 attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);
15616 attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);
15618 attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);
15620 attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);
15622 attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);
15624 attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);
15626 attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);
15628 DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);
15630 <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);
15634 This is a parent interface that is used to create Calendar events and tasks.
15635 These attributes are shared by both events and tasks.
15641 <ExtendedAttributeList>
15642 <ExtendedAttribute name="NoInterfaceObject">
15643 <webidl>NoInterfaceObject</webidl>
15644 </ExtendedAttribute>
15645 </ExtendedAttributeList>
15646 <Attribute readonly="readonly" name="id" id="::Calendar::CalendarItem::id">
15647 <webidl> readonly attribute <ref>CalendarItemId</ref>? id;</webidl>
15650 An attribute to persistently and uniquely identify an item in implementation.
15654 Includes a UID and a possible recurrence ID that is needed to identify a particular instance of a recurring event.
15657 By default, this attribute is set to null.
15664 <Type name="CalendarItemId" nullable="nullable"/>
15666 <Attribute readonly="readonly" name="calendarId" id="::Calendar::CalendarItem::calendarId">
15667 <webidl> readonly attribute <ref>CalendarId</ref>? calendarId;</webidl>
15670 An attribute to identify the calendar in which this item is saved.
15674 By default, this attribute is set to null.
15681 <Type name="CalendarId" nullable="nullable"/>
15683 <Attribute readonly="readonly" name="lastModificationDate" id="::Calendar::CalendarItem::lastModificationDate">
15684 <webidl> readonly attribute <ref>TZDate</ref>? lastModificationDate;</webidl>
15687 An attribute to identify the last modified date and time of an item.
15691 This attribute is automatically populated and cannot be edited by the client.
15692 (See RFC 5545 - Section 3.8.7.3).
15699 <Type name="TZDate" nullable="nullable"/>
15701 <Attribute name="description" id="::Calendar::CalendarItem::description">
15702 <webidl> attribute DOMString? description setraises(<ref>WebAPIException</ref>);</webidl>
15705 An attribute to store the textual descriptions of an item.
15709 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.
15710 (See RFC 5545 - Section 3.8.1.5).
15713 The default value is an empty string.
15719 <Code> event.description = 'Tizen Codefest';
15722 <Type type="DOMString" nullable="nullable"/>
15724 <RaiseException name="WebAPIException"/>
15727 <Attribute name="summary" id="::Calendar::CalendarItem::summary">
15728 <webidl> attribute DOMString? summary setraises(<ref>WebAPIException</ref>);</webidl>
15731 An attribute to store a short summary or subject for an item.
15732 (See RFC 5545 - Section 3.8.1.12)
15736 The default value is an empty string.
15742 <Code> event.summary = 'Launching the Tizen reference implementation';
15745 <Type type="DOMString" nullable="nullable"/>
15747 <RaiseException name="WebAPIException"/>
15750 <Attribute name="isAllDay" id="::Calendar::CalendarItem::isAllDay">
15751 <webidl> attribute boolean isAllDay setraises(<ref>WebAPIException</ref>);</webidl>
15754 An attribute that behaves like a flag to indicate whether an event is an all-day event or not.
15758 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.
15761 The default value for this attribute is <var>false</var>.
15767 <Code> event.isAllDay = true; // All-Day event
15770 <Type type="boolean"/>
15772 <RaiseException name="WebAPIException"/>
15775 <Attribute name="startDate" id="::Calendar::CalendarItem::startDate">
15776 <webidl> attribute <ref>TZDate</ref>? startDate setraises(<ref>WebAPIException</ref>);</webidl>
15779 An attribute to store the start date/time for an item.
15780 (see RFC 5545 - Section 3.8.2.4).
15784 The default value for this attribute is <var>null</var>.
15787 <em>startDate</em> must be specified in the same time zone as <em>endDate / dueDate</em> if provided.
15795 This attribute is precise to the second. Milliseconds are ignored.
15798 <Code> // 2010-04-30 09:00
15799 event.startDate = new tizen.TZDate(2010, 3, 30, 9, 0);
15802 <Type name="TZDate" nullable="nullable"/>
15804 <RaiseException name="WebAPIException"/>
15807 <Attribute name="duration" id="::Calendar::CalendarItem::duration">
15808 <webidl> attribute <ref>TimeDuration</ref>? duration setraises(<ref>WebAPIException</ref>);</webidl>
15811 An attribute to denote the duration of the calendar component.
15812 (See RFC 5545 - Section 3.8.2.5).
15816 By default, this attribute is set to <var>null</var>.
15819 <em>duration</em> and <em>endDate / dueDate</em> are mutually exclusive, hence, only one of them can be non-null.
15822 This attribute is precise to the second. Milliseconds are ignored.
15826 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.
15831 <Code> // 1 hour meeting
15832 event.duration = new tizen.TimeDuration(1, "HOURS");
15835 <Type name="TimeDuration" nullable="nullable"/>
15837 <RaiseException name="WebAPIException"/>
15840 <Attribute name="location" id="::Calendar::CalendarItem::location">
15841 <webidl> attribute DOMString? location setraises(<ref>WebAPIException</ref>);</webidl>
15844 An attribute to store the location or the intended venue for the activity defined by the calendar item.
15845 (See RFC 5545 - Section 3.8.1.7)
15849 The default value for this attribute is an empty string.
15855 <Code> event.location = 'Huesca';
15858 <Type type="DOMString" nullable="nullable"/>
15860 <RaiseException name="WebAPIException"/>
15863 <Attribute name="geolocation" id="::Calendar::CalendarItem::geolocation">
15864 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation setraises(<ref>WebAPIException</ref>);</webidl>
15867 An attribute to store the global position latitude and longitude of the location where the event is planned to take place.
15868 (See RFC 5545 - Section 3.8.1.6).
15873 <Code> event.geolocation = new tizen.SimpleCoordinates(60.175, 24.934);
15876 <Type name="SimpleCoordinates" nullable="nullable"/>
15878 <RaiseException name="WebAPIException"/>
15881 <Attribute name="organizer" id="::Calendar::CalendarItem::organizer">
15882 <webidl> attribute DOMString? organizer setraises(<ref>WebAPIException</ref>);</webidl>
15885 An attribute to store the name of the person who organized this event.
15886 (See RFC 5545 - Section 3.8.4.3).
15890 By default, this attribute is initialized to an empty string.
15896 <Code> event.organizer = 'Mr. Jones';
15899 <Type type="DOMString" nullable="nullable"/>
15901 <RaiseException name="WebAPIException"/>
15904 <Attribute name="visibility" id="::Calendar::CalendarItem::visibility">
15905 <webidl> attribute <ref>CalendarItemVisibility</ref> visibility setraises(<ref>WebAPIException</ref>);</webidl>
15908 An attribute to mark the visibility (secrecy) level of the item.
15909 (See RFC 5545 - Section 3.8.1.3).
15913 The default value is <var>PUBLIC</var>.
15920 <Type name="CalendarItemVisibility"/>
15922 <RaiseException name="WebAPIException"/>
15925 <Attribute name="status" id="::Calendar::CalendarItem::status">
15926 <webidl> attribute <ref>CalendarItemStatus</ref> status setraises(<ref>WebAPIException</ref>);</webidl>
15929 An attribute to store the overall confirmation status for a calendar component.
15930 (See RFC 5545 - Section 3.8.1.11).
15934 For an event, the default value is <var>CONFIRMED</var>. For a task, the default value is <var>NEEDS_ACTION</var>.
15940 <Code> event.status = "TENTATIVE";
15943 <Type name="CalendarItemStatus"/>
15945 <RaiseException name="WebAPIException"/>
15948 <Attribute name="priority" id="::Calendar::CalendarItem::priority">
15949 <webidl> attribute <ref>CalendarItemPriority</ref> priority setraises(<ref>WebAPIException</ref>);</webidl>
15952 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.
15953 (See RFC 5545 - Section 3.8.1.9).
15957 The default value for this attribute is <var>LOW </var>priority.
15960 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:
15974 <Code> task.priority = "HIGH";
15977 <Type name="CalendarItemPriority"/>
15979 <RaiseException name="WebAPIException"/>
15982 <Attribute name="alarms" id="::Calendar::CalendarItem::alarms">
15983 <webidl> attribute <ref>CalendarAlarm</ref>[] alarms setraises(<ref>WebAPIException</ref>);</webidl>
15986 An attribute array to lists the alarms (or reminders) associated to an item.
15991 <Code> ev.startDate = new tizen.TZDate(2011, 2, 11, 8, 0, 0);
15992 // Gives a sound notification 30 minutes before the item's start time
15993 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"),
15994 "SOUND");
15995 ev.alarms = [alarm];
15998 <Type type="array">
15999 <Type name="CalendarAlarm"/>
16002 <RaiseException name="WebAPIException"/>
16005 <Attribute name="categories" id="::Calendar::CalendarItem::categories">
16006 <webidl> attribute DOMString[] categories setraises(<ref>WebAPIException</ref>);</webidl>
16009 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.
16010 (See RFC 5545 - Section 3.8.1.2).
16014 Examples of categories are personal, work, vacation, travel, etc.
16017 By default, this attribute is set to an empty array.
16023 <Code> event.categories = ['Personal'];
16026 <Type type="array">
16027 <Type type="DOMString"/>
16030 <RaiseException name="WebAPIException"/>
16033 <Attribute name="attendees" id="::Calendar::CalendarItem::attendees">
16034 <webidl> attribute <ref>CalendarAttendee</ref>[] attendees setraises(<ref>WebAPIException</ref>);</webidl>
16037 An attribute array that lists the people attending an event.
16038 (See RFC 5545 - Section 3.8.4.3).
16042 By default, this attribute is set to an empty array.
16048 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16049 {role: "CHAIR", RSVP: true});
16050 event.attendees = [attendee];
16053 <Type type="array">
16054 <Type name="CalendarAttendee"/>
16057 <RaiseException name="WebAPIException"/>
16060 <Operation name="convertToString" id="::Calendar::CalendarItem::convertToString">
16061 <webidl> DOMString convertToString(<ref>CalendarTextFormat</ref> format) raises(<ref>WebAPIException</ref>);</webidl>
16064 Converts the calendar item to a string format that will be generated and returned synchronously.
16065 The export format is set using the format parameter.
16074 http://tizen.org/privilege/calendar.read
16076 <Code> // Defines the event search success callback.
16077 function eventSearchSuccessCallback(events) {
16078 // Converts the first event to iCalendar 2.0 format (default)
16079 var vevent = events[0].convertToString("ICALENDAR_20");
16080 console.log('iCalendar 2.0 representation of the event is: ' + vevent);
16083 function errorCallback(response) {
16084 console.log( 'The following error occurred: ' + response.name);
16087 // Gets the default calendar
16088 var myCalendar = tizen.calendar.getDefaultCalendar("EVENT");
16090 // Finds all events in the first calendar that contain in the summary the string Tizen.
16091 var filter = new tizen.AttributeFilter('summary', 'CONTAINS', 'Tizen');
16092 myCalendar.find(eventSearchSuccessCallback, errorCallback, filter);
16095 <Type type="DOMString">
16098 DOMString The representation of the Calendar item.
16103 <Argument name="format">
16106 The format to use for exporting.
16109 <Type name="CalendarTextFormat"/>
16113 <RaiseException name="WebAPIException">
16116 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16119 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
16122 with error type SecurityError, if the application does not have the privilege to call this method.
16125 with error type NotSupportedError, if the feature is not supported.
16128 with error type UnknownError, if any other error occurs.
16134 <Operation name="clone" id="::Calendar::CalendarItem::clone">
16135 <webidl> <ref>CalendarItem</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
16138 Clones the <em>CalendarItem </em>object, detached from any calendar.
16142 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.
16152 http://tizen.org/privilege/calendar.read
16154 <Code> // Gets default calendar.
16155 var calendar = tizen.calendar.getDefaultCalendar();
16157 var html5seminar = new tizen.CalendarEvent({startDate: new tizen.TZDate(2012, 3, 4),
16158 duration: new tizen.TimeDuration(3, "DAYS"),
16159 summary: "HTML5 Seminar"});
16161 calendar.add(html5seminar);
16162 var tizenseminar = html5seminar.clone();
16163 tizenseminar.summary = "Tizen Seminar";
16164 calendar.add(tizenseminar);
16167 <Type name="CalendarItem">
16170 CalendarItem The new clone of the <em>CalendarItem </em>object.
16176 <RaiseException name="WebAPIException">
16179 with error type SecurityError, if the application does not have the privilege to call this method.
16182 with error type NotSupportedError, if the feature is not supported.
16185 with error type UnknownError if any other error occurs.
16192 <Interface name="CalendarTask" id="::Calendar::CalendarTask">
16193 <webidl> [Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict),
16194 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16195 interface CalendarTask : <ref>CalendarItem</ref> {
16196 attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);
16198 attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);
16200 attribute unsigned short progress setraises(<ref>WebAPIException</ref>);
16204 An interface that implements the <em>CalendarTask </em>object.
16210 <ExtendedAttributeList>
16211 <ExtendedAttribute name="Constructor">
16212 <webidl>Constructor(optional <ref>CalendarTaskInit</ref>? taskInitDict)</webidl>
16214 <Argument optional="optional" name="taskInitDict">
16215 <Type name="CalendarTaskInit" nullable="nullable"/>
16218 </ExtendedAttribute>
16219 <ExtendedAttribute name="Constructor">
16220 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16222 <Argument name="stringRepresentation">
16223 <Type type="DOMString"/>
16225 <Argument name="format">
16226 <Type name="CalendarTextFormat"/>
16229 </ExtendedAttribute>
16230 </ExtendedAttributeList>
16231 <InterfaceInheritance>
16232 <Name name="CalendarItem"/>
16233 </InterfaceInheritance>
16234 <Attribute name="dueDate" id="::Calendar::CalendarTask::dueDate">
16235 <webidl> attribute <ref>TZDate</ref>? dueDate setraises(<ref>WebAPIException</ref>);</webidl>
16238 An attribute to store the due date and time for completing a task. (See RFC 5545 - Section 3.8.2.3).
16242 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.
16245 This attribute is precise to the second. Milliseconds are ignored.
16248 The default value is <var>null</var>. If no value is provided, the task doesn't have a due date.
16254 <Code> task.dueDate = new tizen.TZDate(2011, 2, 11);
16257 <Type name="TZDate" nullable="nullable"/>
16259 <RaiseException name="WebAPIException"/>
16262 <Attribute name="completedDate" id="::Calendar::CalendarTask::completedDate">
16263 <webidl> attribute <ref>TZDate</ref>? completedDate setraises(<ref>WebAPIException</ref>);</webidl>
16266 An attribute to record the date and time when an task is completed.
16267 (See RFC 5545 - Section 3.8.2.1).
16271 This attribute is precise to the second. Milliseconds are ignored.
16274 The default value is <var>null</var>. If no value is provided, the task is not completed yet.
16280 <Code> task.completedDate = new tizen.TZDate(2011, 2, 11);
16283 <Type name="TZDate" nullable="nullable"/>
16285 <RaiseException name="WebAPIException"/>
16288 <Attribute name="progress" id="::Calendar::CalendarTask::progress">
16289 <webidl> attribute unsigned short progress setraises(<ref>WebAPIException</ref>);</webidl>
16292 An attribute to denote the percent of completion of a task.
16296 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.
16299 Integer values in between indicate the percent partially complete.
16300 (See RFC 5545 - Section 3.8.1.8).
16303 The default value is <var>0</var>, implies that the task has not been started.
16309 <Code> task.progress = 50; // 50% done
16312 <Type type="unsigned short"/>
16314 <RaiseException name="WebAPIException"/>
16318 <Interface name="CalendarEvent" id="::Calendar::CalendarEvent">
16319 <webidl> [Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict),
16320 Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)]
16321 interface CalendarEvent : <ref>CalendarItem</ref> {
16322 readonly attribute boolean isDetached;
16324 attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);
16326 attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);
16328 attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);
16330 void expandRecurrence(<ref>TZDate</ref> startDate,
16331 <ref>TZDate</ref> endDate,
16332 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16333 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
16337 An interface that implements the <em>calendarEvent </em>object.
16342 <Code> // Gets the default calendar
16343 var calendar = tizen.calendar.getDefaultCalendar("EVENT");
16346 var ev = new tizen.CalendarEvent("BEGIN:VCALENDAR\r\n" +
16347 "BEGIN:VEVENT\r\n" +
16348 "DTSTAMP:19970901T1300Z\r\n" +
16349 "DTSTART:19970903T163000Z\r\n" +
16350 "DTEND:19970903T190000Z\r\n" +
16351 "SUMMARY:Annual Employee Review\r\n" +
16352 "CATEGORIES:BUSINESS,HUMAN RESOURCES\r\n" +
16353 "END:VEVENT\r\n" +
16354 "END:VCALENDAR", "ICALENDAR_20");
16357 console.log('Event added with UID ' + ev.id.uid);
16359 console.log("Failed to add VEVENT to the calendar, error: " + err.name);
16363 <ExtendedAttributeList>
16364 <ExtendedAttribute name="Constructor">
16365 <webidl>Constructor(optional <ref>CalendarEventInit</ref>? eventInitDict)</webidl>
16367 <Argument optional="optional" name="eventInitDict">
16368 <Type name="CalendarEventInit" nullable="nullable"/>
16371 </ExtendedAttribute>
16372 <ExtendedAttribute name="Constructor">
16373 <webidl> Constructor(DOMString stringRepresentation, <ref>CalendarTextFormat</ref> format)</webidl>
16375 <Argument name="stringRepresentation">
16376 <Type type="DOMString"/>
16378 <Argument name="format">
16379 <Type name="CalendarTextFormat"/>
16382 </ExtendedAttribute>
16383 </ExtendedAttributeList>
16384 <InterfaceInheritance>
16385 <Name name="CalendarItem"/>
16386 </InterfaceInheritance>
16387 <Attribute readonly="readonly" name="isDetached" id="::Calendar::CalendarEvent::isDetached">
16388 <webidl> readonly attribute boolean isDetached;</webidl>
16391 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.
16397 <Type type="boolean"/>
16399 <Attribute name="endDate" id="::Calendar::CalendarEvent::endDate">
16400 <webidl> attribute <ref>TZDate</ref>? endDate setraises(<ref>WebAPIException</ref>);</webidl>
16403 An attribute to store the end date/time of an event.
16407 (see RFC 5545 - Section 3.8.2.2).
16410 This <em>endDate</em> must be in the same time zone as the <em>startDate</em>.
16411 Note that <em>duration</em> and <em>endDate</em> are mutually exclusive, only one of them can be non-null.
16414 This attribute is precise to the second. Milliseconds are ignored.
16417 The default value for this attribute is <var>null</var>.
16423 <Code> // 2010-04-30 09:00
16424 event.endDate = new tizen.TZDate(2010, 3, 30, 9, 0);
16427 <Type name="TZDate" nullable="nullable"/>
16429 <RaiseException name="WebAPIException"/>
16432 <Attribute name="availability" id="::Calendar::CalendarEvent::availability">
16433 <webidl> attribute <ref>EventAvailability</ref> availability setraises(<ref>WebAPIException</ref>);</webidl>
16436 An attribute to indicate the availability of a person for an event.
16437 (See RFC 5545 - Section 3.2.9).
16441 The default value is <var>BUSY</var>.
16448 <Type name="EventAvailability"/>
16450 <RaiseException name="WebAPIException"/>
16453 <Attribute name="recurrenceRule" id="::Calendar::CalendarEvent::recurrenceRule">
16454 <webidl> attribute <ref>CalendarRecurrenceRule</ref>? recurrenceRule setraises(<ref>WebAPIException</ref>);</webidl>
16457 An attribute to denote the recurrence rule for the event.
16461 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.
16464 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.
16465 (See RFC 5545, Section 3.3.10.)
16471 <Code> // Repeats daily for 7 days
16472 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount: 7});
16473 event.recurrenceRule = rule;
16476 <Type name="CalendarRecurrenceRule" nullable="nullable"/>
16478 <RaiseException name="WebAPIException"/>
16481 <Operation name="expandRecurrence" id="::Calendar::CalendarEvent::expandRecurrence">
16482 <webidl> void expandRecurrence(<ref>TZDate</ref> startDate,
16483 <ref>TZDate</ref> endDate,
16484 <ref>CalendarEventArraySuccessCallback</ref> successCallback,
16485 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
16488 Expands a recurring event and returns asynchronously the list of instances occurring in a given time interval (inclusive).
16492 This method takes into consideration all the parameters of the event recurrence rule to generate the instances occurring in a given time interval.
16495 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.
16498 The errorCallback is launched with these error types:
16502 InvalidValuesError - if the event in operation is not recurring. </li>
16504 UnknownError - if any other error occurs. </li>
16514 http://tizen.org/privilege/calendar.read
16516 <Code> // eventId should be set to ID of event obtained with the find function.
16518 // Defines the error callback.
16519 function errorCallback(response) {
16520 console.log( 'The following error occurred: ' + response.name);
16523 // Defines the event expanding success callback.
16524 function eventExpandingSuccessCallback(events) {
16525 console.log(events.length + ' event instances were returned.');
16528 var calendar = tizen.calendar.getDefaultCalendar();
16529 var event = calendar.get(eventId);
16531 if (event.recurrenceRule != null) {
16532 // This is a recurring event. Expand all the instances during August 2011.
16533 event.expandRecurrence(new tizen.TZDate(2011, 7, 1),
16534 new tizen.TZDate(2011, 7, 31),
16535 eventExpandingSuccessCallback,
16540 <Type type="void"/>
16542 <Argument name="startDate">
16545 The start date/ time of an event(inclusive).
16548 <Type name="TZDate"/>
16550 <Argument name="endDate">
16553 The end date/ time of an event (inclusive).
16556 <Type name="TZDate"/>
16558 <Argument name="successCallback">
16561 The method to call when the invocation ends successfully.
16564 <Type name="CalendarEventArraySuccessCallback"/>
16566 <Argument optional="optional" name="errorCallback">
16569 The method to call when an error occurs.
16572 <Type name="ErrorCallback" nullable="nullable"/>
16576 <RaiseException name="WebAPIException">
16579 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
16582 with error type SecurityError, if the application does not have the privilege to call this method.
16585 with error type NotSupportedError, if the feature is not supported.
16592 <Dictionary name="CalendarAttendeeInit" id="::Calendar::CalendarAttendeeInit">
16593 <webidl> dictionary CalendarAttendeeInit {
16595 <ref>AttendeeRole</ref> role;
16596 <ref>AttendeeStatus</ref> status;
16598 <ref>AttendeeType</ref> type;
16600 DOMString delegatorURI;
16601 DOMString delegateURI;
16602 <ref>ContactRef</ref> contactRef;
16606 The properties of a <em>CalendarAttendee</em>, to pass to its constructor.
16610 See <em>CalendarAttendee </em>interface for more information about the members.
16617 <DictionaryMember name="name" id="::Calendar::CalendarAttendeeInit::name">
16618 <webidl> DOMString name;</webidl>
16619 <Type type="DOMString"/>
16620 </DictionaryMember>
16621 <DictionaryMember name="role" id="::Calendar::CalendarAttendeeInit::role">
16622 <webidl> <ref>AttendeeRole</ref> role;</webidl>
16623 <Type name="AttendeeRole"/>
16624 </DictionaryMember>
16625 <DictionaryMember name="status" id="::Calendar::CalendarAttendeeInit::status">
16626 <webidl> <ref>AttendeeStatus</ref> status;</webidl>
16627 <Type name="AttendeeStatus"/>
16628 </DictionaryMember>
16629 <DictionaryMember name="RSVP" id="::Calendar::CalendarAttendeeInit::RSVP">
16630 <webidl> boolean RSVP;</webidl>
16631 <Type type="boolean"/>
16632 </DictionaryMember>
16633 <DictionaryMember name="type" id="::Calendar::CalendarAttendeeInit::type">
16634 <webidl> <ref>AttendeeType</ref> type;</webidl>
16635 <Type name="AttendeeType"/>
16636 </DictionaryMember>
16637 <DictionaryMember name="group" id="::Calendar::CalendarAttendeeInit::group">
16638 <webidl> DOMString? group;</webidl>
16639 <Type type="DOMString" nullable="nullable"/>
16640 </DictionaryMember>
16641 <DictionaryMember name="delegatorURI" id="::Calendar::CalendarAttendeeInit::delegatorURI">
16642 <webidl> DOMString delegatorURI;</webidl>
16643 <Type type="DOMString"/>
16644 </DictionaryMember>
16645 <DictionaryMember name="delegateURI" id="::Calendar::CalendarAttendeeInit::delegateURI">
16646 <webidl> DOMString delegateURI;</webidl>
16647 <Type type="DOMString"/>
16648 </DictionaryMember>
16649 <DictionaryMember name="contactRef" id="::Calendar::CalendarAttendeeInit::contactRef">
16650 <webidl> <ref>ContactRef</ref> contactRef;</webidl>
16651 <Type name="ContactRef"/>
16652 </DictionaryMember>
16654 <Interface name="CalendarAttendee" id="::Calendar::CalendarAttendee">
16655 <webidl> [Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)]
16656 interface CalendarAttendee
16658 attribute DOMString uri;
16660 attribute DOMString? name;
16662 attribute <ref>AttendeeRole</ref> role;
16664 attribute <ref>AttendeeStatus</ref> status;
16666 attribute boolean RSVP;
16668 attribute <ref>AttendeeType</ref> type;
16670 attribute DOMString? group;
16672 attribute DOMString? delegatorURI;
16674 attribute DOMString? delegateURI;
16676 attribute <ref>ContactRef</ref>? contactRef;
16680 This interface implements the <em>CalendarAttendee </em>object that contains information about an event attendee.
16684 By default, each of the attributes of this interface are undefined.
16687 (For more details, see RFC 5545, Section 3.8.4.1.)
16693 <Code> var attendee = new tizen.CalendarAttendee('mailto:bob@domain.com',
16694 {role: "CHAIR", RSVP: true});
16695 event.attendees = [attendee];
16698 <ExtendedAttributeList>
16699 <ExtendedAttribute name="Constructor">
16700 <webidl>Constructor(DOMString uri, optional <ref>CalendarAttendeeInit</ref>? attendeeInitDict)</webidl>
16702 <Argument name="uri">
16703 <Type type="DOMString"/>
16705 <Argument optional="optional" name="attendeeInitDict">
16706 <Type name="CalendarAttendeeInit" nullable="nullable"/>
16709 </ExtendedAttribute>
16710 </ExtendedAttributeList>
16711 <Attribute name="uri" id="::Calendar::CalendarAttendee::uri">
16712 <webidl> attribute DOMString uri;</webidl>
16715 An attribute to store the URI for the attendee.
16719 This is often an email in the form 'mailto:name@domain.com'.
16726 <Type type="DOMString"/>
16728 <Attribute name="name" id="::Calendar::CalendarAttendee::name">
16729 <webidl> attribute DOMString? name;</webidl>
16732 An attribute to store the name of an attendee.
16738 <Type type="DOMString" nullable="nullable"/>
16740 <Attribute name="role" id="::Calendar::CalendarAttendee::role">
16741 <webidl> attribute <ref>AttendeeRole</ref> role;</webidl>
16744 An attribute to denote the role of the attendee.
16748 (See RFC 5545, Section 3.2.16.)
16751 The default value is <var>REQ_PARTICIPANT</var>.
16758 <Type name="AttendeeRole"/>
16760 <Attribute name="status" id="::Calendar::CalendarAttendee::status">
16761 <webidl> attribute <ref>AttendeeStatus</ref> status;</webidl>
16764 An attribute to store the participant's attendance status.
16765 (See RFC 5545, Section 3.2.12.)
16769 The default value is <var>PENDING</var>.
16776 <Type name="AttendeeStatus"/>
16778 <Attribute name="RSVP" id="::Calendar::CalendarAttendee::RSVP">
16779 <webidl> attribute boolean RSVP;</webidl>
16782 An attribute to store the attendee's participation status reply (RSVP).
16783 (See RFC 5545, Section 3.2.17.)
16787 By default, this attribute is set to <var>FALSE</var>.
16794 <Type type="boolean"/>
16796 <Attribute name="type" id="::Calendar::CalendarAttendee::type">
16797 <webidl> attribute <ref>AttendeeType</ref> type;</webidl>
16800 An attribute to indicate the type of a participant.
16801 (See RFC 5545, Section 3.2.3.)
16805 The default value is <var>INDIVIDUAL</var>.
16812 <Type name="AttendeeType"/>
16814 <Attribute name="group" id="::Calendar::CalendarAttendee::group">
16815 <webidl> attribute DOMString? group;</webidl>
16818 An attribute to store the participant's group or list membership.
16819 (See RFC 5545, Section 3.2.11.)
16825 <Type type="DOMString" nullable="nullable"/>
16827 <Attribute name="delegatorURI" id="::Calendar::CalendarAttendee::delegatorURI">
16828 <webidl> attribute DOMString? delegatorURI;</webidl>
16831 An attribute to store the URI of the person who has delegated their participation to this attendee.
16832 (See RFC 5545, Section 3.2.4.)
16838 <Type type="DOMString" nullable="nullable"/>
16840 <Attribute name="delegateURI" id="::Calendar::CalendarAttendee::delegateURI">
16841 <webidl> attribute DOMString? delegateURI;</webidl>
16844 An attribute to stores the URI of the attendee to whom the person has delegated his participation.
16845 (See RFC 5545, Section 3.2.5.)
16851 <Type type="DOMString" nullable="nullable"/>
16853 <Attribute name="contactRef" id="::Calendar::CalendarAttendee::contactRef">
16854 <webidl> attribute <ref>ContactRef</ref>? contactRef;</webidl>
16857 An attribute to store the participant's reference in the Contact API.
16861 If the contact is not resolved, this attribute will be set to<var> null</var>.
16862 For more information, see the <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a>.
16869 <Type name="ContactRef" nullable="nullable"/>
16872 <Dictionary name="CalendarRecurrenceRuleInit" id="::Calendar::CalendarRecurrenceRuleInit">
16873 <webidl> dictionary CalendarRecurrenceRuleInit {
16875 <ref>TZDate</ref> untilDate;
16876 long occurrenceCount;
16877 <ref>ByDayValue</ref>[] daysOfTheWeek;
16878 short[] setPositions;
16879 <ref>TZDate</ref>[] exceptions;
16883 The properties of a <em>CalendarRecurrenceRule</em> to pass to its constructor.
16887 For more information about the members, see <em>CalendarRecurrenceRule </em>interface.
16894 <DictionaryMember name="interval" id="::Calendar::CalendarRecurrenceRuleInit::interval">
16895 <webidl> short interval;</webidl>
16896 <Type type="short"/>
16897 </DictionaryMember>
16898 <DictionaryMember name="untilDate" id="::Calendar::CalendarRecurrenceRuleInit::untilDate">
16899 <webidl> <ref>TZDate</ref> untilDate;</webidl>
16900 <Type name="TZDate"/>
16901 </DictionaryMember>
16902 <DictionaryMember name="occurrenceCount" id="::Calendar::CalendarRecurrenceRuleInit::occurrenceCount">
16903 <webidl> long occurrenceCount;</webidl>
16904 <Type type="long"/>
16905 </DictionaryMember>
16906 <DictionaryMember name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRuleInit::daysOfTheWeek">
16907 <webidl> <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
16908 <Type type="array">
16909 <Type name="ByDayValue"/>
16911 </DictionaryMember>
16912 <DictionaryMember name="setPositions" id="::Calendar::CalendarRecurrenceRuleInit::setPositions">
16913 <webidl> short[] setPositions;</webidl>
16914 <Type type="array">
16915 <Type type="short"/>
16917 </DictionaryMember>
16918 <DictionaryMember name="exceptions" id="::Calendar::CalendarRecurrenceRuleInit::exceptions">
16919 <webidl> <ref>TZDate</ref>[] exceptions;</webidl>
16920 <Type type="array">
16921 <Type name="TZDate"/>
16923 </DictionaryMember>
16925 <Interface name="CalendarRecurrenceRule" id="::Calendar::CalendarRecurrenceRule">
16926 <webidl> [Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)]
16927 interface CalendarRecurrenceRule
16929 attribute <ref>RecurrenceRuleFrequency</ref> frequency;
16931 attribute unsigned short interval;
16933 attribute <ref>TZDate</ref>? untilDate;
16935 attribute long occurrenceCount;
16937 attribute <ref>ByDayValue</ref>[] daysOfTheWeek;
16939 attribute short[] setPositions;
16941 attribute <ref>TZDate</ref>[] exceptions;
16945 This interface implements the<em> CalendarRecurrenceRule </em>object, which contains information about the recurrence of an event.
16946 (See RFC 5545, Section 3.3.10.)
16951 <Code> // Repeats daily for 7 days
16952 var rule = new tizen.CalendarRecurrenceRule("DAILY", {occurrenceCount:7});
16953 event.recurrenceRule = rule;
16956 <ExtendedAttributeList>
16957 <ExtendedAttribute name="Constructor">
16958 <webidl>Constructor(<ref>RecurrenceRuleFrequency</ref> frequency, optional <ref>CalendarRecurrenceRuleInit</ref>? ruleInitDict)</webidl>
16960 <Argument name="frequency">
16961 <Type name="RecurrenceRuleFrequency"/>
16963 <Argument optional="optional" name="ruleInitDict">
16964 <Type name="CalendarRecurrenceRuleInit" nullable="nullable"/>
16967 </ExtendedAttribute>
16968 </ExtendedAttributeList>
16969 <Attribute name="frequency" id="::Calendar::CalendarRecurrenceRule::frequency">
16970 <webidl> attribute <ref>RecurrenceRuleFrequency</ref> frequency;</webidl>
16973 An attribute to store the frequency of a recurrence rule.
16977 This property corresponds to <em>FREQ</em> in RFC 5545.
16984 <Type name="RecurrenceRuleFrequency"/>
16986 <Attribute name="interval" id="::Calendar::CalendarRecurrenceRule::interval">
16987 <webidl> attribute unsigned short interval;</webidl>
16990 An attribute to specify how often the recurrence rule repeats over the unit of time indicated by its frequency.
16994 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.
16997 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.
17000 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>.
17003 This property corresponds to <em>INTERVAL</em> in RFC 5545.
17010 <Type type="unsigned short"/>
17012 <Attribute name="untilDate" id="::Calendar::CalendarRecurrenceRule::untilDate">
17013 <webidl> attribute <ref>TZDate</ref>? untilDate;</webidl>
17016 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).
17020 By default, this attribute is set to <var>null</var>, meaning that the event recurs infinitely, unless <em>occurrenceCount </em>is set.
17023 This attribute is precise to the second. Milliseconds are ignored.
17026 This property corresponds to <em>UNTIL</em> in RFC 5545.
17033 <Type name="TZDate" nullable="nullable"/>
17035 <Attribute name="occurrenceCount" id="::Calendar::CalendarRecurrenceRule::occurrenceCount">
17036 <webidl> attribute long occurrenceCount;</webidl>
17039 An attribute to indicate the number of occurrences of a recurring event.
17043 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).
17046 By default, this attribute is set to <var>-1</var>, meaning that the event recurs infinitely, unless <em>untilDate </em>is set.
17049 This property corresponds to <em>COUNT</em> in RFC 5545.
17056 <Type type="long"/>
17058 <Attribute name="daysOfTheWeek" id="::Calendar::CalendarRecurrenceRule::daysOfTheWeek">
17059 <webidl> attribute <ref>ByDayValue</ref>[] daysOfTheWeek;</webidl>
17062 An attribute to store the days of the week associated with the recurrence rule.
17066 This property value is valid only for recurrence rules with a frequency type of <em>WEEKLY</em>, <em>MONTHLY</em>, and <em>YEARLY</em>.
17069 This property corresponds to <em>BYDAY</em> in RFC 5545.
17072 By default, this attribute is set to an empty array.
17079 <Type type="array">
17080 <Type name="ByDayValue"/>
17083 <Attribute name="setPositions" id="::Calendar::CalendarRecurrenceRule::setPositions">
17084 <webidl> attribute short[] setPositions;</webidl>
17087 An attribute to store a list of ordinal numbers that filters which recurrences to include in the recurrence rule's frequency.
17091 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.
17094 Values can be from 1 to 366 or -366 to -1.
17095 Negative values indicate counting backwards from the end of the recurrence rule's frequency (week, month, or year).
17098 This attribute must only be used in conjunction with another BYxxx rule part (such as <em>daysOfTheWeek</em>).
17101 This property corresponds to <em>BYSETPOS</em> in RFC 5545.
17104 By default, this attribute is set to an empty array.
17111 <Type type="array">
17112 <Type type="short"/>
17115 <Attribute name="exceptions" id="::Calendar::CalendarRecurrenceRule::exceptions">
17116 <webidl> attribute <ref>TZDate</ref>[] exceptions;</webidl>
17119 An attribute to list date/time exceptions for the recurring event.
17120 (See RFC 5545, Section 3.8.5.1.)
17124 This attribute is precise to the second. Milliseconds are ignored.
17127 This property corresponds to <em>EXDATE</em> in RFC 5545.
17130 By default, this attribute is set to an empty array.
17137 <Type type="array">
17138 <Type name="TZDate"/>
17142 <Interface name="CalendarEventId" id="::Calendar::CalendarEventId">
17143 <webidl> [Constructor(DOMString uid, optional DOMString? rid)]
17144 interface CalendarEventId {
17145 attribute DOMString uid;
17147 attribute DOMString? rid;
17151 This interface contains a UID and an optional recurrence ID attribute to identify calendar events.
17155 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.
17162 <ExtendedAttributeList>
17163 <ExtendedAttribute name="Constructor">
17164 <webidl>Constructor(DOMString uid, optional DOMString? rid)</webidl>
17166 <Argument name="uid">
17167 <Type type="DOMString"/>
17169 <Argument optional="optional" name="rid">
17170 <Type type="DOMString" nullable="nullable"/>
17173 </ExtendedAttribute>
17174 </ExtendedAttributeList>
17175 <Attribute name="uid" id="::Calendar::CalendarEventId::uid">
17176 <webidl> attribute DOMString uid;</webidl>
17179 An attribute to persistently, and uniquely identify a calendar event.
17183 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.
17186 See RFC 5545 (section 3.8.4.7) for more details about this parameter and algorithms to guarantee assignment of unique values.
17187 This value is assigned by the platform when the <em>add()</em> method is successfully invoked.
17194 <Type type="DOMString"/>
17196 <Attribute name="rid" id="::Calendar::CalendarEventId::rid">
17197 <webidl> attribute DOMString? rid;</webidl>
17200 An attribute to store the recurrence ID of a <em>CalendarEvent </em>instance.
17204 This attribute is used in conjunction with the <em>uid</em> property to identify a specific instance of a recurring event.
17207 The parent of a recurrence instance has its <em>rid</em> set to <var>null</var>.
17210 By default, this attribute is set to <var>null</var>.
17211 (See RFC 5545 (section 3.8.4.4) for more details about this parameter.)
17218 <Type type="DOMString" nullable="nullable"/>
17221 <Interface name="CalendarAlarm" id="::Calendar::CalendarAlarm">
17222 <webidl> [Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description),
17223 Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)]
17224 interface CalendarAlarm {
17225 attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);
17227 attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);
17229 attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);
17231 attribute DOMString? description;
17235 An interface that contains information related to an event alarm or reminder.
17240 <Code> // Creates a sound alarm 30 minutes before the event's start time
17241 var alarm = new tizen.CalendarAlarm(new tizen.TimeDuration(30, "MINS"), "SOUND");
17244 <ExtendedAttributeList>
17245 <ExtendedAttribute name="Constructor">
17246 <webidl>Constructor(<ref>TZDate</ref> absoluteDate, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17248 <Argument name="absoluteDate">
17249 <Type name="TZDate"/>
17251 <Argument name="method">
17252 <Type name="AlarmMethod"/>
17254 <Argument optional="optional" name="description">
17255 <Type type="DOMString" nullable="nullable"/>
17258 </ExtendedAttribute>
17259 <ExtendedAttribute name="Constructor">
17260 <webidl> Constructor(<ref>TimeDuration</ref> before, <ref>AlarmMethod</ref> method, optional DOMString? description)</webidl>
17262 <Argument name="before">
17263 <Type name="TimeDuration"/>
17265 <Argument name="method">
17266 <Type name="AlarmMethod"/>
17268 <Argument optional="optional" name="description">
17269 <Type type="DOMString" nullable="nullable"/>
17272 </ExtendedAttribute>
17273 </ExtendedAttributeList>
17274 <Attribute name="absoluteDate" id="::Calendar::CalendarAlarm::absoluteDate">
17275 <webidl> attribute <ref>TZDate</ref>? absoluteDate setraises(<ref>WebAPIException</ref>);</webidl>
17278 An attribute to record the absolute date and time when an alarm should be triggered.
17282 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17285 This attribute is precise to the second. Milliseconds are ignored.
17292 <Type name="TZDate" nullable="nullable"/>
17294 <RaiseException name="WebAPIException"/>
17297 <Attribute name="before" id="::Calendar::CalendarAlarm::before">
17298 <webidl> attribute <ref>TimeDuration</ref>? before setraises(<ref>WebAPIException</ref>);</webidl>
17301 An attribute to store the duration before an event starts on which the alarm should be triggered.
17305 The duration should be positive.
17308 <em>absoluteDate </em>and <em>before </em>are mutually exclusive.
17311 This attribute is precise to the second. Milliseconds are ignored.
17318 <Type name="TimeDuration" nullable="nullable"/>
17320 <RaiseException name="WebAPIException"/>
17323 <Attribute name="method" id="::Calendar::CalendarAlarm::method">
17324 <webidl> attribute <ref>AlarmMethod</ref> method setraises(<ref>WebAPIException</ref>);</webidl>
17327 An attribute to denote the notification method used by an alarm.
17333 <Type name="AlarmMethod"/>
17335 <RaiseException name="WebAPIException"/>
17338 <Attribute name="description" id="::Calendar::CalendarAlarm::description">
17339 <webidl> attribute DOMString? description;</webidl>
17342 An attribute to store the description of an alarm.
17346 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.
17349 The default value is an empty string.
17356 <Type type="DOMString" nullable="nullable"/>
17359 <Interface name="CalendarEventArraySuccessCallback" id="::Calendar::CalendarEventArraySuccessCallback">
17360 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17361 interface CalendarEventArraySuccessCallback {
17362 void onsuccess(<ref>CalendarEvent</ref>[] events);
17366 An interface that implements the success callback used in the asynchronous operation for retrieving a list of calendar events.
17372 <ExtendedAttributeList>
17373 <ExtendedAttribute name="Callback" value="FunctionOnly">
17374 <webidl>Callback</webidl>
17375 </ExtendedAttribute>
17376 <ExtendedAttribute name="NoInterfaceObject">
17377 <webidl> NoInterfaceObject</webidl>
17378 </ExtendedAttribute>
17379 </ExtendedAttributeList>
17380 <Operation name="onsuccess" id="::Calendar::CalendarEventArraySuccessCallback::onsuccess">
17381 <webidl> void onsuccess(<ref>CalendarEvent</ref>[] events);</webidl>
17384 Called when the list of calendar events is retrieved successfully.
17390 <Type type="void"/>
17392 <Argument name="events">
17395 The array of <em>CalendarEvent </em>objects.
17398 <Type type="array">
17399 <Type name="CalendarEvent"/>
17405 <Interface name="CalendarItemArraySuccessCallback" id="::Calendar::CalendarItemArraySuccessCallback">
17406 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17407 interface CalendarItemArraySuccessCallback {
17408 void onsuccess(<ref>CalendarItem</ref>[] items);
17412 This interface implements the success callback used in the asynchronous operation for retrieving a list of calendar items.
17418 <ExtendedAttributeList>
17419 <ExtendedAttribute name="Callback" value="FunctionOnly">
17420 <webidl>Callback</webidl>
17421 </ExtendedAttribute>
17422 <ExtendedAttribute name="NoInterfaceObject">
17423 <webidl> NoInterfaceObject</webidl>
17424 </ExtendedAttribute>
17425 </ExtendedAttributeList>
17426 <Operation name="onsuccess" id="::Calendar::CalendarItemArraySuccessCallback::onsuccess">
17427 <webidl> void onsuccess(<ref>CalendarItem</ref>[] items);</webidl>
17430 Called when the list of calendar items is retrieved successfully.
17436 <Type type="void"/>
17438 <Argument name="items">
17441 The array of <em>CalendarItem </em>objects.
17444 <Type type="array">
17445 <Type name="CalendarItem"/>
17451 <Interface name="CalendarArraySuccessCallback" id="::Calendar::CalendarArraySuccessCallback">
17452 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
17453 interface CalendarArraySuccessCallback {
17454 void onsuccess(<ref>Calendar</ref>[] calendars);
17458 This interface implements the success callback used in the asynchronous operation to get a list of calendars using the <em>getCalendars()</em> method.
17464 <ExtendedAttributeList>
17465 <ExtendedAttribute name="Callback" value="FunctionOnly">
17466 <webidl>Callback</webidl>
17467 </ExtendedAttribute>
17468 <ExtendedAttribute name="NoInterfaceObject">
17469 <webidl> NoInterfaceObject</webidl>
17470 </ExtendedAttribute>
17471 </ExtendedAttributeList>
17472 <Operation name="onsuccess" id="::Calendar::CalendarArraySuccessCallback::onsuccess">
17473 <webidl> void onsuccess(<ref>Calendar</ref>[] calendars);</webidl>
17476 Called when the array of <em>Calendar </em>objects is retrieved successfully.
17482 <Type type="void"/>
17484 <Argument name="calendars">
17487 The array of <em>Calendar </em>objects.
17490 <Type type="array">
17491 <Type name="Calendar"/>
17497 <Interface name="CalendarChangeCallback" id="::Calendar::CalendarChangeCallback">
17498 <webidl> [Callback, NoInterfaceObject] interface CalendarChangeCallback {
17499 void onitemsadded(<ref>CalendarItem</ref>[] items);
17501 void onitemsupdated(<ref>CalendarItem</ref>[] items);
17503 void onitemsremoved(<ref>CalendarItemId</ref>[] ids);
17507 This interface specifies a set of methods that will be invoked every time a calendar change occurs (calendar item addition/update/removal).
17513 <ExtendedAttributeList>
17514 <ExtendedAttribute name="Callback">
17515 <webidl>Callback</webidl>
17516 </ExtendedAttribute>
17517 <ExtendedAttribute name="NoInterfaceObject">
17518 <webidl> NoInterfaceObject</webidl>
17519 </ExtendedAttribute>
17520 </ExtendedAttributeList>
17521 <Operation name="onitemsadded" id="::Calendar::CalendarChangeCallback::onitemsadded">
17522 <webidl> void onitemsadded(<ref>CalendarItem</ref>[] items);</webidl>
17525 Called when items are added to the calendar.
17531 <Type type="void"/>
17533 <Argument name="items">
17536 The list of items that were added.
17539 <Type type="array">
17540 <Type name="CalendarItem"/>
17545 <Operation name="onitemsupdated" id="::Calendar::CalendarChangeCallback::onitemsupdated">
17546 <webidl> void onitemsupdated(<ref>CalendarItem</ref>[] items);</webidl>
17549 Called when items are updated in the calendar.
17555 <Type type="void"/>
17557 <Argument name="items">
17560 The list of items that were updated.
17563 <Type type="array">
17564 <Type name="CalendarItem"/>
17569 <Operation name="onitemsremoved" id="::Calendar::CalendarChangeCallback::onitemsremoved">
17570 <webidl> void onitemsremoved(<ref>CalendarItemId</ref>[] ids);</webidl>
17573 Called when item are removed from the calendar.
17579 <Type type="void"/>
17581 <Argument name="ids">
17584 The list of identifiers for the items that were removed.
17587 <Type type="array">
17588 <Type name="CalendarItemId"/>
17595 <Module name="Callhistory" id="::Callhistory">
17596 <webidl>module Callhistory {
17597 [NoInterfaceObject] interface CallHistoryObject {
17598 readonly attribute <ref>CallHistory</ref> callhistory;
17601 <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;
17603 [NoInterfaceObject] interface RemoteParty {
17604 readonly attribute DOMString? remoteParty;
17606 readonly attribute <ref>PersonId</ref>? personId;
17610 [NoInterfaceObject] interface CallHistoryEntry {
17612 readonly attribute DOMString uid;
17614 readonly attribute DOMString type;
17616 readonly attribute DOMString[]? features;
17618 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17620 readonly attribute Date startTime;
17622 readonly attribute unsigned long duration;
17624 attribute DOMString direction;
17627 [NoInterfaceObject] interface CallHistory {
17629 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17630 optional <ref>ErrorCallback</ref>? errorCallback,
17631 optional <ref>AbstractFilter</ref>? filter,
17632 optional <ref>SortMode</ref>? sortMode,
17633 optional unsigned long? limit,
17634 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17636 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17638 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17639 optional <ref>SuccessCallback</ref>? successCallback,
17640 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17642 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17643 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17645 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17647 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17650 [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
17651 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
17654 [Callback, NoInterfaceObject]
17655 interface CallHistoryChangeCallback {
17656 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
17658 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
17660 void onremoved(DOMString[] removedItems);
17665 This API provides interfaces and methods for retrieving information from the call history.
17669 For more information on the Callhistory features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/call.htm">Call History Guide</a>.
17675 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
17679 To guarantee this application running on a device with Telephony feature, define below in the config file:
17685 <Interface name="CallHistoryObject" id="::Callhistory::CallHistoryObject">
17686 <webidl> [NoInterfaceObject] interface CallHistoryObject {
17687 readonly attribute <ref>CallHistory</ref> callhistory;
17691 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
17692 The <em>tizen.callhistory<em> object allows access to the CallHistory API.
17693 </em></em> </brief>
17698 <ExtendedAttributeList>
17699 <ExtendedAttribute name="NoInterfaceObject">
17700 <webidl>NoInterfaceObject</webidl>
17701 </ExtendedAttribute>
17702 </ExtendedAttributeList>
17703 <Attribute readonly="readonly" name="callhistory" id="::Callhistory::CallHistoryObject::callhistory">
17704 <webidl> readonly attribute <ref>CallHistory</ref> callhistory;</webidl>
17705 <Type name="CallHistory"/>
17708 <Implements name1="Tizen" name2="CallHistoryObject">
17709 <webidl> <ref>Tizen</ref> implements <ref>CallHistoryObject</ref>;</webidl>
17712 The CallHistory interface is available from the <em>Tizen </em>object through the <em>Window </em>object.
17719 <Interface name="RemoteParty" id="::Callhistory::RemoteParty">
17720 <webidl> [NoInterfaceObject] interface RemoteParty {
17721 readonly attribute DOMString? remoteParty;
17723 readonly attribute <ref>PersonId</ref>? personId;
17728 This interface represents remote parties.
17734 <ExtendedAttributeList>
17735 <ExtendedAttribute name="NoInterfaceObject">
17736 <webidl>NoInterfaceObject</webidl>
17737 </ExtendedAttribute>
17738 </ExtendedAttributeList>
17739 <Attribute readonly="readonly" name="remoteParty" id="::Callhistory::RemoteParty::remoteParty">
17740 <webidl> readonly attribute DOMString? remoteParty;</webidl>
17743 An attribute to store the remote party identifier (RPID).
17744 The RPID is a unique identifier used by a service with call capability. It also includes phone numbers.
17745 Contacts are also defined per service, so an RPID can be resolved to a Contact.
17746 A <var>null </var>value means that the remote is hidden (private number).
17752 <Type type="DOMString" nullable="nullable"/>
17754 <Attribute readonly="readonly" name="personId" id="::Callhistory::RemoteParty::personId">
17755 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
17758 An attribute to store the identifier of the person that the raw contact belongs to.
17762 If the contact cannot be resolved, the value is <var>null</var>.
17763 See <a href="../../org.tizen.web.device.apireference/tizen/contact.html">Contact API</a> for more information.
17770 <Type name="PersonId" nullable="nullable"/>
17773 <Interface name="CallHistoryEntry" id="::Callhistory::CallHistoryEntry">
17774 <webidl> [NoInterfaceObject] interface CallHistoryEntry {
17776 readonly attribute DOMString uid;
17778 readonly attribute DOMString type;
17780 readonly attribute DOMString[]? features;
17782 readonly attribute <ref>RemoteParty</ref>[] remoteParties;
17784 readonly attribute Date startTime;
17786 readonly attribute unsigned long duration;
17788 attribute DOMString direction;
17792 This interface represents the subset of properties of calls, which become a call record in the call history after the call ends.
17798 <ExtendedAttributeList>
17799 <ExtendedAttribute name="NoInterfaceObject">
17800 <webidl>NoInterfaceObject</webidl>
17801 </ExtendedAttribute>
17802 </ExtendedAttributeList>
17803 <Attribute readonly="readonly" name="uid" id="::Callhistory::CallHistoryEntry::uid">
17804 <webidl> readonly attribute DOMString uid;</webidl>
17807 An attribute to store the unique identifier of a call record.
17813 <Type type="DOMString"/>
17815 <Attribute readonly="readonly" name="type" id="::Callhistory::CallHistoryEntry::type">
17816 <webidl> readonly attribute DOMString type;</webidl>
17819 An attribute to store the service type of the call saved to call history.
17823 The following values are the supported:
17827 TEL - for all protocols with phone number addressing (PSTN, GSM, CDMA, LTE, etc.) </li>
17829 XMPP - for generic XMPP calls </li>
17831 SIP - for generic SIP calls </li>
17838 <Type type="DOMString"/>
17840 <Attribute readonly="readonly" name="features" id="::Callhistory::CallHistoryEntry::features">
17841 <webidl> readonly attribute DOMString[]? features;</webidl>
17844 An attributes to store the features associated with the call service saved to call history.
17845 The following values are the supported:
17850 CALL - for all call types </li>
17852 VOICECALL - for voice-only calls </li>
17854 VIDEOCALL - for audio and video channel support in the call </li>
17856 EMERGENCYCALL - to denote an emergency call </li>
17863 <Type type="array" nullable="nullable">
17864 <Type type="DOMString"/>
17867 <Attribute readonly="readonly" name="remoteParties" id="::Callhistory::CallHistoryEntry::remoteParties">
17868 <webidl> readonly attribute <ref>RemoteParty</ref>[] remoteParties;</webidl>
17871 An attributes to store the remote parties participating in the call.
17877 <Type type="array">
17878 <Type name="RemoteParty"/>
17881 <Attribute readonly="readonly" name="startTime" id="::Callhistory::CallHistoryEntry::startTime">
17882 <webidl> readonly attribute Date startTime;</webidl>
17885 An attribute to store the start time of the call.
17886 This attribute is the moment when media channels come up. The exact meaning is defined by the back-end.
17892 <Type type="Date"/>
17894 <Attribute readonly="readonly" name="duration" id="::Callhistory::CallHistoryEntry::duration">
17895 <webidl> readonly attribute unsigned long duration;</webidl>
17898 An attribute to store the duration of the call in seconds.
17899 This attribute is the duration from media channels coming up to the moment when media channels tear down on the same call service.
17900 If the call is migrated to another service, another call history entry is used.
17901 The exact meaning is defined by the back-end.
17907 <Type type="unsigned long"/>
17909 <Attribute name="direction" id="::Callhistory::CallHistoryEntry::direction">
17910 <webidl> attribute DOMString direction;</webidl>
17913 An attribute to indicate whether the call was dialed, received, missed, blocked or rejected.
17914 The following values are the supported:
17919 DIALED - for dialed calls </li>
17921 RECEIVED - for received calls </li>
17923 MISSEDNEW - for missed calls not seen yet </li>
17925 MISSED - for missed calls </li>
17927 BLOCKED - for blocked calls </li>
17929 REJECTED - for rejected calls </li>
17936 <Type type="DOMString"/>
17939 <Interface name="CallHistory" id="::Callhistory::CallHistory">
17940 <webidl> [NoInterfaceObject] interface CallHistory {
17942 void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17943 optional <ref>ErrorCallback</ref>? errorCallback,
17944 optional <ref>AbstractFilter</ref>? filter,
17945 optional <ref>SortMode</ref>? sortMode,
17946 optional unsigned long? limit,
17947 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
17949 void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);
17951 void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
17952 optional <ref>SuccessCallback</ref>? successCallback,
17953 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17955 void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
17956 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
17958 long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);
17960 void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);
17964 This interface manages call history.
17965 Apps can read or delete call history (depending on permission).
17966 Modifying call history is allowed for certain attributes, like direction.
17967 Adding call history is owned by the back-end. Filtering is supported for all fields of <em>CallHistoryEntry</em>.
17973 <ExtendedAttributeList>
17974 <ExtendedAttribute name="NoInterfaceObject">
17975 <webidl>NoInterfaceObject</webidl>
17976 </ExtendedAttribute>
17977 </ExtendedAttributeList>
17978 <Operation name="find" id="::Callhistory::CallHistory::find">
17979 <webidl> void find(<ref>CallHistoryEntryArraySuccessCallback</ref> successCallback,
17980 optional <ref>ErrorCallback</ref>? errorCallback,
17981 optional <ref>AbstractFilter</ref>? filter,
17982 optional <ref>SortMode</ref>? sortMode,
17983 optional unsigned long? limit,
17984 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
17987 Finds and returns call history.
17991 The <em>errorCallback()</em> is launched with these error types:
17995 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
17997 UnknownError - If any other error occurs. </li>
18007 http://tizen.org/privilege/callhistory.read
18009 <Code> // Defines success callback
18010 function onSuccess(results) {
18011 console.log(results.length + " call history item(s) found!");
18012 for (var i=0; i<results.length; i++) {
18013 console.log(i + ". " + results[i].toString()); // process the CallHistoryEntry
18017 // Defines error callback
18018 function onError(error) {
18019 console.log("Query failed" + error.name);
18022 // Defines filter: list CS calls, most recent first
18023 var filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
18025 // Defines sort mode: descending on call start time.
18026 var sortMode = new tizen.SortMode("startTime", "DESC");
18028 // Makes the query and wire up the callbacks
18029 tizen.callhistory.find(onSuccess,
18034 var numberfilter = new tizen.AttributeFilter(
18035 "remoteParties.remoteParty",
18036 "EXACTLY",
18037 "123456789");
18039 // Creates a composite filter for time constraints
18040 var y2009Filter = new tizen.AttributeRangeFilter(
18041 "startTime",
18042 new Date(2009, 0, 1),
18043 new Date(2010, 0, 1));
18045 var y2011Filter = new tizen.AttributeRangeFilter(
18046 "startTime",
18047 new Date(2011, 0, 1),
18048 new Date(2012, 0, 1));
18050 var datefilter = new tizen.CompositeFilter("UNION", [y2009Filter, y2011Filter]);
18052 // Creates a filter to find all video calls (including cellular, skype, etc)
18053 // The filter matches exactly any features from the "features" array
18054 var tfilter = new tizen.AttributeFilter("features", "EXACTLY", "VIDEOCALL");
18056 // Creates composite filter
18057 var ifilter = new tizen.CompositeFilter("INTERSECTION",
18058 [numberFilter, dateFilter, tfilter]);
18060 // Makes the query and wire up the callbacks; reuse sortMode
18061 tizen.callhistory.find(onSuccess,
18068 <Type type="void"/>
18070 <Argument name="successCallback">
18073 A handler for query result set.
18076 <Type name="CallHistoryEntryArraySuccessCallback"/>
18078 <Argument optional="optional" name="errorCallback">
18081 The method to call when an error occurs.
18084 <Type name="ErrorCallback" nullable="nullable"/>
18086 <Argument optional="optional" name="filter">
18089 A filter defined on <em>CallHistoryEntry </em>attributes. It can be a composite filter.
18092 <Type name="AbstractFilter" nullable="nullable"/>
18094 <Argument optional="optional" name="sortMode">
18097 The sort order in which call history are return.
18100 <Type name="SortMode" nullable="nullable"/>
18102 <Argument optional="optional" name="limit">
18105 The maximum limit of query result (It is the same meaning as SQL LIMIT).
18106 If limit is 0, query result is no limit.
18109 <Type type="unsigned long" nullable="nullable"/>
18111 <Argument optional="optional" name="offset">
18114 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.
18117 <Type type="unsigned long" nullable="nullable"/>
18121 <RaiseException name="WebAPIException">
18124 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18127 with error type SecurityError, if this functionality is not allowed.
18130 with error type NotSupportedError, if the feature is not supported.
18136 <Operation name="remove" id="::Callhistory::CallHistory::remove">
18137 <webidl> void remove(<ref>CallHistoryEntry</ref> entry) raises(<ref>WebAPIException</ref>);</webidl>
18140 Removes a call history synchronously.
18149 http://tizen.org/privilege/callhistory.write
18151 <Code> // Defines success callback
18152 function onSuccess(results) {
18153 if (results.length > 0)
18154 tizen.callhistory.remove(results[0]);
18157 // Defines error callback
18158 function onError(error) {
18159 console.log("Query failed" + error.name);
18162 // Makes the query and wires up the callbacks
18163 tizen.callhistory.find(onSuccess, onError);
18167 <Type type="void"/>
18169 <Argument name="entry">
18172 Call history entry to be deleted.
18175 <Type name="CallHistoryEntry"/>
18179 <RaiseException name="WebAPIException">
18182 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18185 with error type InvalidValuesError, if any input parameter contains invalid values.
18188 with error type SecurityError, if the application does not have the privilege to call this method.
18191 with error type NotSupportedError, if the feature is not supported.
18194 with error type UnknownError, if any other error occurs.
18200 <Operation name="removeBatch" id="::Callhistory::CallHistory::removeBatch">
18201 <webidl> void removeBatch(<ref>CallHistoryEntry</ref>[] entries,
18202 optional <ref>SuccessCallback</ref>? successCallback,
18203 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18206 Removes a list of call history asynchronously.
18210 The <em>errorCallback()</em> is launched with these error types:
18214 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18216 UnknownError - If any other error occurs. </li>
18226 http://tizen.org/privilege/callhistory.write
18228 <Code> // Defines success callback
18229 function onSuccess(results) {
18230 tizen.callhistory.removeBatch(results);
18233 // Defines error callback
18234 function onError(error) {
18235 console.log("Query failed" + error.name);
18238 // Makes the query and wires up the callbacks
18239 tizen.callhistory.find(onSuccess, onError);
18243 <Type type="void"/>
18245 <Argument name="entries">
18248 A list of call history entries to delete.
18251 <Type type="array">
18252 <Type name="CallHistoryEntry"/>
18255 <Argument optional="optional" name="successCallback">
18258 A generic success handler.
18261 <Type name="SuccessCallback" nullable="nullable"/>
18263 <Argument optional="optional" name="errorCallback">
18269 <Type name="ErrorCallback" nullable="nullable"/>
18273 <RaiseException name="WebAPIException">
18276 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18279 with error type SecurityError, if the application does not have the privilege to call this method.
18282 with error type NotSupportedError, if this feature is not supported.
18288 <Operation name="removeAll" id="::Callhistory::CallHistory::removeAll">
18289 <webidl> void removeAll(optional <ref>SuccessCallback</ref>? successCallback,
18290 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
18293 Removes all call history asynchronously.
18297 The <em>errorCallback()</em> is launched with these error types:
18301 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
18303 UnknownError - If any other error occurs. </li>
18313 http://tizen.org/privilege/callhistory.write
18316 <Type type="void"/>
18318 <Argument optional="optional" name="successCallback">
18321 A generic success handler.
18324 <Type name="SuccessCallback" nullable="nullable"/>
18326 <Argument optional="optional" name="errorCallback">
18332 <Type name="ErrorCallback" nullable="nullable"/>
18336 <RaiseException name="WebAPIException">
18339 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
18342 with error type SecurityError, if this functionality is not allowed.
18345 with error type NotSupportedError, if this feature is not supported.
18351 <Operation name="addChangeListener" id="::Callhistory::CallHistory::addChangeListener">
18352 <webidl> long addChangeListener(<ref>CallHistoryChangeCallback</ref> observer) raises(<ref>WebAPIException</ref>);</webidl>
18355 Adds a listener to register for callback to observe call history changes.
18364 http://tizen.org/privilege/callhistory.read
18366 <Code> var onListenerCB = {
18367 onadded: function(newItems) {
18368 console.log("New Item added");
18369 for (var i in newItems) {
18370 console.log("Item " + i + " startTime: " + newItems[i].startTime);
18373 onchanged: function(changedItems) {
18374 console.log("Items changed");
18375 for (var i in changedItems) {
18376 console.log("Item " + i + " direction: " + changedItems[i].direction);
18379 onremoved: function(removedItems) {
18380 console.log("Items removed");
18381 for(var i in removedItems) {
18382 console.log("Item " + i + " : " + removedItems[i]);
18387 // Registers a call history callback
18388 var handle = tizen.callhistory.addChangeListener(onListenerCB);
18390 // Unregisters a previously registered listener
18391 tizen.callhistory.removeChangeListener(handle);
18393 console.log("Exception - code: " + error.name + " message: " + error.message);
18401 long A handle which can be used for unregistering.
18406 <Argument name="observer">
18409 A callback for handling the list of new or changed or <em>CallHistoryEntry </em>objects in the call history.
18412 <Type name="CallHistoryChangeCallback"/>
18416 <RaiseException name="WebAPIException">
18419 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18422 with error type InvalidValuesError, if any input parameter contains invalid values.
18425 with error type SecurityError, if the application does not have the privilege to call this method.
18428 with error type NotSupportedError, if the feature is not supported.
18431 with error type UnknownError, if any other error occurs.
18437 <Operation name="removeChangeListener" id="::Callhistory::CallHistory::removeChangeListener">
18438 <webidl> void removeChangeListener(long handle) raises(<ref>WebAPIException</ref>);</webidl>
18441 Removes a listener to unregister a previously registered listener.
18450 http://tizen.org/privilege/callhistory.read
18453 <Type type="void"/>
18455 <Argument name="handle">
18458 The previously obtained listener handle.
18461 <Type type="long"/>
18465 <RaiseException name="WebAPIException">
18468 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
18471 with error type InvalidValuesError, if any input parameter contains invalid values.
18474 with error type SecurityError, if the application does not have the privilege to call this method.
18477 with error type NotSupportedError, if the feature is not supported.
18480 with error type UnknownError, if any other error occurs.
18487 <Interface name="CallHistoryEntryArraySuccessCallback" id="::Callhistory::CallHistoryEntryArraySuccessCallback">
18488 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface CallHistoryEntryArraySuccessCallback {
18489 void onsuccess(<ref>CallHistoryEntry</ref>[] entries);
18493 This is a callback interface of <em>CallHistory </em>operations.
18494 For example code, see <em>CallHistory </em>interface.
18500 <ExtendedAttributeList>
18501 <ExtendedAttribute name="Callback" value="FunctionOnly">
18502 <webidl>Callback</webidl>
18503 </ExtendedAttribute>
18504 <ExtendedAttribute name="NoInterfaceObject">
18505 <webidl> NoInterfaceObject</webidl>
18506 </ExtendedAttribute>
18507 </ExtendedAttributeList>
18508 <Operation name="onsuccess" id="::Callhistory::CallHistoryEntryArraySuccessCallback::onsuccess">
18509 <webidl> void onsuccess(<ref>CallHistoryEntry</ref>[] entries);</webidl>
18512 Called when the queries on call history have been successfully completed.
18518 <Type type="void"/>
18520 <Argument name="entries">
18523 An array of <em>CallHistoryEntry </em>objects, representing the result set of the query over the call history.
18526 <Type type="array">
18527 <Type name="CallHistoryEntry"/>
18533 <Interface name="CallHistoryChangeCallback" id="::Callhistory::CallHistoryChangeCallback">
18534 <webidl> [Callback, NoInterfaceObject]
18535 interface CallHistoryChangeCallback {
18536 void onadded(<ref>CallHistoryEntry</ref>[] newItems);
18538 void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);
18540 void onremoved(DOMString[] removedItems);
18544 This is a callback interface of a<em> CallHistory </em>operations.
18545 For example code, see <em>CallHistory </em>interface.
18551 <ExtendedAttributeList>
18552 <ExtendedAttribute name="Callback">
18553 <webidl>Callback</webidl>
18554 </ExtendedAttribute>
18555 <ExtendedAttribute name="NoInterfaceObject">
18556 <webidl> NoInterfaceObject</webidl>
18557 </ExtendedAttribute>
18558 </ExtendedAttributeList>
18559 <Operation name="onadded" id="::Callhistory::CallHistoryChangeCallback::onadded">
18560 <webidl> void onadded(<ref>CallHistoryEntry</ref>[] newItems);</webidl>
18563 Called when a new call history item is added.
18569 <Type type="void"/>
18571 <Argument name="newItems">
18574 An array of <em>CallHistoryEntry </em>objects, representing the new items added to call history.
18577 <Type type="array">
18578 <Type name="CallHistoryEntry"/>
18583 <Operation name="onchanged" id="::Callhistory::CallHistoryChangeCallback::onchanged">
18584 <webidl> void onchanged(<ref>CallHistoryEntry</ref>[] changedItems);</webidl>
18587 Called when the call history have been changed.
18593 <Type type="void"/>
18595 <Argument name="changedItems">
18598 An array of <em>CallHistoryEntry </em>objects, representing the changed items in call history.
18601 <Type type="array">
18602 <Type name="CallHistoryEntry"/>
18607 <Operation name="onremoved" id="::Callhistory::CallHistoryChangeCallback::onremoved">
18608 <webidl> void onremoved(DOMString[] removedItems);</webidl>
18611 Called when the call history have been removed.
18617 <Type type="void"/>
18619 <Argument name="removedItems">
18622 An array of an uid of <em>CallHistoryEntry </em>objects, representing the removed items in call history.
18625 <Type type="array">
18626 <Type type="DOMString"/>
18633 <Module name="Contact" id="::Contact">
18634 <webidl>module Contact {
18636 typedef DOMString AddressBookId;
18638 typedef DOMString ContactId;
18640 typedef DOMString PersonId;
18642 typedef DOMString ContactGroupId;
18644 enum ContactTextFormat {"VCARD_30"};
18646 [NoInterfaceObject] interface ContactManagerObject {
18647 readonly attribute <ref>ContactManager</ref> contact;
18649 <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;
18651 [NoInterfaceObject] interface ContactManager {
18653 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
18654 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18656 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
18658 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
18660 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
18662 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18664 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
18666 void updateBatch(<ref>Person</ref>[] persons,
18667 optional <ref>SuccessCallback</ref>? successCallback,
18668 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18670 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18672 void removeBatch(<ref>PersonId</ref>[] personIds,
18673 optional <ref>SuccessCallback</ref>? successCallback,
18674 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18676 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
18677 optional <ref>ErrorCallback</ref>? errorCallback,
18678 optional <ref>AbstractFilter</ref>? filter,
18679 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18681 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
18683 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18686 [NoInterfaceObject] interface AddressBook {
18688 readonly attribute <ref>AddressBookId</ref>? id;
18690 readonly attribute DOMString name;
18692 readonly attribute boolean readOnly;
18694 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18696 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18698 void addBatch(<ref>Contact</ref>[] contacts,
18699 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
18700 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18702 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
18704 void updateBatch(<ref>Contact</ref>[] contacts,
18705 optional <ref>SuccessCallback</ref>? successCallback,
18706 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18708 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
18710 void removeBatch(<ref>ContactId</ref>[] ids,
18711 optional <ref>SuccessCallback</ref>? successCallback,
18712 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18714 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
18715 optional <ref>ErrorCallback</ref>? errorCallback,
18716 optional <ref>AbstractFilter</ref>? filter,
18717 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
18719 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
18720 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
18722 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
18724 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18726 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18728 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
18730 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
18732 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
18735 [NoInterfaceObject] interface Person {
18736 readonly attribute <ref>PersonId</ref> id;
18738 readonly attribute DOMString displayName;
18740 readonly attribute long contactCount;
18742 readonly attribute boolean hasPhoneNumber;
18744 readonly attribute boolean hasEmail;
18746 attribute boolean isFavorite;
18748 attribute DOMString? photoURI;
18750 attribute DOMString? ringtoneURI;
18752 attribute <ref>ContactId</ref> displayContactId;
18754 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
18756 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
18759 dictionary ContactInit {
18760 <ref>ContactName</ref> name;
18761 <ref>ContactAddress</ref>[] addresses;
18762 DOMString photoURI;
18763 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
18764 <ref>ContactEmailAddress</ref>[] emails;
18766 <ref>ContactAnniversary</ref>[] anniversaries;
18767 <ref>ContactOrganization</ref>[] organizations;
18769 <ref>ContactWebSite</ref>[] urls;
18770 DOMString ringtoneURI;
18771 <ref>ContactGroupId</ref>[] groupIds;
18774 [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
18775 Constructor(DOMString stringRepresentation)]
18776 interface Contact {
18777 readonly attribute <ref>ContactId</ref>? id;
18779 readonly attribute <ref>PersonId</ref>? personId;
18781 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18783 readonly attribute Date? lastUpdated;
18785 readonly attribute boolean isFavorite;
18787 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
18789 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
18791 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
18793 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
18795 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
18797 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
18799 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
18801 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
18803 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
18805 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
18807 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
18809 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
18811 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
18813 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
18816 [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
18817 interface ContactRef {
18818 attribute <ref>AddressBookId</ref> addressBookId;
18820 attribute <ref>ContactId</ref> contactId;
18823 dictionary ContactNameInit {
18826 DOMString firstName;
18827 DOMString middleName;
18828 DOMString lastName;
18829 DOMString[] nicknames;
18830 DOMString phoneticFirstName;
18831 DOMString phoneticLastName;
18834 [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
18835 interface ContactName {
18836 attribute DOMString? prefix;
18838 attribute DOMString? suffix;
18840 attribute DOMString? firstName;
18842 attribute DOMString? middleName;
18844 attribute DOMString? lastName;
18846 attribute DOMString[] nicknames;
18848 attribute DOMString? phoneticFirstName;
18850 attribute DOMString? phoneticLastName;
18852 readonly attribute DOMString? displayName;
18855 dictionary ContactOrganizationInit {
18857 DOMString department;
18863 [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
18864 interface ContactOrganization {
18865 attribute DOMString? name;
18867 attribute DOMString? department;
18869 attribute DOMString? title;
18871 attribute DOMString? role;
18873 attribute DOMString? logoURI;
18876 [Constructor(DOMString url, optional DOMString type)]
18877 interface ContactWebSite
18879 attribute DOMString url;
18881 attribute DOMString type;
18884 [Constructor(Date date, optional DOMString? label)]
18885 interface ContactAnniversary
18887 attribute Date date;
18889 attribute DOMString? label;
18892 dictionary ContactAddressInit
18897 DOMString streetAddress;
18898 DOMString additionalInformation;
18899 DOMString postalCode;
18904 [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
18905 interface ContactAddress
18907 attribute DOMString? country;
18909 attribute DOMString? region;
18911 attribute DOMString? city;
18913 attribute DOMString? streetAddress;
18915 attribute DOMString? additionalInformation;
18917 attribute DOMString? postalCode;
18919 attribute boolean isDefault;
18921 attribute DOMString[] types;
18924 [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
18925 interface ContactPhoneNumber
18927 attribute DOMString number;
18929 attribute boolean isDefault;
18931 attribute DOMString[] types;
18934 [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
18935 interface ContactEmailAddress
18937 attribute DOMString email;
18939 attribute boolean isDefault;
18941 attribute DOMString[] types;
18944 [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
18945 interface ContactGroup
18947 readonly attribute <ref>ContactGroupId</ref>? id;
18949 readonly attribute <ref>AddressBookId</ref>? addressBookId;
18951 attribute DOMString name;
18953 attribute DOMString? ringtoneURI;
18955 attribute DOMString? photoURI;
18957 readonly attribute DOMString readOnly;
18960 [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
18961 void onsuccess(<ref>Person</ref>[] persons);
18964 [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
18965 void onsuccess(<ref>Contact</ref>[] contacts);
18968 [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
18969 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
18972 [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
18973 void oncontactsadded(<ref>Contact</ref>[] contacts);
18975 void oncontactsupdated(<ref>Contact</ref>[] contacts);
18977 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
18980 [Callback, NoInterfaceObject] interface PersonsChangeCallback {
18981 void onpersonsadded(<ref>Person</ref>[] persons);
18983 void onpersonsupdated(<ref>Person</ref>[] persons);
18985 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
18990 This API is for managing Address Books.
18994 A contact is a set of information that describes a contact. The contact contains information, such as phone numbers,
18995 e-mail addresses, etc.
18998 <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.
19001 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.
19004 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.
19007 For more information on the Contact features, see <a href="../../org.tizen.web.appprogramming/html/guide/social_guide/contact.htm">Contact Guide</a>.
19014 <Typedef name="AddressBookId" id="::Contact::AddressBookId">
19015 <webidl> typedef DOMString AddressBookId;</webidl>
19018 The address book identifier.
19024 <Type type="DOMString"/>
19026 <Typedef name="ContactId" id="::Contact::ContactId">
19027 <webidl> typedef DOMString ContactId;</webidl>
19030 The contact identifier.
19036 <Type type="DOMString"/>
19038 <Typedef name="PersonId" id="::Contact::PersonId">
19039 <webidl> typedef DOMString PersonId;</webidl>
19042 The person identifier.
19048 <Type type="DOMString"/>
19050 <Typedef name="ContactGroupId" id="::Contact::ContactGroupId">
19051 <webidl> typedef DOMString ContactGroupId;</webidl>
19054 The group identifier.
19060 <Type type="DOMString"/>
19062 <Enum name="ContactTextFormat" id="::Contact::ContactTextFormat">
19063 <webidl> enum ContactTextFormat {"VCARD_30"};</webidl>
19066 An enumerator that indicates the contact format that is used for export. * The possible values are:
19071 VCARD_30 - vCard v3.0 format </li>
19074 Currently, vCard v3.0 is the only format supported by the Tizen platform.
19081 <EnumValue stringvalue="VCARD_30">
19082 <webidl>"VCARD_30</webidl>
19085 <Interface name="ContactManagerObject" id="::Contact::ContactManagerObject">
19086 <webidl> [NoInterfaceObject] interface ContactManagerObject {
19087 readonly attribute <ref>ContactManager</ref> contact;
19091 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
19095 There is a <em>tizen.contact </em>object that allows access to the Contact API functionality.
19102 <ExtendedAttributeList>
19103 <ExtendedAttribute name="NoInterfaceObject">
19104 <webidl>NoInterfaceObject</webidl>
19105 </ExtendedAttribute>
19106 </ExtendedAttributeList>
19107 <Attribute readonly="readonly" name="contact" id="::Contact::ContactManagerObject::contact">
19108 <webidl> readonly attribute <ref>ContactManager</ref> contact;</webidl>
19109 <Type name="ContactManager"/>
19112 <Implements name1="Tizen" name2="ContactManagerObject">
19113 <webidl> <ref>Tizen</ref> implements <ref>ContactManagerObject</ref>;</webidl>
19115 <Interface name="ContactManager" id="::Contact::ContactManager">
19116 <webidl> [NoInterfaceObject] interface ContactManager {
19118 void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19119 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19121 <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);
19123 <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);
19125 <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);
19127 <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19129 void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);
19131 void updateBatch(<ref>Person</ref>[] persons,
19132 optional <ref>SuccessCallback</ref>? successCallback,
19133 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19135 void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
19137 void removeBatch(<ref>PersonId</ref>[] personIds,
19138 optional <ref>SuccessCallback</ref>? successCallback,
19139 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
19141 void find(<ref>PersonArraySuccessCallback</ref> successCallback,
19142 optional <ref>ErrorCallback</ref>? errorCallback,
19143 optional <ref>AbstractFilter</ref>? filter,
19144 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
19146 long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
19148 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
19152 This interface provides access to the API functionality.
19156 This interface offers a method to retrieve the address books objects.
19157 The address book objects can be manipulated with the provided functionalities to add, remove, and update the contained information.
19164 <ExtendedAttributeList>
19165 <ExtendedAttribute name="NoInterfaceObject">
19166 <webidl>NoInterfaceObject</webidl>
19167 </ExtendedAttribute>
19168 </ExtendedAttributeList>
19169 <Operation name="getAddressBooks" id="::Contact::ContactManager::getAddressBooks">
19170 <webidl> void getAddressBooks(<ref>AddressBookArraySuccessCallback</ref> successCallback,
19171 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19174 Gets the available address books.
19178 If the operation completes successfully, the successCallback must
19179 be invoked with the phone address book and the SIM address book (if any).
19180 Other address books present in the device should also be returned.
19183 If no address book is present, the <em>successCallback</em> will be invoked with an empty array.
19186 The errorCallback is launched with these error types:
19190 InvalidValuesError - If the event given in argument is not a recurring event. </li>
19192 UnknownError - If any other error occurs while trying to get the address books. </li>
19202 http://tizen.org/privilege/contact.read
19204 <Code> var addressbook;
19206 // Define the error callback for all the asynchronous calls
19207 function errorCB(err) {
19208 console.log( 'The following error occurred: ' + err.name);
19211 function contactsFoundCB(contacts) {
19212 // The contact has been successfully found
19213 // Let's try to change the first name
19214 contacts[0].name.firstName = 'Jeffrey Ross';
19216 addressbook.update(contacts[0]);
19218 console.log( 'The following error occurred while updating: ' + err.name);
19220 console.log('First contact was updated');
19223 // Define the success callback for retrieving all the
19225 function addressBooksCB(addressbooks) {
19226 if(addressbooks.length > 0) {
19227 addressbook = addressbooks[0];
19228 console.log('The addressbook type is ' + addressbook.type +
19229 ' and name ' + addressbook.name);
19231 var contact = new tizen.Contact(
19232 {name: new tizen.ContactName({firstName:'Jeffrey',
19234 nicknames:['joey ramone']}),
19235 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19236 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19238 addressbook.add(contact);
19240 // The contact has been successfully added
19241 // Checks whether the added contact can be retrieved from the address book or not.
19242 // If the address book is empty, only the item added through saveContact
19243 // should be returned
19244 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Jeffrey');
19246 addressbook.find(contactsFoundCB, errorCB, filter);
19248 console.log( 'The following error occurred while finding: ' + err.name);
19253 // Get a list of available address books.
19254 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
19257 <Type type="void"/>
19259 <Argument name="successCallback">
19262 The method to call when the invocation ends successfully.
19265 <Type name="AddressBookArraySuccessCallback"/>
19267 <Argument optional="optional" name="errorCallback">
19270 The method to call when an error occurs.
19273 <Type name="ErrorCallback" nullable="nullable"/>
19277 <RaiseException name="WebAPIException">
19280 with error type TypeMismatchError, if any input parameter
19281 is not compatible with the expected type for that parameter.
19284 with error type SecurityError, if the application does not have the privilege to call this method.
19287 with error type NotSupportedError, if the feature
19294 <Operation name="getUnifiedAddressBook" id="::Contact::ContactManager::getUnifiedAddressBook">
19295 <webidl> <ref>AddressBook</ref> getUnifiedAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19298 Gets the aggregation of all address books.
19302 The unified address book is a logical address book that represents an aggregation of all address books
19303 that are obtained by getAddressBooks() and contains all contacts in the address books.
19304 Note that the unified address book does not have an address book ID
19305 and it is set to <var>null</var>.
19315 http://tizen.org/privilege/contact.read
19317 <Code> var addressbook;
19319 // Define the error callback
19320 function errorCB(err) {
19321 console.log( 'The following error occurred: ' + err.name);
19324 function contactsFoundCB(contacts) {
19325 // The contact has been successfully found
19326 // Let's try to change the first name
19327 contacts[0].name.firstName = 'Jeffrey Ross';
19329 addressbook.update(contacts[0]);
19330 console.log('First contact was updated');
19332 console.log( 'The following error occurred while updating: ' + err.name);
19336 // Get unified address book.
19337 addressbook = tizen.contact.getUnifiedAddressBook();
19339 // Add a new contact
19340 var contact = new tizen.Contact(
19341 {name: new tizen.ContactName({firstName:'Jeffrey',
19343 nicknames:['joey ramone']}),
19344 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19345 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19348 addressbook.add(contact);
19350 console.log( 'The following error occurred while adding: ' + err.name);
19353 // The contact has been successfully added
19354 // Let's try to check if we can retrieve the added
19355 // contact from the address book. If the address book
19356 // was empty only the item added through saveContact should
19358 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19360 addressbook.find(contactsFoundCB, errorCB, filter);
19362 console.log( 'The following error occurred while finding: ' + err.name);
19366 <Type name="AddressBook">
19369 AddressBook The unified AddressBook object.
19375 <RaiseException name="WebAPIException">
19378 with error type SecurityError, if the application does not have the privilege to call this method.
19381 with error type NotSupportedError, if the feature
19385 with error type UnknownError in any other error case.
19391 <Operation name="getDefaultAddressBook" id="::Contact::ContactManager::getDefaultAddressBook">
19392 <webidl> <ref>AddressBook</ref> getDefaultAddressBook() raises(<ref>WebAPIException</ref>);</webidl>
19395 Gets the default address book.
19399 The default address book is the appointed addressbook from platform or operator.
19400 This is one of addressBooks and it has the address book ID.
19403 If the operation completes successfully, it must return the
19404 default address book.
19414 http://tizen.org/privilege/contact.read
19416 <Code> var addressbook;
19418 // Define the error callback
19419 function errorCB(err) {
19420 console.log( 'The following error occurred: ' + err.name);
19423 function contactsFoundCB(contacts) {
19424 // The contact has been successfully found
19425 // Let's try to change the first name
19426 contacts[0].name.firstName = 'Jeffrey Ross';
19428 addressbook.update(contacts[0]);
19429 console.log('First contact was updated');
19431 console.log( 'The following error occurred while updating: ' + err.name);
19435 // Get default address book.
19436 addressbook = tizen.contact.getDefaultAddressBook();
19438 // Add a new contact
19439 var contact = new tizen.Contact(
19440 {name: new tizen.ContactName({firstName:'Jeffrey',
19442 nicknames:['joey ramone']}),
19443 emails:[new tizen.ContactEmailAddress('user@domain.com')],
19444 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
19447 addressbook.add(contact);
19449 console.log( 'The following error occurred while adding: ' + err.name);
19452 // The contact has been successfully added
19453 // Checks whether the added contact can be retrieved from the address book or not.
19454 // If the address book is empty, only the item added
19455 // through em>saveContact /em>should be returned
19456 var filter = new tizen.AttributeFiilter('name.firstName', 'CONTAINS', 'Jeffrey');
19458 addressbook.find(contactsFoundCB, errorCB, filter);
19460 console.log( 'The following error occurred while finding: ' + err.name);
19464 <Type name="AddressBook">
19467 AddressBook The default AddressBook object.
19473 <RaiseException name="WebAPIException">
19476 with error type SecurityError, if the application does not have the privilege to call this method.
19479 with error type NotSupportedError, if the feature
19483 with error type UnknownError in any other error case.
19489 <Operation name="getAddressBook" id="::Contact::ContactManager::getAddressBook">
19490 <webidl> <ref>AddressBook</ref> getAddressBook(<ref>AddressBookId</ref> addressBookId) raises(<ref>WebAPIException</ref>);</webidl>
19493 Gets the address book with the specified identifier.
19497 If the operation completes successfully, it must return the
19498 address book with the specified identifier.
19508 http://tizen.org/privilege/contact.read
19510 <Code> var contactRef; // ContactRef supposed to be initialized
19512 // Retrieves the Contact corresponding to a given ContactRef.
19513 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19514 var contact = addressBook.get(contactRef.contactId);
19515 console.log("Successfully resolved contact with id: " + contactRef.contactId);
19517 console.log("Error: " + err.name);
19521 <Type name="AddressBook">
19524 AddressBook The matching AddressBook object.
19529 <Argument name="addressBookId">
19532 The address book identifier.
19535 <Type name="AddressBookId"/>
19539 <RaiseException name="WebAPIException">
19542 with error type NotFoundError, if there is no address book
19543 with the given identifier.
19546 with error type TypeMismatchError, if any input parameter
19547 is not compatible with the expected type for that parameter.
19550 with error type InvalidValuesError, if any of the input
19551 parameters contain an invalid value.
19554 with error type SecurityError, if the application does not have the privilege to call this method.
19557 with error type NotSupportedError, if the feature
19561 with error type UnknownError in any other error case.
19567 <Operation name="get" id="::Contact::ContactManager::get">
19568 <webidl> <ref>Person</ref> get(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19571 Gets the person with the specified identifier.
19575 If the operation completes successfully, it must return the
19576 person with the specified identifier.
19586 http://tizen.org/privilege/contact.read
19588 <Code> var contactRef; // ContactRef supposed to be initialized
19590 // Retrieves the Person corresponding to a Contact.
19591 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
19592 var contact = addressBook.get(contactRef.contactId);
19593 var person = tizen.contact.get(contact.personId);
19594 console.log("Successfully resolved person with id: " + contact.personId);
19596 console.log("Error: " + err.name);
19600 <Type name="Person">
19603 Person The matching Person object.
19608 <Argument name="personId">
19611 The Person identifier.
19614 <Type name="PersonId"/>
19618 <RaiseException name="WebAPIException">
19621 with error type NotFoundError, if there is no person
19622 with the given identifier.
19625 with error type TypeMismatchError, if any input parameter
19626 is not compatible with the expected type for that parameter.
19629 with error type InvalidValuesError, if any of the input
19630 parameters contain an invalid value.
19633 with error type SecurityError, if the application does not have the privilege to call this method.
19636 with error type NotSupportedError, if the feature
19640 with error type UnknownError in any other error case.
19646 <Operation name="update" id="::Contact::ContactManager::update">
19647 <webidl> void update(<ref>Person</ref> person) raises(<ref>WebAPIException</ref>);</webidl>
19650 Updates a person in the address book synchronously.
19659 http://tizen.org/privilege/contact.write
19661 <Code> // Define the error callback
19662 function errorCB(err) {
19663 console.log( 'The following error occurred: ' + err.name);
19666 function personsFoundCB(persons) {
19667 // The person has been successfully found
19668 // Let's try to change the isFavorite attribute
19669 persons[0].isFavorite = true;
19671 tizen.contact.update(persons[0]);
19672 console.log('First person was updated');
19674 console.log( 'The following error occurred while updating: ' + err.name);
19679 tizen.contact.find(personsFoundCB, errorCB);
19681 console.log( 'The following error occurred while finding: ' + err.name);
19685 <Type type="void"/>
19687 <Argument name="person">
19690 The person object to be updated.
19693 <Type name="Person"/>
19697 <RaiseException name="WebAPIException">
19700 with error type NotFoundError, if the identifier does not match.
19703 with error type TypeMismatchError, if any input parameter
19704 is not compatible with the expected type for that parameter.
19707 with error type InvalidValuesError, if any input parameter
19708 contains invalid values.
19711 with error type SecurityError, if the application does not have the privilege to call this method.
19714 with error type NotSupportedError, if the feature
19718 with error type UnknownError, if the person could not be updated
19719 to an unknown error.
19725 <Operation name="updateBatch" id="::Contact::ContactManager::updateBatch">
19726 <webidl> void updateBatch(<ref>Person</ref>[] persons,
19727 optional <ref>SuccessCallback</ref>? successCallback,
19728 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19731 Updates several existing persons in the contact DB asynchronously.
19735 The <em>errorCallback()</em> is launched with these error types:
19739 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>
19741 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19743 UnknownError - If any other error occurs, while trying to add the persons. </li>
19746 If the details of any persons cannot be updated, the error callback function that was passed in the invocation will be called.
19756 http://tizen.org/privilege/contact.write
19758 <Code> // Define the error callback for all the asynchronous calls
19759 function errorCB(err) {
19760 console.log('The following error occurred: ' + err.name);
19763 function personsUpdatedCB() {
19764 console.log('Contacts were updated');
19767 function personsFoundCB(persons) {
19768 // The person has been successfully found
19769 for(var i = 0; i < persons.length; i++) {
19770 persons[i].isFavorite = true;
19773 tizen.contact.updateBatch(persons, personsUpdatedCB, errorCB);
19775 console.log('The following error occurred while updating: ' + err.name);
19780 tizen.contact.find(personsFoundCB, errorCB);
19782 console.log('The following error occurred while finding: ' + err.name);
19786 <Type type="void"/>
19788 <Argument name="persons">
19791 A list of Person objects to be saved in the terminal storage.
19794 <Type type="array">
19795 <Type name="Person"/>
19798 <Argument optional="optional" name="successCallback">
19801 The method to call when the invocation ends successfully.
19804 <Type name="SuccessCallback" nullable="nullable"/>
19806 <Argument optional="optional" name="errorCallback">
19809 The method to call when the request to update the details of a person fail.
19812 <Type name="ErrorCallback" nullable="nullable"/>
19816 <RaiseException name="WebAPIException">
19819 with error type TypeMismatchError, if the input parameter
19820 is not compatible with the expected type for that parameter.
19823 with error type SecurityError, if the application does not have the privilege to call this method.
19826 with error type NotSupportedError, if this feature is not supported.
19832 <Operation name="remove" id="::Contact::ContactManager::remove">
19833 <webidl> void remove(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
19836 Removes a person from the contact DB synchronously.
19840 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.
19850 http://tizen.org/privilege/contact.write
19852 <Code> // Define the error callback
19853 function errorCB(err) {
19854 console.log('The following error occurred: ' + err.name);
19857 function personsFoundCB(persons) {
19858 // The person has been successfully found
19859 if(persons.length > 0) {
19861 tizen.contact.remove(persons[0].id);
19862 console.log('First person was removed');
19864 console.log('The following error occurred while removing: ' + err.name);
19867 console.log( 'No persons.');
19872 tizen.contact.find(personsFoundCB, errorCB);
19874 console.log( 'The following error occurred while finding: ' + err.name);
19878 <Type type="void"/>
19880 <Argument name="personId">
19883 An identifier (ID attribute) of the Person object to delete.
19886 <Type name="PersonId"/>
19890 <RaiseException name="WebAPIException">
19893 with error type NotFoundError, if the identifier does not match
19897 with error type TypeMismatchError, if any input parameter
19898 is not compatible with the expected type for that parameter.
19901 with error type InvalidValuesError, if any input parameter
19902 contains invalid values.
19905 with error type SecurityError, if the application does not have the privilege to call this method.
19908 with error type NotSupportedError, if the feature
19912 with error type UnknownError, if the person could not be removed
19913 to an unknown error.
19919 <Operation name="removeBatch" id="::Contact::ContactManager::removeBatch">
19920 <webidl> void removeBatch(<ref>PersonId</ref>[] personIds,
19921 optional <ref>SuccessCallback</ref>? successCallback,
19922 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
19925 Removes persons from contact DB asynchronously.
19929 Removes the persons that correspond to the specified identifiers as well as the contacts related to them.
19932 The <em>errorCallback() </em>is launched with these error types:
19936 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>
19938 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
19940 UnknownError - If any other error occurs while trying to remove the persons. </li>
19950 http://tizen.org/privilege/contact.write
19952 <Code> // Define the error callback
19953 function errorCB(err) {
19954 console.log( 'The following error occurred: ' + err.name);
19957 function personsRemovedCB() {
19958 console.log('Contacts were removed');
19961 function personsFoundCB(persons) {
19962 // The person has been successfully found
19963 if(persons.length > 2) {
19965 tizen.contact.removeBatch([persons[0].id, persons[1].id], personsRemovedCB, errorCB);
19967 console.log( 'The following error occurred while removing: ' + err.name);
19970 console.log( 'Not enough persons.');
19975 tizen.contact.find(personsFoundCB, errorCB);
19977 console.log( 'The following error occurred while finding: ' + err.name);
19981 <Type type="void"/>
19983 <Argument name="personIds">
19986 A list of identifiers (id attribute) for the Person objects to delete.
19989 <Type type="array">
19990 <Type name="PersonId"/>
19993 <Argument optional="optional" name="successCallback">
19996 The method to call when the invocation ends successfully.
19999 <Type name="SuccessCallback" nullable="nullable"/>
20001 <Argument optional="optional" name="errorCallback">
20004 The method to call when the request to delete persons fails.
20007 <Type name="ErrorCallback" nullable="nullable"/>
20011 <RaiseException name="WebAPIException">
20014 with error type TypeMismatchError, if any input parameter
20015 is not compatible with the expected type for that parameter.
20018 with error type SecurityError, if the application does not have the privilege to call this method.
20021 with error type NotSupportedError, if the feature
20028 <Operation name="find" id="::Contact::ContactManager::find">
20029 <webidl> void find(<ref>PersonArraySuccessCallback</ref> successCallback,
20030 optional <ref>ErrorCallback</ref>? errorCallback,
20031 optional <ref>AbstractFilter</ref>? filter,
20032 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
20035 Gets an array of all <em>Person </em>objects from the contact DB or the ones that match the optionally supplied filter.
20039 If the filter is passed and contains valid values, only those values in the
20040 address book that match the filter criteria as specified in the AbstractFilter
20041 interface will be returned in the successCallback. If no filter is passed, the filter
20042 contains any invalid values, the filter is <var>null </var> or undefined, then
20043 the implementation must return the full list of contact items
20044 in the successCallback. If no persons are available in the contact DB or no
20045 person matches the filter criteria, the successCallback will be invoked
20046 with an empty array.
20049 The <em>errorCallback() </em>is launched with these error types:
20053 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20055 UnknownError - If any other error occurs while trying to retrieve the persons. </li>
20065 http://tizen.org/privilege/contact.read
20067 <Code> // Define the error callback.
20068 function errorCB(err) {
20069 console.log( 'The following error occurred: ' + err.name);
20072 // Define the person search success callback.
20073 function personsFoundCB(persons) {
20074 console.log(persons.length + ' results found.');
20077 // Finds all the persons in the contact DB that have the word Ramone in their display name
20078 var filter = new tizen.AttributeFilter('displayName', 'CONTAINS', 'Ramone');
20080 // The persons returned by the find() query will be sorted in the ascending order of their display name.
20081 var sortingMode = new tizen.SortMode('displayName', 'ASC');
20083 tizen.contact.find(personsFoundCB, errorCB,
20084 filter, sortingMode);
20086 console.log( 'The following error occurred while finding: ' + err.name);
20090 <Type type="void"/>
20092 <Argument name="successCallback">
20095 The method to call when the invocation ends successfully.
20098 <Type name="PersonArraySuccessCallback"/>
20100 <Argument optional="optional" name="errorCallback">
20103 The method to call when an error occurs.
20106 <Type name="ErrorCallback" nullable="nullable"/>
20108 <Argument optional="optional" name="filter">
20111 A filter to select which persons are returned.
20114 <Type name="AbstractFilter" nullable="nullable"/>
20116 <Argument optional="optional" name="sortMode">
20119 A variable to determine the sort order in which the persons are returned.
20122 <Type name="SortMode" nullable="nullable"/>
20126 <RaiseException name="WebAPIException">
20129 with error type TypeMismatchError, if any input parameter
20130 is not compatible with the expected type for that parameter.
20133 with error type SecurityError, if the application does not have the privilege to call this method.
20136 with error type NotSupportedError, if the feature
20143 <Operation name="addChangeListener" id="::Contact::ContactManager::addChangeListener">
20144 <webidl> long addChangeListener(<ref>PersonsChangeCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
20147 Subscribes to receive notifications about persons' changes.
20151 When executed, the implementation must immediately return a subscription identifier that identifies
20152 the watch operation. After returning the identifier, the watch operation is started
20163 http://tizen.org/privilege/contact.read
20165 <Code> var watcherId = 0; // watcher identifier
20168 onpersonsadded: function(persons) {
20169 console.log(persons.length + ' persons were added');
20171 onpersonsupdated: function(persons) {
20172 console.log(persons.length + ' persons were updated');
20174 onpersonsremoved: function(ids) {
20175 console.log(ids.length + ' persons were deleted');
20179 // registers to be notified when the persons' changes
20180 watcherId = tizen.contact.addChangeListener(watcher);
20186 long Identifier used to clear the watch subscription.
20191 <Argument name="successCallback">
20194 Contains the methods for different types of change notifications.
20197 <Type name="PersonsChangeCallback"/>
20201 <RaiseException name="WebAPIException">
20204 with error type TypeMismatchError, if any input parameter
20205 is not compatible with the expected type for that parameter.
20208 with error type InvalidValuesError, if any of the input parameters
20209 contain an invalid value.
20212 with error type SecurityError, if the application does not have the privilege to call this method.
20215 with error type NotSupportedError, if the feature
20219 with error type UnknownError in any other case.
20225 <Operation name="removeChangeListener" id="::Contact::ContactManager::removeChangeListener">
20226 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
20229 Unsubscribes a persons' changes watch operation.
20233 If the watchId argument is valid and corresponds to a subscription already in
20234 place, the watch process must immediately stop and no further callbacks MUST be
20235 invoked. If the watchId argument is not valid or does not correspond to a
20236 valid subscription, the method should return without any further action.
20246 http://tizen.org/privilege/contact.read
20248 <Code> var watcherId = 0; // watcher identifier
20250 // Receives persons' changes
20252 onpersonsadded: function(persons) {
20253 console.log(persons.length + ' persons were added');
20255 onpersonsupdated: function(persons) {
20256 console.log(persons.length + ' persons were updated');
20258 onpersonsremoved: function(ids) {
20259 console.log(ids.length + ' persons were removed');
20263 // Cancel the watch operation
20264 function cancelWatch() {
20265 tizen.contact.removeChangeListener(watcherId);
20268 // registers to be notified when the persons' changes
20269 watcherId = tizen.contact.addChangeListener(watcher);
20272 <Type type="void"/>
20274 <Argument name="watchId">
20277 A subscription Identifier.
20280 <Type type="long"/>
20284 <RaiseException name="WebAPIException">
20287 with error type TypeMismatchError, if any input parameter
20288 is not compatible with the expected type for that parameter.
20291 with error type InvalidValuesError, if any of the input
20292 parameters contain an invalid value.
20295 with error type NotFoundError, if there is no listener
20296 with the given identifier.
20299 with error type SecurityError, if the application does not have the privilege to call this method.
20302 with error type NotSupportedError, if the feature
20306 with error type UnknownError in any other error case.
20313 <Interface name="AddressBook" id="::Contact::AddressBook">
20314 <webidl> [NoInterfaceObject] interface AddressBook {
20316 readonly attribute <ref>AddressBookId</ref>? id;
20318 readonly attribute DOMString name;
20320 readonly attribute boolean readOnly;
20322 <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20324 void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20326 void addBatch(<ref>Contact</ref>[] contacts,
20327 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20328 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20330 void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);
20332 void updateBatch(<ref>Contact</ref>[] contacts,
20333 optional <ref>SuccessCallback</ref>? successCallback,
20334 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20336 void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);
20338 void removeBatch(<ref>ContactId</ref>[] ids,
20339 optional <ref>SuccessCallback</ref>? successCallback,
20340 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20342 void find(<ref>ContactArraySuccessCallback</ref> successCallback,
20343 optional <ref>ErrorCallback</ref>? errorCallback,
20344 optional <ref>AbstractFilter</ref>? filter,
20345 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);
20347 long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
20348 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
20350 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
20352 <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20354 void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20356 void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);
20358 void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);
20360 <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);
20364 This interface provides methods to manage an address book.
20368 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:
20372 <em>get()</em> - To get contacts that have a specific ID </li>
20374 <em>find()</em> - To find contacts using filters </li>
20376 <em>add() </em>or <em>addBatch()</em> - To add contacts to a specific address book </li>
20378 <em>update() </em>or <em>updateBatch()</em> - To update contacts in a specific address book </li>
20380 <em>remove() </em>or <em>removeBatch() </em> - To remove existing contacts </li>
20382 <em>addChangeListener() </em>or <em>removeChangeListener() </em> - To watch for address book changes </li>
20385 This interface also offers methods to manipulate groups within the address book, such as:
20389 <em>getGroup()</em> - To get a group having specific ID </li>
20391 <em>getGroups()</em> - To get groups in a specific address book </li>
20393 <em>addGroup() </em> - To add groups to a specific address book </li>
20395 <em>updateGroup() </em> - To update groups in a specific address book </li>
20397 <em>removeGroup() </em> - To remove existing groups </li>
20404 <ExtendedAttributeList>
20405 <ExtendedAttribute name="NoInterfaceObject">
20406 <webidl>NoInterfaceObject</webidl>
20407 </ExtendedAttribute>
20408 </ExtendedAttributeList>
20409 <Attribute readonly="readonly" name="id" id="::Contact::AddressBook::id">
20410 <webidl> readonly attribute <ref>AddressBookId</ref>? id;</webidl>
20413 An attribute to uniquely identify the address book.
20417 The value of this attribute shall be <var>null </var> if the address book
20418 is the unified address book.
20425 <Type name="AddressBookId" nullable="nullable"/>
20427 <Attribute readonly="readonly" name="name" id="::Contact::AddressBook::name">
20428 <webidl> readonly attribute DOMString name;</webidl>
20431 The address book descriptive name.
20437 <Type type="DOMString"/>
20439 <Attribute readonly="readonly" name="readOnly" id="::Contact::AddressBook::readOnly">
20440 <webidl> readonly attribute boolean readOnly;</webidl>
20443 An attribute to indicate if the address book is read-only.
20447 Some on line address books cannot be edited and will have this
20448 flag set to <var>true</var>.
20455 <Type type="boolean"/>
20457 <Operation name="get" id="::Contact::AddressBook::get">
20458 <webidl> <ref>Contact</ref> get(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20461 Gets the contact with the specified identifier.
20465 If the operation completes successfully, it must return the
20466 contact with the specified identifier.
20476 http://tizen.org/privilege/contact.read
20478 <Code> var contactRef; // ContactRef supposed to be initialized
20480 // Retrieves the Contact corresponding to a given ContactRef.
20481 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
20482 var contact = addressBook.get(contactRef.contactId);
20483 console.log("Successfully resolved contact with id: " + contactRef.contactId);
20485 console.log("Error: " + err.name);
20489 <Type name="Contact">
20492 Contact The matching Contact object.
20497 <Argument name="id">
20500 A contact identifier.
20503 <Type name="ContactId"/>
20507 <RaiseException name="WebAPIException">
20510 with error type NotFoundError, if there is no contact
20511 with the given identifier.
20514 with error type TypeMismatchError, if any input parameter
20515 is not compatible with the expected type for that parameter.
20518 with error type InvalidValuesError, if any of the input
20519 parameters contain an invalid value.
20522 with error type SecurityError, if the application does not have the privilege to call this method.
20525 with error type NotSupportedError, if the feature
20529 with error type UnknownError in any other error case.
20535 <Operation name="add" id="::Contact::AddressBook::add">
20536 <webidl> void add(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20539 Adds a contact to the address book synchronously.
20543 If the contact is successfully inserted in the addressbook, the Contact object
20544 will have its identifier (id attribute) set when the function returns.
20545 This operation is done successfully, new person object is also generated automatically.
20548 If you wish to update an
20549 existing contact, call the update() method instead. If you wish to add a copy
20550 of an existing Contact object, call Contact.clone() method first and pass the
20551 clone to the add() method.
20554 The contact shall be added to default address book if the address book
20555 is the unified address book.
20565 http://tizen.org/privilege/contact.write
20567 <Code> var addressbook;
20569 // Get default address book
20570 addressbook = tizen.contact.getDefaultAddressBook();
20573 var contact = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20575 nicknames:['joey ramone']}),
20576 emails:[new tizen.ContactEmailAddress('user@domain.com')],
20577 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20578 addressbook.add(contact);
20579 console.log('Contact added with id ' + contact.id);
20581 console.log( 'The following error occurred while adding: ' + err.name);
20585 <Type type="void"/>
20587 <Argument name="contact">
20590 A contact to be added.
20593 <Type name="Contact"/>
20597 <RaiseException name="WebAPIException">
20600 with error type TypeMismatchError, if any input parameter
20601 is not compatible with the expected type for that parameter.
20604 with error type InvalidValuesError, if any input parameter
20605 contains invalid values.
20608 with error type SecurityError, if the application does not have the privilege to call this method.
20611 with error type NotSupportedError, if the feature
20615 with error type UnknownError, if any other error occurs while trying to insert the contact.
20621 <Operation name="addBatch" id="::Contact::AddressBook::addBatch">
20622 <webidl> void addBatch(<ref>Contact</ref>[] contacts,
20623 optional <ref>ContactArraySuccessCallback</ref>? successCallback,
20624 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20627 Adds several contacts to the address book asynchronously.
20631 If all the contacts are successfully added to the address book,
20632 the success callback will be invoked, passing the list of Contact objects
20633 that were added, with their identifier set (id attribute).
20636 The <em>errorCallback()</em> is launched with these error types:
20640 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>
20642 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20645 If you wish to update an
20646 existing contact, call the update() method instead. If you wish to add a copy
20647 of an existing Contact object, call Contact.clone() method first and pass the
20648 clone to the add() method.
20651 If any of the contacts cannot be added, the error callback
20652 function that was passed in the invocation will be called.
20655 The contacts shall be added to local phone address book if the address book
20656 is the default address book.
20666 http://tizen.org/privilege/contact.write
20668 <Code> var addressbook;
20670 // Define the error callback
20671 function errorCB(err) {
20672 console.log( 'The following error occurred: ' + err.name);
20675 // Define the add contact success callback
20676 function contactsAddedCB(contacts) {
20677 console.log( contacts.length + ' contact(s) were successfully added to an Address Book' );
20680 // Get default address book
20681 addressbook = tizen.contact.getDefaultAddressBook();
20683 var c1 = new tizen.Contact({name: new tizen.ContactName({firstName:'Jeffrey',
20685 nicknames:['joey ramone']}),
20686 emails:[new tizen.ContactEmailAddress('user1@domain.com')],
20687 phoneNumbers:[new tizen.ContactPhoneNumber('123456789')]});
20689 var c2 = new tizen.Contact({name: new tizen.ContactName({firstName:'Elton',
20691 nicknames:['El']}),
20692 emails:[new tizen.ContactEmailAddress('user2@domain.com')],
20693 phoneNumbers:[new tizen.ContactPhoneNumber('987654321')]});
20696 addressbook.addBatch([c1, c2], contactsAddedCB, errorCB);
20698 console.log( 'The following error occurred while adding: ' + err.name);
20702 <Type type="void"/>
20704 <Argument name="contacts">
20707 A list of contacts to add.
20710 <Type type="array">
20711 <Type name="Contact"/>
20714 <Argument optional="optional" name="successCallback">
20717 The method to call when the invocation ends successfully.
20720 <Type name="ContactArraySuccessCallback" nullable="nullable"/>
20722 <Argument optional="optional" name="errorCallback">
20725 The method to call when the request fails.
20728 <Type name="ErrorCallback" nullable="nullable"/>
20732 <RaiseException name="WebAPIException">
20735 with error type TypeMismatchError, if the input parameter
20736 is not compatible with the expected type for that parameter.
20739 with error type SecurityError, if the application does not have the privilege to call this method.
20742 with error type NotSupportedError, if this feature is not supported.
20748 <Operation name="update" id="::Contact::AddressBook::update">
20749 <webidl> void update(<ref>Contact</ref> contact) raises(<ref>WebAPIException</ref>);</webidl>
20752 Updates a contact in the address book synchronously.
20761 http://tizen.org/privilege/contact.write
20763 <Code> var addressbook;
20765 // Define the error callback
20766 function errorCB(err) {
20767 console.log( 'The following error occurred: ' + err.name);
20770 function contactsFoundCB(contacts) {
20771 // The contact has been successfully found
20772 // Let's try to change the first name
20773 contacts[0].name.firstName = 'Christopher';
20775 addressbook.update(contacts[0]);
20776 console.log('First contact was updated');
20778 console.log( 'The following error occurred while updating: ' + err.name);
20782 // Get default address book.
20783 addressbook = tizen.contact.getDefaultAddressBook();
20785 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20787 addressbook.find(contactsFoundCB, errorCB, filter);
20789 console.log( 'The following error occurred while finding: ' + err.name);
20793 <Type type="void"/>
20795 <Argument name="contact">
20798 A contact object to update.
20801 <Type name="Contact"/>
20805 <RaiseException name="WebAPIException">
20808 with error type NotFoundError, if the identifier does not match.
20811 with error type TypeMismatchError, if any input parameter
20812 is not compatible with the expected type for that parameter.
20815 with error type InvalidValuesError, if any input parameter
20816 contains invalid values.
20819 with error type SecurityError, if the application does not have the privilege to call this method.
20822 with error type NotSupportedError, if the feature
20826 with error type UnknownError, if the contact could not be updated
20827 to an unknown error.
20833 <Operation name="updateBatch" id="::Contact::AddressBook::updateBatch">
20834 <webidl> void updateBatch(<ref>Contact</ref>[] contacts,
20835 optional <ref>SuccessCallback</ref>? successCallback,
20836 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
20839 Updates several existing contacts in the address book asynchronously.
20843 The <em>errorCallback()</em> is launched with these error types:
20847 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>
20849 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
20851 UnknownError - If any other error occurs, while trying to add the contacts. </li>
20854 If any of the contacts could not be updated, the error callback
20855 function that was passed in the invocation will be called.
20865 http://tizen.org/privilege/contact.write
20867 <Code> var addressbook;
20869 // Define the error callback for all the asynchronous calls
20870 function errorCB(err) {
20871 console.log('The following error occurred: ' + err.name);
20874 function contactsUpdatedCB() {
20875 console.log('Contacts were updated');
20878 function contactsFoundCB(contacts) {
20879 // The contact has been successfully found
20880 for(var i = 0; i < contacts.length; i++) {
20881 contacts[i].name.firstName = 'Christopher';
20884 addressbook.updateBatch(contacts, contactsUpdatedCB, errorCB);
20886 console.log('The following error occurred while updating: ' + err.name);
20890 // Get default address book.
20891 addressbook = tizen.contact.getDefaultAddressBook();
20893 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20895 addressbook.find(contactsFoundCB, errorCB, filter);
20897 console.log('The following error occurred while finding: ' + err.name);
20901 <Type type="void"/>
20903 <Argument name="contacts">
20906 A list of contact objects to be saved in the terminal storage.
20909 <Type type="array">
20910 <Type name="Contact"/>
20913 <Argument optional="optional" name="successCallback">
20916 The method to call when the invocation ends successfully.
20919 <Type name="SuccessCallback" nullable="nullable"/>
20921 <Argument optional="optional" name="errorCallback">
20924 The method to call when the request to update contacts fails.
20927 <Type name="ErrorCallback" nullable="nullable"/>
20931 <RaiseException name="WebAPIException">
20934 with error type TypeMismatchError, if the input parameter
20935 is not compatible with the expected type for that parameter.
20938 with error type SecurityError, if the application does not have the privilege to call this method.
20941 with error type NotSupportedError, if this feature is not supported.
20947 <Operation name="remove" id="::Contact::AddressBook::remove">
20948 <webidl> void remove(<ref>ContactId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
20951 Removes a contact from the address book synchronously.
20955 Removes the contact in the address book that corresponds to the specified
20956 identifier. This function will throw an exception if it failed to
20957 remove the specified contact.
20967 http://tizen.org/privilege/contact.write
20969 <Code> var addressbook;
20971 // Define the error callback
20972 function errorCB(err) {
20973 console.log('The following error occurred: ' + err.name);
20976 function contactsFoundCB(contacts) {
20977 // The contact has been successfully found
20978 if(contacts.length > 0) {
20980 addressbook.remove(contacts[0].id);
20981 console.log('First contact was removed');
20983 console.log('The following error occurred while removing: ' + err.name);
20986 console.log( 'No contacts.');
20990 // Get default address book.
20991 addressbook = tizen.contact.getDefaultAddressBook();
20993 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
20995 addressbook.find(contactsFoundCB, errorCB, filter);
20997 console.log( 'The following error occurred while finding: ' + err.name);
21001 <Type type="void"/>
21003 <Argument name="id">
21006 An identifier (id attribute) of the contact object to delete.
21009 <Type name="ContactId"/>
21013 <RaiseException name="WebAPIException">
21016 with error type NotFoundError, if the identifier does not match
21017 any contact in the address book.
21020 with error type TypeMismatchError, if any input parameter
21021 is not compatible with the expected type for that parameter.
21024 with error type InvalidValuesError, if any input parameter
21025 contains invalid values.
21028 with error type SecurityError, if the application does not have the privilege to call this method.
21031 with error type NotSupportedError, if the feature
21035 with error type UnknownError, if the contact could not be removed
21036 to an unknown error.
21042 <Operation name="removeBatch" id="::Contact::AddressBook::removeBatch">
21043 <webidl> void removeBatch(<ref>ContactId</ref>[] ids,
21044 optional <ref>SuccessCallback</ref>? successCallback,
21045 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21048 Removes several contacts from the address book asynchronously.
21052 The <em>errorCallback()</em> is launched with these error types:
21056 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>
21058 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21060 UnknownError - If any other error occurs while trying to remove the contacts. </li>
21070 http://tizen.org/privilege/contact.write
21072 <Code> var addressbook;
21074 // Define the error callback
21075 function errorCB(err) {
21076 console.log( 'The following error occurred: ' + err.name);
21079 function contactsRemovedCB() {
21080 console.log('Contacts were removed');
21083 function contactsFoundCB(contacts) {
21084 // The contact has been successfully found
21085 if(contacts.length > 2) {
21087 addressbook.removeBatch([contacts[0].id, contacts[1].id], contactsRemovedCB, errorCB);
21089 console.log( 'The following error occurred while removing: ' + err.name);
21092 console.log( 'Not enough contacts.');
21096 // Get default address book.
21097 addressbook = tizen.contact.getDefaultAddressBook();
21099 var filter = new tizen.AttributeFilter('name.firstName', 'CONTAINS', 'Chris');
21101 addressbook.find(contactsFoundCB, errorCB, filter);
21103 console.log( 'The following error occurred while finding: ' + err.name);
21107 <Type type="void"/>
21109 <Argument name="ids">
21112 A list of identifiers (id attribute) for the contact objects to be deleted.
21115 <Type type="array">
21116 <Type name="ContactId"/>
21119 <Argument optional="optional" name="successCallback">
21122 The method to call when the invocation ends successfully.
21125 <Type name="SuccessCallback" nullable="nullable"/>
21127 <Argument optional="optional" name="errorCallback">
21130 The method to call when the request to delete contacts fails.
21133 <Type name="ErrorCallback" nullable="nullable"/>
21137 <RaiseException name="WebAPIException">
21140 with error type TypeMismatchError, if any input parameter
21141 is not compatible with the expected type for that parameter.
21144 with error type SecurityError, if the application does not have the privilege to call this method.
21147 with error type NotSupportedError, if the feature
21154 <Operation name="find" id="::Contact::AddressBook::find">
21155 <webidl> void find(<ref>ContactArraySuccessCallback</ref> successCallback,
21156 optional <ref>ErrorCallback</ref>? errorCallback,
21157 optional <ref>AbstractFilter</ref>? filter,
21158 optional <ref>SortMode</ref>? sortMode) raises(<ref>WebAPIException</ref>);</webidl>
21161 Finds an array of all Contact objects from the specified address book or an array of
21162 Contact objects that match the optionally supplied filter.
21166 If the filter is passed and contains valid values, only those values in the
21167 address book that match the filter criteria as specified in the AbstractFilter
21168 interface will be returned in the successCallback. If no filter is passed, the filter
21169 contains any invalid values, the filter is <var>null</var> or undefined, then
21170 the implementation MUST return the full list of contact items
21171 in the successCallback. If no contacts are available in the address book or no
21172 contact matches the filter criteria, the successCallback will be invoked
21173 with an empty array.
21176 The <em>errorCallback() </em>is launched with these error types:
21180 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
21182 UnknownError - If any other error occurs while trying to retrieve the contacts. </li>
21192 http://tizen.org/privilege/contact.read
21194 <Code> var addressbook;
21196 // Define the error callback.
21197 function errorCB(err) {
21198 console.log( 'The following error occurred: ' + err.name);
21201 // Define the contact search success callback.
21202 function contactsFoundCB(contacts) {
21203 console.log(contacts.length + ' results found.');
21206 // Get default address book
21207 addressbook = tizen.contact.getDefaultAddressBook();
21209 // Find all contacts in the address book that have "Ramone" in the nick name.
21210 var filter = new tizen.AttributeFilter('name.nicknames', 'CONTAINS', 'Ramone');
21212 // The contacts returned by the find() query will be sorted by
21213 // ascending last name.
21214 var sortingMode = new tizen.SortMode('name.lastName', 'ASC');
21216 addressbook.find(contactsFoundCB, errorCB,
21217 filter, sortingModes);
21219 console.log( 'The following error occurred while finding: ' + err.name);
21223 <Type type="void"/>
21225 <Argument name="successCallback">
21228 The method to call when the invocation ends successfully.
21231 <Type name="ContactArraySuccessCallback"/>
21233 <Argument optional="optional" name="errorCallback">
21236 The method to call when an error occurs.
21239 <Type name="ErrorCallback" nullable="nullable"/>
21241 <Argument optional="optional" name="filter">
21244 A filter used to select which contacts are returned.
21247 <Type name="AbstractFilter" nullable="nullable"/>
21249 <Argument optional="optional" name="sortMode">
21252 A variable to determine the sort order in which the contacts are returned.
21255 <Type name="SortMode" nullable="nullable"/>
21259 <RaiseException name="WebAPIException">
21262 with error type TypeMismatchError, if any input parameter
21263 is not compatible with the expected type for that parameter.
21266 with error type SecurityError, if the application does not have the privilege to call this method.
21269 with error type NotSupportedError, if the feature
21276 <Operation name="addChangeListener" id="::Contact::AddressBook::addChangeListener">
21277 <webidl> long addChangeListener(<ref>AddressBookChangeCallback</ref> successCallback,
21278 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
21281 Subscribes to receive notifications about address book changes.
21285 When executed, the implementation must immediately return a subscription identifier that identifies
21286 the watch operation. After returning the identifier, the watch operation is started
21297 http://tizen.org/privilege/contact.read
21299 <Code> var watcherId = 0; // watcher identifier
21300 var addressbook; // This example assumes addressbook is initialized
21303 oncontactsadded: function(contacts) {
21304 console.log(contacts.length + ' contacts were added');
21306 oncontactsupdated: function(contacts) {
21307 console.log(contacts.length + ' contacts were updated');
21309 oncontactsremoved: function(ids) {
21310 console.log(ids.length + ' contacts were deleted');
21314 // Registers to be notified when the address book changes
21315 watcherId = addressbook.addChangeListener(watcher);
21321 long An identifier used to clear the watch subscription.
21326 <Argument name="successCallback">
21329 The method to call when different types of address book change notifications are received.
21332 <Type name="AddressBookChangeCallback"/>
21334 <Argument optional="optional" name="errorCallback">
21337 The method to call if address book changes cannot be watched.
21340 <Type name="ErrorCallback" nullable="nullable"/>
21344 <RaiseException name="WebAPIException">
21347 with error type TypeMismatchError, if any input parameter
21348 is not compatible with the expected type for that parameter.
21351 with error type InvalidValuesError, if any of the input parameters
21352 contain an invalid value.
21355 with error type SecurityError, if the application does not have the privilege to call this method.
21358 with error type NotSupportedError, if the feature
21362 with error type UnknownError in any other case.
21368 <Operation name="removeChangeListener" id="::Contact::AddressBook::removeChangeListener">
21369 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
21372 Unsubscribes an address book changes watch operation.
21376 If the watchId argument is valid and corresponds to a subscription already in
21377 place, the watch process MUST immediately stop and no further callbacks MUST be
21378 invoked. If the watchId argument is not valid or does not correspond to a
21379 valid subscription, the method should return without any further action.
21389 http://tizen.org/privilege/contact.read
21391 <Code> var watcherId = 0; // watcher identifier
21392 var addressbook; // This example assumes addressbook is initialized
21394 // Receives address book changes
21396 oncontactsadded: function(contacts) {
21397 console.log(contacts.length + ' contacts were added');
21399 oncontactsupdated: function(contacts) {
21400 console.log(contacts.length + ' contacts were updated');
21402 oncontactsremoved: function(ids) {
21403 console.log(ids.length + ' contacts were removed');
21407 // Cancel the watch operation
21408 function cancelWatch() {
21409 addressbook.removeChangeListener(watcherId);
21412 // registers to be notified when the address book changes
21413 watcherId = addressbook.addChangeListener(watcher);
21416 <Type type="void"/>
21418 <Argument name="watchId">
21421 A subscription identifier.
21424 <Type type="long"/>
21428 <RaiseException name="WebAPIException">
21431 with error type TypeMismatchError, if any input parameter
21432 is not compatible with the expected type for that parameter.
21435 with error type InvalidValuesError, if any of the input
21436 parameters contain an invalid value.
21439 with error type NotFoundError, if there is no listener
21440 with the given identifier.
21443 with error type SecurityError, if the application does not have the privilege to call this method.
21446 with error type NotSupportedError, if the feature
21450 with error type UnknownError in any other error case.
21456 <Operation name="getGroup" id="::Contact::AddressBook::getGroup">
21457 <webidl> <ref>ContactGroup</ref> getGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21460 Gets the group with the specified identifier.
21464 If the operation completes successfully, it must return the
21465 group with the given identifier.
21475 http://tizen.org/privilege/contact.read
21478 // Retrieves the Person corresponding to a Contact.
21479 var addressBook = tizen.contact.getAddressBook(contactRef.addressBookId);
21480 var contact = addressBook.get(contactRef.contactId);
21481 var group = addressBook.getGroup(contact.groupIds[0].id);
21482 console.log("Successfully resolved group with id: " + contact.groupIds[0].id);
21484 console.log("Error: " + err.name);
21488 <Type name="ContactGroup">
21491 ContactGroup The matching ContactGroup object.
21496 <Argument name="groupId">
21499 A group identifier.
21502 <Type name="ContactGroupId"/>
21506 <RaiseException name="WebAPIException">
21509 with error type NotFoundError, if there is no contact
21510 with the given identifier.
21513 with error type TypeMismatchError, if any input parameter
21514 is not compatible with the expected type for that parameter.
21517 with error type InvalidValuesError, if any of the input
21518 parameters contain an invalid value.
21521 with error type SecurityError, if the application does not have the privilege to call this method.
21524 with error type NotSupportedError, if the feature
21528 with error type UnknownError in any other error case.
21534 <Operation name="addGroup" id="::Contact::AddressBook::addGroup">
21535 <webidl> void addGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21538 Adds a group to the address book.
21542 If the group is successfully inserted in the addressbook, the Group object
21543 will have its identifier (id attribute) set when the function returns.
21546 The group shall be added to local phone address book if the address book
21547 is the default address book.
21557 http://tizen.org/privilege/contact.write
21559 <Code> var addressbook;
21561 // Get address book
21562 var addressbooks = tizen.contact.getAddressBooks();
21563 addressbook = addressbooks[0];
21566 var group = new tizen.ContactGroup('Company');
21567 addressbook.addGroup(group);
21568 console.log('Group added with id ' + group.id);
21570 console.log( 'The following error occurred while adding: ' + err.name);
21574 <Type type="void"/>
21576 <Argument name="group">
21579 A ContactGroup object to be added.
21582 <Type name="ContactGroup"/>
21586 <RaiseException name="WebAPIException">
21589 with error type TypeMismatchError, if any input parameter
21590 is not compatible with the expected type for that parameter.
21593 with error type InvalidValuesError, if any input parameter
21594 contains invalid values.
21597 with error type SecurityError, if the application does not have the privilege to call this method.
21600 with error type NotSupportedError, if the feature
21604 with error type UnknownError, if any other error occurs while trying to insert the contact.
21610 <Operation name="updateGroup" id="::Contact::AddressBook::updateGroup">
21611 <webidl> void updateGroup(<ref>ContactGroup</ref> group) raises(<ref>WebAPIException</ref>);</webidl>
21614 Updates a group in the address book.
21623 http://tizen.org/privilege/contact.write
21625 <Code> var addressbook;
21627 // Get address book.
21628 var addressbooks = tizen.contact.getAddressBooks();
21629 addressbook = addressbooks[0];
21632 groups = addressbook.getGroups();
21633 groups[0].name = 'Friends';
21634 addressbook.updateGroup(groups[0]);
21635 console.log('First group was updated');
21637 console.log( 'The following error occurred while adding: ' + err.name);
21641 <Type type="void"/>
21643 <Argument name="group">
21646 A ContactGroup object to be updated.
21649 <Type name="ContactGroup"/>
21653 <RaiseException name="WebAPIException">
21656 with error type TypeMismatchError, if any input parameter
21657 is not compatible with the expected type for that parameter.
21660 with error type InvalidValuesError, if any input parameter
21661 contains invalid values.
21664 with error type SecurityError, if the application does not have the privilege to call this method.
21667 with error type NotSupportedError, if the feature
21671 with error type UnknownError, if the group could not be updated
21672 to an unknown error.
21678 <Operation name="removeGroup" id="::Contact::AddressBook::removeGroup">
21679 <webidl> void removeGroup(<ref>ContactGroupId</ref> groupId) raises(<ref>WebAPIException</ref>);</webidl>
21682 Removes a group from the address book.
21686 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.
21696 http://tizen.org/privilege/contact.write
21698 <Code> var addressbook;
21700 // Get default address book.
21701 var addressbooks = tizen.contact.getAddressBooks();
21702 addressbook = addressbooks[0];
21705 groups = addressbook.getGroups();
21706 addressbook.removeGroup(groups[0].id);
21707 console.log('First group was removed');
21709 console.log( 'The following error occurred while finding: ' + err.name);
21713 <Type type="void"/>
21715 <Argument name="groupId">
21718 An identifier (id attribute) of the ContactGroup object to be deleted.
21721 <Type name="ContactGroupId"/>
21725 <RaiseException name="WebAPIException">
21728 with error type NotFoundError, if the identifier does not match
21729 any contact in the address book.
21732 with error type TypeMismatchError, if any input parameter
21733 is not compatible with the expected type for that parameter.
21736 with error type InvalidValuesError, if any input parameter
21737 contains invalid values.
21740 with error type SecurityError, if the application does not have the privilege to call this method.
21743 with error type NotSupportedError, if the feature
21747 with error type UnknownError, if the group could not be removed
21748 to an unknown error.
21754 <Operation name="getGroups" id="::Contact::AddressBook::getGroups">
21755 <webidl> <ref>ContactGroup</ref>[] getGroups() raises(<ref>WebAPIException</ref>);</webidl>
21758 Gets an array of all ContactGroup objects from the specified address book.
21767 http://tizen.org/privilege/contact.read
21769 <Code> var addressbook;
21771 // Get default address book.
21772 var addressbooks = tizen.contact.getAddressBooks();
21773 addressbook = addressbooks[0];
21776 groups = addressbook.getGroups();
21777 console.log('Number of groups is ' + groups.length);
21779 console.log( 'The following error occurred while finding: ' + err.name);
21783 <Type type="array">
21786 ContactGroup[] The array of ContactGroup object from this address book.
21789 <Type name="ContactGroup"/>
21793 <RaiseException name="WebAPIException">
21796 with error type NotFoundError, if the identifier does not match
21797 any contact in the address book.
21800 with error type TypeMismatchError, if any input parameter
21801 is not compatible with the expected type for that parameter.
21804 with error type InvalidValuesError, if any input parameter
21805 contains invalid values.
21808 with error type SecurityError, if the application does not have the privilege to call this method.
21811 with error type NotSupportedError, if the feature
21815 with error type UnknownError, if the group could not be retrieved due
21816 to an unknown error.
21823 <Interface name="Person" id="::Contact::Person">
21824 <webidl> [NoInterfaceObject] interface Person {
21825 readonly attribute <ref>PersonId</ref> id;
21827 readonly attribute DOMString displayName;
21829 readonly attribute long contactCount;
21831 readonly attribute boolean hasPhoneNumber;
21833 readonly attribute boolean hasEmail;
21835 attribute boolean isFavorite;
21837 attribute DOMString? photoURI;
21839 attribute DOMString? ringtoneURI;
21841 attribute <ref>ContactId</ref> displayContactId;
21843 void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);
21845 <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);
21855 <ExtendedAttributeList>
21856 <ExtendedAttribute name="NoInterfaceObject">
21857 <webidl>NoInterfaceObject</webidl>
21858 </ExtendedAttribute>
21859 </ExtendedAttributeList>
21860 <Attribute readonly="readonly" name="id" id="::Contact::Person::id">
21861 <webidl> readonly attribute <ref>PersonId</ref> id;</webidl>
21864 The identifier of the person.
21870 <Type name="PersonId"/>
21872 <Attribute readonly="readonly" name="displayName" id="::Contact::Person::displayName">
21873 <webidl> readonly attribute DOMString displayName;</webidl>
21876 An attribute to identify a person by storing the display name in a string.
21877 It is selected from the contacts' display names.
21883 <Type type="DOMString"/>
21885 <Attribute readonly="readonly" name="contactCount" id="::Contact::Person::contactCount">
21886 <webidl> readonly attribute long contactCount;</webidl>
21889 An attribute to count the number of the contacts that belong to a person.
21895 <Type type="long"/>
21897 <Attribute readonly="readonly" name="hasPhoneNumber" id="::Contact::Person::hasPhoneNumber">
21898 <webidl> readonly attribute boolean hasPhoneNumber;</webidl>
21901 An attribute to indicate if a person has a phone number.
21907 <Type type="boolean"/>
21909 <Attribute readonly="readonly" name="hasEmail" id="::Contact::Person::hasEmail">
21910 <webidl> readonly attribute boolean hasEmail;</webidl>
21913 An attribute to indicate if the person has an email addresses.
21919 <Type type="boolean"/>
21921 <Attribute name="isFavorite" id="::Contact::Person::isFavorite">
21922 <webidl> attribute boolean isFavorite;</webidl>
21925 An attribute to indicate whether the contact is a favorite or not.
21929 Indicates if the person was marked as <em>Favorite</em> or not.
21932 By default, this attribute is set to <var>false</var>.
21939 <Type type="boolean"/>
21941 <Attribute name="photoURI" id="::Contact::Person::photoURI">
21942 <webidl> attribute DOMString? photoURI;</webidl>
21945 The URI of a picture of a person.
21949 This attribute is used to store a URI that points to an image that can represent the
21950 person object. This attribute only contains a local file URI.
21951 Person's photoURI is bounded to linked contacts' valid photoURI.
21952 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
21955 By default, this attribute is set to <var>null</var>.
21962 <Type type="DOMString" nullable="nullable"/>
21964 <Attribute name="ringtoneURI" id="::Contact::Person::ringtoneURI">
21965 <webidl> attribute DOMString? ringtoneURI;</webidl>
21968 An attribute to specify and store the URI of a custom ringtone for a contact.
21972 By default, this attribute is initialized to <var>null</var>.
21973 This attribute only contains a local file URI.
21980 <Type type="DOMString" nullable="nullable"/>
21982 <Attribute name="displayContactId" id="::Contact::Person::displayContactId">
21983 <webidl> attribute <ref>ContactId</ref> displayContactId;</webidl>
21986 The ID of a contact that represents information of the person.
21990 The contact, this value is indicating, is used to show detailed information of the person.
21997 <Type name="ContactId"/>
21999 <Operation name="link" id="::Contact::Person::link">
22000 <webidl> void link(<ref>PersonId</ref> personId) raises(<ref>WebAPIException</ref>);</webidl>
22003 Aggregates another person to this person.
22007 Person is a meta object which aggregates contacts and to make a person, user should combine related contacts.
22008 For this operation, link method is provided.
22009 If "Person A" is linked to "Person B", contacts related to "Person A" are aggregated to "Person B".
22010 After this function returns, the target "Person A" is removed from DB.
22020 http://tizen.org/privilege/contact.write
22022 <Code> // Define the error callback for all the asynchronous calls
22023 function errorCB(err) {
22024 console.log( 'The following error occurred: ' + err.name);
22027 function personsFoundCB(persons) {
22028 // The persons has been successfully found
22030 persons[0].link(persons[1].id);
22031 console.log('Second person was merged to the first person.');
22033 console.log( 'The following error occurred while updating: ' + err.name);
22038 tizen.contact.find(personsFoundCB, errorCB);
22040 console.log( 'The following error occurred while adding: ' + err.name);
22044 <Type type="void"/>
22046 <Argument name="personId">
22049 The ID of person to be merged.
22052 <Type name="PersonId"/>
22056 <RaiseException name="WebAPIException">
22059 with error type TypeMismatchError, if any input parameter
22060 is not compatible with the expected type for that parameter.
22063 with error type InvalidValuesError, if any input parameter
22064 contains invalid values.
22067 with error type SecurityError, if the application does not have the privilege to call this method.
22070 with error type NotSupportedError, if the feature
22074 with error type UnknownError, if any other error occurs while trying to insert the contact.
22080 <Operation name="unlink" id="::Contact::Person::unlink">
22081 <webidl> <ref>Person</ref> unlink(<ref>ContactId</ref> contactId) raises(<ref>WebAPIException</ref>);</webidl>
22084 Separates a contact from this person.
22088 Person is aggregated contacts and if a user wants to detach one contact from person, unlink method is provided.
22089 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.
22090 This function returns a newly created Person object that indicates the separated contact.
22100 http://tizen.org/privilege/contact.write
22102 <Code> var myPersonId = '1'; //ID of modified
22104 var addressbook; // Default addressbook
22105 var person; // Existing person obtained from addressbook
22106 var newPerson; // New person, which will be created during unlink
22108 // Define the error callback.
22109 function errorCB(err) {
22110 console.log( 'The following error occurred: ' + err.name);
22113 // Define the contact search success callback.
22114 function contactsFoundCB(contacts) {
22115 if (contacts.length > 1) {
22117 // unlink first contact
22118 newPerson = person.unlink(contacts[0].id);
22120 console.log( 'The following error occurred while unlink: ' + err.name);
22123 console.log( 'Not enough contacts ');
22129 person = tizen.contact.get(myPersonId);
22131 // Get default address book
22132 addressbook = tizen.contact.getDefaultAddressBook();
22134 // Find all contacts in the default address book that personId
22135 // is exactly myPersonId
22136 var filter = new tizen.AttributeFilter('personId', 'EXACTLY', myPersonId);
22138 addressbook.find(contactsFoundCB, errorCB, filter);
22140 console.log( 'The following error occurred while processing: ' + err.name);
22144 <Type name="Person"/>
22146 <Argument name="contactId">
22149 The ID of contact to unlink.
22152 <Type name="ContactId"/>
22156 <RaiseException name="WebAPIException">
22159 with error type TypeMismatchError, if any input parameter
22160 is not compatible with the expected type for that parameter.
22163 with error type InvalidValuesError, if any input parameter
22164 contains invalid values.
22167 with error type SecurityError, if the application does not have the privilege to call this method.
22170 with error type NotSupportedError, if the feature
22174 with error type UnknownError, if any other error occurs while trying to insert the contact.
22181 <Dictionary name="ContactInit" id="::Contact::ContactInit">
22182 <webidl> dictionary ContactInit {
22183 <ref>ContactName</ref> name;
22184 <ref>ContactAddress</ref>[] addresses;
22185 DOMString photoURI;
22186 <ref>ContactPhoneNumber</ref>[] phoneNumbers;
22187 <ref>ContactEmailAddress</ref>[] emails;
22189 <ref>ContactAnniversary</ref>[] anniversaries;
22190 <ref>ContactOrganization</ref>[] organizations;
22192 <ref>ContactWebSite</ref>[] urls;
22193 DOMString ringtoneURI;
22194 <ref>ContactGroupId</ref>[] groupIds;
22198 Provides a dictionary for specifying contact attributes upon contact creation.
22202 This dictionary is used to input parameters when contacts are created.
22209 <DictionaryMember name="name" id="::Contact::ContactInit::name">
22210 <webidl> <ref>ContactName</ref> name;</webidl>
22211 <Type name="ContactName"/>
22212 </DictionaryMember>
22213 <DictionaryMember name="addresses" id="::Contact::ContactInit::addresses">
22214 <webidl> <ref>ContactAddress</ref>[] addresses;</webidl>
22215 <Type type="array">
22216 <Type name="ContactAddress"/>
22218 </DictionaryMember>
22219 <DictionaryMember name="photoURI" id="::Contact::ContactInit::photoURI">
22220 <webidl> DOMString photoURI;</webidl>
22221 <Type type="DOMString"/>
22222 </DictionaryMember>
22223 <DictionaryMember name="phoneNumbers" id="::Contact::ContactInit::phoneNumbers">
22224 <webidl> <ref>ContactPhoneNumber</ref>[] phoneNumbers;</webidl>
22225 <Type type="array">
22226 <Type name="ContactPhoneNumber"/>
22228 </DictionaryMember>
22229 <DictionaryMember name="emails" id="::Contact::ContactInit::emails">
22230 <webidl> <ref>ContactEmailAddress</ref>[] emails;</webidl>
22231 <Type type="array">
22232 <Type name="ContactEmailAddress"/>
22234 </DictionaryMember>
22235 <DictionaryMember name="birthday" id="::Contact::ContactInit::birthday">
22236 <webidl> Date birthday;</webidl>
22237 <Type type="Date"/>
22238 </DictionaryMember>
22239 <DictionaryMember name="anniversaries" id="::Contact::ContactInit::anniversaries">
22240 <webidl> <ref>ContactAnniversary</ref>[] anniversaries;</webidl>
22241 <Type type="array">
22242 <Type name="ContactAnniversary"/>
22244 </DictionaryMember>
22245 <DictionaryMember name="organizations" id="::Contact::ContactInit::organizations">
22246 <webidl> <ref>ContactOrganization</ref>[] organizations;</webidl>
22247 <Type type="array">
22248 <Type name="ContactOrganization"/>
22250 </DictionaryMember>
22251 <DictionaryMember name="notes" id="::Contact::ContactInit::notes">
22252 <webidl> DOMString[] notes;</webidl>
22253 <Type type="array">
22254 <Type type="DOMString"/>
22256 </DictionaryMember>
22257 <DictionaryMember name="urls" id="::Contact::ContactInit::urls">
22258 <webidl> <ref>ContactWebSite</ref>[] urls;</webidl>
22259 <Type type="array">
22260 <Type name="ContactWebSite"/>
22262 </DictionaryMember>
22263 <DictionaryMember name="ringtoneURI" id="::Contact::ContactInit::ringtoneURI">
22264 <webidl> DOMString ringtoneURI;</webidl>
22265 <Type type="DOMString"/>
22266 </DictionaryMember>
22267 <DictionaryMember name="groupIds" id="::Contact::ContactInit::groupIds">
22268 <webidl> <ref>ContactGroupId</ref>[] groupIds;</webidl>
22269 <Type type="array">
22270 <Type name="ContactGroupId"/>
22272 </DictionaryMember>
22274 <Interface name="Contact" id="::Contact::Contact">
22275 <webidl> [Constructor(optional <ref>ContactInit</ref>? ContactInitDict),
22276 Constructor(DOMString stringRepresentation)]
22277 interface Contact {
22278 readonly attribute <ref>ContactId</ref>? id;
22280 readonly attribute <ref>PersonId</ref>? personId;
22282 readonly attribute <ref>AddressBookId</ref>? addressBookId;
22284 readonly attribute Date? lastUpdated;
22286 readonly attribute boolean isFavorite;
22288 attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);
22290 attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);
22292 attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);
22294 attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);
22296 attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);
22298 attribute Date? birthday setraises(<ref>WebAPIException</ref>);
22300 attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);
22302 attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);
22304 attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);
22306 attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);
22308 attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);
22310 attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);
22312 DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);
22314 <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);
22318 This interface is used to create a <em>Contact </em>object.
22323 <Code> // Get the default address book
22324 var addressbook = tizen.contact.getDefaultAddressBook();
22326 var contact = null;
22329 contact = new tizen.Contact(
22330 "BEGIN:VCARD\n"+
22331 "VERSION:3.0\n"+
22332 "N:Gump;Forrest\n"+
22333 "FN:Forrest Gump\n"+
22334 "ORG:Bubba Gump Shrimp Co.\n"+
22335 "TITLE:Shrimp Man\n"+
22336 "TEL;WORK:(111) 555-1212\n"+
22337 "TEL;HOME:(404) 555-1212\n"+
22338 "EMAIL;WORK;PREF:forrestgump@example.com\n"+
22339 "END:VCARD");
22341 console.log( 'The following error occurred while converting: ' + err.name);
22346 addressbook.add(contact);
22347 console.log('Contact was added with ID ' + contact.id);
22350 console.log( 'The following error occurred while adding: ' + err.name);
22354 <ExtendedAttributeList>
22355 <ExtendedAttribute name="Constructor">
22356 <webidl>Constructor(optional <ref>ContactInit</ref>? ContactInitDict)</webidl>
22358 <Argument optional="optional" name="ContactInitDict">
22359 <Type name="ContactInit" nullable="nullable"/>
22362 </ExtendedAttribute>
22363 <ExtendedAttribute name="Constructor">
22364 <webidl> Constructor(DOMString stringRepresentation)</webidl>
22366 <Argument name="stringRepresentation">
22367 <Type type="DOMString"/>
22370 </ExtendedAttribute>
22371 </ExtendedAttributeList>
22372 <Attribute readonly="readonly" name="id" id="::Contact::Contact::id">
22373 <webidl> readonly attribute <ref>ContactId</ref>? id;</webidl>
22376 An attribute to identify a raw contact.
22380 By default, this attribute is set to <var>null</var>.
22387 <Type name="ContactId" nullable="nullable"/>
22389 <Attribute readonly="readonly" name="personId" id="::Contact::Contact::personId">
22390 <webidl> readonly attribute <ref>PersonId</ref>? personId;</webidl>
22393 The identifier of the person corresponding to the raw contact.
22397 By default, this attribute is set to <var>null</var>.
22404 <Type name="PersonId" nullable="nullable"/>
22406 <Attribute readonly="readonly" name="addressBookId" id="::Contact::Contact::addressBookId">
22407 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
22410 The identifier of the address book that corresponds to the raw contact.
22411 By default, this attribute is set to <var>null</var>.
22417 <Type name="AddressBookId" nullable="nullable"/>
22419 <Attribute readonly="readonly" name="lastUpdated" id="::Contact::Contact::lastUpdated">
22420 <webidl> readonly attribute Date? lastUpdated;</webidl>
22423 The timestamp for the last update of a contact.
22427 Specifies revision information about the contact.
22430 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.
22431 For more details, see RFC 2426, Section 3.6.4.
22438 <Type type="Date" nullable="nullable"/>
22440 <Attribute readonly="readonly" name="isFavorite" id="::Contact::Contact::isFavorite">
22441 <webidl> readonly attribute boolean isFavorite;</webidl>
22444 An attribute to indicate whether a contact is favorite or not.
22448 This value is associated with the <em>isFavorite</em> attribute of Person that this contact indicates.
22451 By default, this attribute is set to <var>false</var>.
22457 <Code> if (contact.isFavorite) {
22462 <Type type="boolean"/>
22464 <Attribute name="name" id="::Contact::Contact::name">
22465 <webidl> attribute <ref>ContactName</ref>? name setraises(<ref>WebAPIException</ref>);</webidl>
22468 An attribute to store the name of a contact.
22474 <Type name="ContactName" nullable="nullable"/>
22476 <RaiseException name="WebAPIException"/>
22479 <Attribute name="addresses" id="::Contact::Contact::addresses">
22480 <webidl> attribute <ref>ContactAddress</ref>[] addresses setraises(<ref>WebAPIException</ref>);</webidl>
22483 The contact addresses.
22487 By default, this attribute is set to an empty array.
22493 <Code> var contactInit = {};
22494 var contactAddr = new tizen.ContactAddres({streetAddress:'Gran Via, 32',
22495 postalCode:'50013',
22498 contactInit.addresses = [contactAddr];
22501 <Type type="array">
22502 <Type name="ContactAddress"/>
22505 <RaiseException name="WebAPIException"/>
22508 <Attribute name="photoURI" id="::Contact::Contact::photoURI">
22509 <webidl> attribute DOMString? photoURI setraises(<ref>WebAPIException</ref>);</webidl>
22512 The URI to the picture of the contact.
22516 This attribute is used to store a URI that points to an image that can represent the
22517 contact object. This attribute only contains a local file URI.
22518 See RFC 2426, Section 3.1.4.
22521 By default, this attribute is set to <var>null</var>.
22527 <Code> var contactInit = {};
22528 contactInit.photoURI = 'file:///opt/media/Downloads/mypicture.jpg';
22531 <Type type="DOMString" nullable="nullable"/>
22533 <RaiseException name="WebAPIException"/>
22536 <Attribute name="phoneNumbers" id="::Contact::Contact::phoneNumbers">
22537 <webidl> attribute <ref>ContactPhoneNumber</ref>[] phoneNumbers setraises(<ref>WebAPIException</ref>);</webidl>
22540 The telephone numbers of the contact.
22544 By default, this attribute is set to empty array.
22550 <Code> var contactInit = {};
22551 var phoneNumber = new tizen.ContactPhoneNumber('123456789');
22552 contactInit.phoneNumbers = [phoneNumber];
22555 <Type type="array">
22556 <Type name="ContactPhoneNumber"/>
22559 <RaiseException name="WebAPIException"/>
22562 <Attribute name="emails" id="::Contact::Contact::emails">
22563 <webidl> attribute <ref>ContactEmailAddress</ref>[] emails setraises(<ref>WebAPIException</ref>);</webidl>
22566 The email addresses of the contact.
22570 By default, this attribute is set to empty array.
22576 <Code> var contactInit = {};
22577 var email = new tizen.ContactEmailAddress('deedee@ramones.com');
22578 contactInit.emails = [email];
22581 <Type type="array">
22582 <Type name="ContactEmailAddress"/>
22585 <RaiseException name="WebAPIException"/>
22588 <Attribute name="birthday" id="::Contact::Contact::birthday">
22589 <webidl> attribute Date? birthday setraises(<ref>WebAPIException</ref>);</webidl>
22592 The birthday of the contact.
22596 Defines specify the birthday of the contact (see RFC 2426 -
22600 By default, this attribute is set to <var>null</var>.
22606 <Code> var contactInit = {};
22607 contactInit.birthday = new Date(1996, 4, 15);
22610 <Type type="Date" nullable="nullable"/>
22612 <RaiseException name="WebAPIException"/>
22615 <Attribute name="anniversaries" id="::Contact::Contact::anniversaries">
22616 <webidl> attribute <ref>ContactAnniversary</ref>[] anniversaries setraises(<ref>WebAPIException</ref>);</webidl>
22619 The list of anniversaries for the contact.
22623 Defines specify arbitrary anniversaries for the contact (in addition to the birthday).
22626 By default, this attribute is set to empty array.
22632 <Code> var contactInit = {};
22633 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
22634 contactInit.anniversaries = [marriage_anniv];
22637 <Type type="array">
22638 <Type name="ContactAnniversary"/>
22641 <RaiseException name="WebAPIException"/>
22644 <Attribute name="organizations" id="::Contact::Contact::organizations">
22645 <webidl> attribute <ref>ContactOrganization</ref>[] organizations setraises(<ref>WebAPIException</ref>);</webidl>
22648 The organizations the contact belongs to.
22652 Contains information related to the contact's company or organization.
22655 For more details, see RFC 2426, Section 3.5.
22662 <Type type="array">
22663 <Type name="ContactOrganization"/>
22666 <RaiseException name="WebAPIException"/>
22669 <Attribute name="notes" id="::Contact::Contact::notes">
22670 <webidl> attribute DOMString[] notes setraises(<ref>WebAPIException</ref>);</webidl>
22673 The notes associated to the contact.
22677 To specify supplemental information or a comment related to the contact.
22680 For more details, see RFC 2426, Section 3.6.2.
22687 <Type type="array">
22688 <Type type="DOMString"/>
22691 <RaiseException name="WebAPIException"/>
22694 <Attribute name="urls" id="::Contact::Contact::urls">
22695 <webidl> attribute <ref>ContactWebSite</ref>[] urls setraises(<ref>WebAPIException</ref>);</webidl>
22698 The URLs associated to the contact.
22702 By default, this attribute is initialized to an empty array.
22705 In case multiple URLs are available, the first one is the default one.
22706 For more details, see RFC 2426, Section 3.6.8.
22713 <Type type="array">
22714 <Type name="ContactWebSite"/>
22717 <RaiseException name="WebAPIException"/>
22720 <Attribute name="ringtoneURI" id="::Contact::Contact::ringtoneURI">
22721 <webidl> attribute DOMString? ringtoneURI setraises(<ref>WebAPIException</ref>);</webidl>
22724 The URI to the custom ringtone for the contact.
22728 To specify a custom ringtone for the contact.
22731 By default, this attribute is initialized to <var>null</var>.
22732 This attribute only contains a local file URI scheme;
22733 For more details, see RFC 2426, Section 3.6.6.
22740 <Type type="DOMString" nullable="nullable"/>
22742 <RaiseException name="WebAPIException"/>
22745 <Attribute name="groupIds" id="::Contact::Contact::groupIds">
22746 <webidl> attribute <ref>ContactGroupId</ref>[] groupIds setraises(<ref>WebAPIException</ref>);</webidl>
22749 The groups the contact belongs to.
22753 To associate groups to the contact.
22756 By default, this attribute is initialized to an empty array.
22759 In a case where multiple categories are available, the first one is the default one.
22760 See RFC 2426, Section 3.6.1.
22767 <Type type="array">
22768 <Type name="ContactGroupId"/>
22771 <RaiseException name="WebAPIException"/>
22774 <Operation name="convertToString" id="::Contact::Contact::convertToString">
22775 <webidl> DOMString convertToString(optional <ref>ContactTextFormat</ref>? format) raises(<ref>WebAPIException</ref>);</webidl>
22778 Converts the Contact item to a string format.
22782 A textual representation for the contact will be generated and returned synchronously.
22783 The export format is set via the format parameter.
22789 <Code> var addressbook;
22791 // Define the error callback.
22792 function errorCB(err) {
22793 console.log( 'The following error occurred: ' + err.name);
22796 // Define the contact find success callback.
22797 function contactsFoundCB(contacts) {
22799 // Convert the first contact to vCard 3.0 format
22800 var vcard = contacts[0].convertToString("VCARD_30");
22801 console.log('textual representation of the contact is: ' + vcard);
22803 console.log( 'The following error occurred while converting: ' + err.name);
22807 // Get the default address book
22808 addressbook = tizen.contact.getDefaultAddressBook();
22810 // Find all contact in the address book whose first name contains the string 'Chris'.
22811 var filter = new tizen.AttributeFilter('firstName', 'CONTAINS', 'Chris');
22813 addressbook.find(contactsFoundCB, errorCB, filter);
22815 console.log( 'The following error occurred while finding: ' + err.name);
22819 <Type type="DOMString">
22822 DOMString The string representation of the Contact item.
22827 <Argument optional="optional" name="format">
22830 Format to use for export. If this value is <var>null</var> or empty, it converts to platform default format.
22833 <Type name="ContactTextFormat" nullable="nullable"/>
22837 <RaiseException name="WebAPIException">
22840 with error type TypeMismatchError, if any input parameter
22841 is not compatible with the expected type for that parameter.
22844 with error type SecurityError, if the functionality
22848 with error type NotSupportedError, if the feature
22852 with error type UnknownError in any other error case.
22858 <Operation name="clone" id="::Contact::Contact::clone">
22859 <webidl> <ref>Contact</ref> clone() raises(<ref>WebAPIException</ref>);</webidl>
22863 Creates a clone of the Contact object, detached from any address book.
22866 The Contact object returned by the <var>clone()</var> method will have its identifier
22867 set to <var>null</var> and will be detached from any address book.
22873 <Code> // Get default address book.
22874 var addressbook = tizen.contact.getDefaultAddressBook();
22876 var bob = new tizen.Contact();
22877 bob.name = new tizen.ContactName({firstName:'Bob',
22878 lastName:'Smith'});
22879 addressbook.add(bob);
22880 var alice = bob.clone();
22881 contact.name.firstName = "Alice"; // Bob's wife
22882 addressbook.add(alice);
22885 <Type name="Contact">
22888 Contact A new clone of the Contact object.
22894 <RaiseException name="WebAPIException">
22897 with error type SecurityError, if the functionality
22901 with error type NotSupportedError, if the feature
22905 with error type UnknownError in any other error case.
22912 <Interface name="ContactRef" id="::Contact::ContactRef">
22913 <webidl> [Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)]
22914 interface ContactRef {
22915 attribute <ref>AddressBookId</ref> addressBookId;
22917 attribute <ref>ContactId</ref> contactId;
22921 The fully-defined contact reference.
22925 It contains both the identifier of the address book which the contact is in, and
22926 the contact identifier within this address book.
22929 This interface is used by other APIs to uniquely and globally identify contacts.
22936 <ExtendedAttributeList>
22937 <ExtendedAttribute name="Constructor">
22938 <webidl>Constructor(<ref>AddressBookId</ref> addressBookId, <ref>ContactId</ref> contactId)</webidl>
22940 <Argument name="addressBookId">
22941 <Type name="AddressBookId"/>
22943 <Argument name="contactId">
22944 <Type name="ContactId"/>
22947 </ExtendedAttribute>
22948 </ExtendedAttributeList>
22949 <Attribute name="addressBookId" id="::Contact::ContactRef::addressBookId">
22950 <webidl> attribute <ref>AddressBookId</ref> addressBookId;</webidl>
22953 The address book identifier.
22959 <Type name="AddressBookId"/>
22961 <Attribute name="contactId" id="::Contact::ContactRef::contactId">
22962 <webidl> attribute <ref>ContactId</ref> contactId;</webidl>
22965 The contact identifier inside the address book.
22971 <Type name="ContactId"/>
22974 <Dictionary name="ContactNameInit" id="::Contact::ContactNameInit">
22975 <webidl> dictionary ContactNameInit {
22978 DOMString firstName;
22979 DOMString middleName;
22980 DOMString lastName;
22981 DOMString[] nicknames;
22982 DOMString phoneticFirstName;
22983 DOMString phoneticLastName;
22987 The properties of a ContactName, to pass to the ContactName constructor.
22991 See ContactName interface for more information about the members.
22998 <DictionaryMember name="prefix" id="::Contact::ContactNameInit::prefix">
22999 <webidl> DOMString prefix;</webidl>
23000 <Type type="DOMString"/>
23001 </DictionaryMember>
23002 <DictionaryMember name="suffix" id="::Contact::ContactNameInit::suffix">
23003 <webidl> DOMString suffix;</webidl>
23004 <Type type="DOMString"/>
23005 </DictionaryMember>
23006 <DictionaryMember name="firstName" id="::Contact::ContactNameInit::firstName">
23007 <webidl> DOMString firstName;</webidl>
23008 <Type type="DOMString"/>
23009 </DictionaryMember>
23010 <DictionaryMember name="middleName" id="::Contact::ContactNameInit::middleName">
23011 <webidl> DOMString middleName;</webidl>
23012 <Type type="DOMString"/>
23013 </DictionaryMember>
23014 <DictionaryMember name="lastName" id="::Contact::ContactNameInit::lastName">
23015 <webidl> DOMString lastName;</webidl>
23016 <Type type="DOMString"/>
23017 </DictionaryMember>
23018 <DictionaryMember name="nicknames" id="::Contact::ContactNameInit::nicknames">
23019 <webidl> DOMString[] nicknames;</webidl>
23020 <Type type="array">
23021 <Type type="DOMString"/>
23023 </DictionaryMember>
23024 <DictionaryMember name="phoneticFirstName" id="::Contact::ContactNameInit::phoneticFirstName">
23025 <webidl> DOMString phoneticFirstName;</webidl>
23026 <Type type="DOMString"/>
23027 </DictionaryMember>
23028 <DictionaryMember name="phoneticLastName" id="::Contact::ContactNameInit::phoneticLastName">
23029 <webidl> DOMString phoneticLastName;</webidl>
23030 <Type type="DOMString"/>
23031 </DictionaryMember>
23033 <Interface name="ContactName" id="::Contact::ContactName">
23034 <webidl> [Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)]
23035 interface ContactName {
23036 attribute DOMString? prefix;
23038 attribute DOMString? suffix;
23040 attribute DOMString? firstName;
23042 attribute DOMString? middleName;
23044 attribute DOMString? lastName;
23046 attribute DOMString[] nicknames;
23048 attribute DOMString? phoneticFirstName;
23050 attribute DOMString? phoneticLastName;
23052 readonly attribute DOMString? displayName;
23056 This interface contains all information related to a contact name.
23062 <ExtendedAttributeList>
23063 <ExtendedAttribute name="Constructor">
23064 <webidl>Constructor(optional <ref>ContactNameInit</ref>? nameInitDict)</webidl>
23066 <Argument optional="optional" name="nameInitDict">
23067 <Type name="ContactNameInit" nullable="nullable"/>
23070 </ExtendedAttribute>
23071 </ExtendedAttributeList>
23072 <Attribute name="prefix" id="::Contact::ContactName::prefix">
23073 <webidl> attribute DOMString? prefix;</webidl>
23076 The name prefix of a contact.
23080 By default, this attribute is initialized to
23081 <var>null</var>. See also RFC 2426, Section 3.1.1.
23087 <Code> contact.name.prefix = "Dr.";
23090 <Type type="DOMString" nullable="nullable"/>
23092 <Attribute name="suffix" id="::Contact::ContactName::suffix">
23093 <webidl> attribute DOMString? suffix;</webidl>
23096 The name suffix of a contact.
23100 By default, this attribute is initialized to
23101 <var>null</var>. See also RFC 2426, Section 3.1.1.
23107 <Code> contact.name.suffix = "Jr.";
23110 <Type type="DOMString" nullable="nullable"/>
23112 <Attribute name="firstName" id="::Contact::ContactName::firstName">
23113 <webidl> attribute DOMString? firstName;</webidl>
23116 The first (given) name of a contact.
23120 By default, this attribute is initialized to
23121 <var>null</var>. See also RFC 2426, Section 3.1.1.
23127 <Code> contact.name.firstName = 'Douglas';
23130 <Type type="DOMString" nullable="nullable"/>
23132 <Attribute name="middleName" id="::Contact::ContactName::middleName">
23133 <webidl> attribute DOMString? middleName;</webidl>
23136 The middle name of a contact.
23140 By default, this attribute is initialized to
23141 <var>null</var>. See also RFC 2426, Section 3.1.1.
23147 <Code> contact.name.middleName = 'Glenn';
23150 <Type type="DOMString" nullable="nullable"/>
23152 <Attribute name="lastName" id="::Contact::ContactName::lastName">
23153 <webidl> attribute DOMString? lastName;</webidl>
23156 The last (family) name of a contact.
23160 By default, this attribute is initialized to
23161 <var>null</var>. See also RFC 2426, Section 3.1.1.
23167 <Code> contact.name.lastName = 'Colvin';
23170 <Type type="DOMString" nullable="nullable"/>
23172 <Attribute name="nicknames" id="::Contact::ContactName::nicknames">
23173 <webidl> attribute DOMString[] nicknames;</webidl>
23176 The nicknames of a contact.
23180 The nickname is a name used instead of, or in addition to, the given name of a contact,
23181 place, or thing. It can also be used to specify a familiar form of a proper name.
23184 By default, this attribute is initialized to an empty array.
23187 In case multiple nicknames are available the first one is the default.
23188 See RFC 2426, Section 3.1.3.
23194 <Code> contact.name.nickNames = ['Dee Dee'];
23197 <Type type="array">
23198 <Type type="DOMString"/>
23201 <Attribute name="phoneticFirstName" id="::Contact::ContactName::phoneticFirstName">
23202 <webidl> attribute DOMString? phoneticFirstName;</webidl>
23205 The phonetic first name of a contact.
23209 Describes how the first name should be
23210 pronounced. This is very important in
23211 some languages, such as Japanese, because the
23212 same 'Kanji' may have several pronunciations.
23215 By default, this attribute is set to <var>null</var>.
23222 <Type type="DOMString" nullable="nullable"/>
23224 <Attribute name="phoneticLastName" id="::Contact::ContactName::phoneticLastName">
23225 <webidl> attribute DOMString? phoneticLastName;</webidl>
23228 The phonetic last name of a contact.
23232 Describes how the last name should be
23233 pronounced. This is very important in
23234 some languages, such as Japanese, because the
23235 same 'Kanji' may have several pronunciations.
23238 By default, this attribute is set to <var>null</var>.
23245 <Type type="DOMString" nullable="nullable"/>
23247 <Attribute readonly="readonly" name="displayName" id="::Contact::ContactName::displayName">
23248 <webidl> readonly attribute DOMString? displayName;</webidl>
23251 The display name of a contact.
23255 The string which can be displayed to identify the contact. It is composed of the first
23256 and last names if available, otherwise, it will fall back to the most adequate
23257 field available to identify the contact (such as nickname).
23260 By default, this attribute is set to <var>null</var>. Initially, once a contact is added to an address book, this value is composed.
23267 <Type type="DOMString" nullable="nullable"/>
23270 <Dictionary name="ContactOrganizationInit" id="::Contact::ContactOrganizationInit">
23271 <webidl> dictionary ContactOrganizationInit {
23273 DOMString department;
23280 The properties of a ContactOrganization, to pass to the ContactOrganization constructor.
23284 See ContactOrganization interface for information about members.
23291 <DictionaryMember name="name" id="::Contact::ContactOrganizationInit::name">
23292 <webidl> DOMString name;</webidl>
23293 <Type type="DOMString"/>
23294 </DictionaryMember>
23295 <DictionaryMember name="department" id="::Contact::ContactOrganizationInit::department">
23296 <webidl> DOMString department;</webidl>
23297 <Type type="DOMString"/>
23298 </DictionaryMember>
23299 <DictionaryMember name="title" id="::Contact::ContactOrganizationInit::title">
23300 <webidl> DOMString title;</webidl>
23301 <Type type="DOMString"/>
23302 </DictionaryMember>
23303 <DictionaryMember name="role" id="::Contact::ContactOrganizationInit::role">
23304 <webidl> DOMString role;</webidl>
23305 <Type type="DOMString"/>
23306 </DictionaryMember>
23307 <DictionaryMember name="logoURI" id="::Contact::ContactOrganizationInit::logoURI">
23308 <webidl> DOMString logoURI;</webidl>
23309 <Type type="DOMString"/>
23310 </DictionaryMember>
23312 <Interface name="ContactOrganization" id="::Contact::ContactOrganization">
23313 <webidl> [Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)]
23314 interface ContactOrganization {
23315 attribute DOMString? name;
23317 attribute DOMString? department;
23319 attribute DOMString? title;
23321 attribute DOMString? role;
23323 attribute DOMString? logoURI;
23327 This interface contains the information about the organization or
23328 company that a contact belongs to.
23332 By default, each of the attributes of this interface are <var>null</var>.
23335 For more details, see RFC 2426, Section 3.5.
23341 <Code> var organization = new tizen.ContactOrganization({name: "Intel", role: "SW Engineer"});
23344 <ExtendedAttributeList>
23345 <ExtendedAttribute name="Constructor">
23346 <webidl>Constructor(optional <ref>ContactOrganizationInit</ref>? orgInitDict)</webidl>
23348 <Argument optional="optional" name="orgInitDict">
23349 <Type name="ContactOrganizationInit" nullable="nullable"/>
23352 </ExtendedAttribute>
23353 </ExtendedAttributeList>
23354 <Attribute name="name" id="::Contact::ContactOrganization::name">
23355 <webidl> attribute DOMString? name;</webidl>
23358 The name of an organization.
23362 For more details, see RFC 2426, Section 3.5.5.
23369 <Type type="DOMString" nullable="nullable"/>
23371 <Attribute name="department" id="::Contact::ContactOrganization::department">
23372 <webidl> attribute DOMString? department;</webidl>
23375 The organizational unit name.
23379 For more details, see RFC 2426, Section 3.5.5.
23386 <Type type="DOMString" nullable="nullable"/>
23388 <Attribute name="title" id="::Contact::ContactOrganization::title">
23389 <webidl> attribute DOMString? title;</webidl>
23396 To specify the job title, functional position or function (such as 'Director,
23397 Research and Development').
23400 For more details, see RFC 2426, Section 3.5.1.
23407 <Type type="DOMString" nullable="nullable"/>
23409 <Attribute name="role" id="::Contact::ContactOrganization::role">
23410 <webidl> attribute DOMString? role;</webidl>
23413 An attribute to store the role, occupation, or business category
23414 (such as 'Programmer').
23418 For more details, see RFC 2426, Section 3.5.2.
23425 <Type type="DOMString" nullable="nullable"/>
23427 <Attribute name="logoURI" id="::Contact::ContactOrganization::logoURI">
23428 <webidl> attribute DOMString? logoURI;</webidl>
23431 The URI to the logo of a company.
23435 To specify a graphic image of a logo associated with an organization.
23436 This attribute only contains file URI Scheme;
23437 remote pictures could be loaded to local with Download API.
23438 For more details, see RFC 2426, Section 3.5.3.
23445 <Type type="DOMString" nullable="nullable"/>
23448 <Interface name="ContactWebSite" id="::Contact::ContactWebSite">
23449 <webidl> [Constructor(DOMString url, optional DOMString type)]
23450 interface ContactWebSite
23452 attribute DOMString url;
23454 attribute DOMString type;
23458 The ContactWebSite object that contains the URL and the type of web site.
23462 For more details, see RFC 2426, Section 3.6.8.
23468 <Code> var contactInit = {}
23469 var blog = new tizen.ContactWebSite('http://www.domain.com', 'BLOG');
23470 contactInit.urls = [blog];
23473 <ExtendedAttributeList>
23474 <ExtendedAttribute name="Constructor">
23475 <webidl>Constructor(DOMString url, optional DOMString type)</webidl>
23477 <Argument name="url">
23478 <Type type="DOMString"/>
23480 <Argument optional="optional" name="type">
23481 <Type type="DOMString"/>
23484 </ExtendedAttribute>
23485 </ExtendedAttributeList>
23486 <Attribute name="url" id="::Contact::ContactWebSite::url">
23487 <webidl> attribute DOMString url;</webidl>
23490 The URL for the contact's web site.
23496 <Type type="DOMString"/>
23498 <Attribute name="type" id="::Contact::ContactWebSite::type">
23499 <webidl> attribute DOMString type;</webidl>
23502 The type of web site.
23506 At least the following values must be supported:
23510 HOMEPAGE - Indicates a home page. </li>
23512 BLOG - Indicates a blog. </li>
23515 By default, this attribute is set to HOMEPAGE.
23522 <Type type="DOMString"/>
23525 <Interface name="ContactAnniversary" id="::Contact::ContactAnniversary">
23526 <webidl> [Constructor(Date date, optional DOMString? label)]
23527 interface ContactAnniversary
23529 attribute Date date;
23531 attribute DOMString? label;
23535 This interface implements the <em>ContactAnniversary </em>object that contains the date and description of an anniversary.
23540 <Code> var contactInit = {}
23541 var marriage_anniv = new tizen.ContactAnniversary(new Date(1976, 11, 2), 'Marriage');
23542 contactInit.anniversaries = [marriage_anniv];
23545 <ExtendedAttributeList>
23546 <ExtendedAttribute name="Constructor">
23547 <webidl>Constructor(Date date, optional DOMString? label)</webidl>
23549 <Argument name="date">
23550 <Type type="Date"/>
23552 <Argument optional="optional" name="label">
23553 <Type type="DOMString" nullable="nullable"/>
23556 </ExtendedAttribute>
23557 </ExtendedAttributeList>
23558 <Attribute name="date" id="::Contact::ContactAnniversary::date">
23559 <webidl> attribute Date date;</webidl>
23562 The date of an anniversary.
23568 <Type type="Date"/>
23570 <Attribute name="label" id="::Contact::ContactAnniversary::label">
23571 <webidl> attribute DOMString? label;</webidl>
23574 The text describing an anniversary.
23578 By default, this attribute is set to <var>null</var>.
23585 <Type type="DOMString" nullable="nullable"/>
23588 <Dictionary name="ContactAddressInit" id="::Contact::ContactAddressInit">
23589 <webidl> dictionary ContactAddressInit
23594 DOMString streetAddress;
23595 DOMString additionalInformation;
23596 DOMString postalCode;
23602 The properties of a ContactAddress to pass to the ContactAddress constructor.
23606 See ContactAddress interface for more information about the members.
23613 <DictionaryMember name="country" id="::Contact::ContactAddressInit::country">
23614 <webidl> DOMString country;</webidl>
23615 <Type type="DOMString"/>
23616 </DictionaryMember>
23617 <DictionaryMember name="region" id="::Contact::ContactAddressInit::region">
23618 <webidl> DOMString region;</webidl>
23619 <Type type="DOMString"/>
23620 </DictionaryMember>
23621 <DictionaryMember name="city" id="::Contact::ContactAddressInit::city">
23622 <webidl> DOMString city;</webidl>
23623 <Type type="DOMString"/>
23624 </DictionaryMember>
23625 <DictionaryMember name="streetAddress" id="::Contact::ContactAddressInit::streetAddress">
23626 <webidl> DOMString streetAddress;</webidl>
23627 <Type type="DOMString"/>
23628 </DictionaryMember>
23629 <DictionaryMember name="additionalInformation" id="::Contact::ContactAddressInit::additionalInformation">
23630 <webidl> DOMString additionalInformation;</webidl>
23631 <Type type="DOMString"/>
23632 </DictionaryMember>
23633 <DictionaryMember name="postalCode" id="::Contact::ContactAddressInit::postalCode">
23634 <webidl> DOMString postalCode;</webidl>
23635 <Type type="DOMString"/>
23636 </DictionaryMember>
23637 <DictionaryMember name="isDefault" id="::Contact::ContactAddressInit::isDefault">
23638 <webidl> boolean isDefault;</webidl>
23639 <Type type="boolean"/>
23640 </DictionaryMember>
23641 <DictionaryMember name="types" id="::Contact::ContactAddressInit::types">
23642 <webidl> DOMString[] types;</webidl>
23643 <Type type="array">
23644 <Type type="DOMString"/>
23646 </DictionaryMember>
23648 <Interface name="ContactAddress" id="::Contact::ContactAddress">
23649 <webidl> [Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)]
23650 interface ContactAddress
23652 attribute DOMString? country;
23654 attribute DOMString? region;
23656 attribute DOMString? city;
23658 attribute DOMString? streetAddress;
23660 attribute DOMString? additionalInformation;
23662 attribute DOMString? postalCode;
23664 attribute boolean isDefault;
23666 attribute DOMString[] types;
23670 This interface contains a set of attributes that represent a particular point
23671 on the Earth's surface.
23675 Except isDefault and types attributes, each of the attributes of this interface are set to <var>null</var> by default.
23678 For more details, see RFC 2426, Section 3.2.1.
23684 <Code> var contactInit = {};
23685 var contactAddress = new tizen.ContactAddress({streetAddress:'Gran Via, 32',
23686 postalCode:'50013', city:'Zaragoza',
23687 country:'ES', types:['WORK']});
23688 contactInit.contactAddress = [contactAddress];
23691 <ExtendedAttributeList>
23692 <ExtendedAttribute name="Constructor">
23693 <webidl>Constructor(optional <ref>ContactAddressInit</ref>? addressInitDict)</webidl>
23695 <Argument optional="optional" name="addressInitDict">
23696 <Type name="ContactAddressInit" nullable="nullable"/>
23699 </ExtendedAttribute>
23700 </ExtendedAttributeList>
23701 <Attribute name="country" id="::Contact::ContactAddress::country">
23702 <webidl> attribute DOMString? country;</webidl>
23705 The country of the address.
23709 It is recommended that the country is specified
23710 using the two-letter [ISO 3166-1] code.
23717 <Type type="DOMString" nullable="nullable"/>
23719 <Attribute name="region" id="::Contact::ContactAddress::region">
23720 <webidl> attribute DOMString? region;</webidl>
23723 The name of a country subdivision.
23727 For example, State (United States) or Province (Spain).
23734 <Type type="DOMString" nullable="nullable"/>
23736 <Attribute name="city" id="::Contact::ContactAddress::city">
23737 <webidl> attribute DOMString? city;</webidl>
23740 The name of the locality. For example, the city, county, town, or village.
23746 <Type type="DOMString" nullable="nullable"/>
23748 <Attribute name="streetAddress" id="::Contact::ContactAddress::streetAddress">
23749 <webidl> attribute DOMString? streetAddress;</webidl>
23752 The street address, for example, building number and street name/number.
23758 <Type type="DOMString" nullable="nullable"/>
23760 <Attribute name="additionalInformation" id="::Contact::ContactAddress::additionalInformation">
23761 <webidl> attribute DOMString? additionalInformation;</webidl>
23764 An attribute to capture any other address details that are required for an accurate address.
23765 For example, floor number, apartment number, suite name, the name of an office occupant, etc.
23771 <Type type="DOMString" nullable="nullable"/>
23773 <Attribute name="postalCode" id="::Contact::ContactAddress::postalCode">
23774 <webidl> attribute DOMString? postalCode;</webidl>
23777 The postal code of the location (also known as the zip code in the US).
23783 <Type type="DOMString" nullable="nullable"/>
23785 <Attribute name="isDefault" id="::Contact::ContactAddress::isDefault">
23786 <webidl> attribute boolean isDefault;</webidl>
23789 The default state of an address.
23793 Indicates if the address was marked as <em>default</em> or not for the contact.
23794 The only one among addresses for a person can have default property,
23795 so that this attribute might be changed without explicit modification
23796 according to the policy of platform.
23799 It deals with the 'pref' TYPE on RFC 2426, Section 3.2.1
23802 By default, this attribute is set to <var>false</var>.
23809 <Type type="boolean"/>
23811 <Attribute name="types" id="::Contact::ContactAddress::types">
23812 <webidl> attribute DOMString[] types;</webidl>
23815 The case insensitive list of address types.
23819 For more details, see RFC 2426, Section 3.2.1.
23822 At least the following values must be supported:
23826 WORK - Indicates a work address </li>
23828 HOME - Indicates a home address </li>
23831 By default, this attribute is set to HOME.
23838 <Type type="array">
23839 <Type type="DOMString"/>
23843 <Interface name="ContactPhoneNumber" id="::Contact::ContactPhoneNumber">
23844 <webidl> [Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)]
23845 interface ContactPhoneNumber
23847 attribute DOMString number;
23849 attribute boolean isDefault;
23851 attribute DOMString[] types;
23855 The ContactPhoneNumber object that contains the number and the type of phone number.
23859 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.
23860 At searching by phoneNumber, matchflag "CONTAINS" provides a result set which is retrieved from normalized phoneNumber as searching value.
23863 For more details, see RFC 2426, Section 3.3.1
23869 <Code> var contactInit = {};
23870 var phoneNumber = new tizen.ContactPhoneNumber('123456789', ['WORK','VOICE'], true);
23871 contactInit.phoneNumbers = [phoneNumber];
23874 <ExtendedAttributeList>
23875 <ExtendedAttribute name="Constructor">
23876 <webidl>Constructor(DOMString number, optional DOMString[] types, optional boolean isDefault)</webidl>
23878 <Argument name="number">
23879 <Type type="DOMString"/>
23881 <Argument optional="optional" name="types">
23882 <Type type="array">
23883 <Type type="DOMString"/>
23886 <Argument optional="optional" name="isDefault">
23887 <Type type="boolean"/>
23890 </ExtendedAttribute>
23891 </ExtendedAttributeList>
23892 <Attribute name="number" id="::Contact::ContactPhoneNumber::number">
23893 <webidl> attribute DOMString number;</webidl>
23896 The full phone number.
23902 <Type type="DOMString"/>
23904 <Attribute name="isDefault" id="::Contact::ContactPhoneNumber::isDefault">
23905 <webidl> attribute boolean isDefault;</webidl>
23908 The default state of the phone number.
23912 Indicates if the phone number was marked as <em>default</em> or not for the contact.
23913 The only one among phone numbers for a person can have default property,
23914 so that this attribute might be changed without explicit modification
23915 according to the policy of platform.
23918 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.1
23921 By default, this attribute is set to false.
23928 <Type type="boolean"/>
23930 <Attribute name="types" id="::Contact::ContactPhoneNumber::types">
23931 <webidl> attribute DOMString[] types;</webidl>
23934 The case insensitive list of phone types, as defined in RFC 2426.
23938 Specifies the intended use of the phone number.
23941 At least the following values must be supported:
23945 <var>WORK</var> - Indicates a work number </li>
23947 <var>HOME</var> - Indicates a home number </li>
23949 <var>VOICE</var> - Indicates a voice number (Default) </li>
23951 <var>FAX</var> - Indicates a facsimile number </li>
23953 <var>MSG</var> - Indicates a messaging service on the number </li>
23955 <var>CELL</var> - Indicates a cellular number </li>
23957 <var>PAGER</var> - Indicates a pager number </li>
23959 <var>BBS</var> - Indicates a bulletin board service number </li>
23961 <var>MODEM</var> - Indicates a MODEM number </li>
23963 <var>CAR</var> - Indicates a car-phone number </li>
23965 <var>ISDN</var> - Indicates an ISDN number </li>
23967 <var>VIDEO</var> - Indicates a video-phone number </li>
23969 <var>PCS</var> - Personal Communication Standard </li>
23976 <Type type="array">
23977 <Type type="DOMString"/>
23981 <Interface name="ContactEmailAddress" id="::Contact::ContactEmailAddress">
23982 <webidl> [Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)]
23983 interface ContactEmailAddress
23985 attribute DOMString email;
23987 attribute boolean isDefault;
23989 attribute DOMString[] types;
23993 The ContactEmailAddress object that contains the email address and the type of email address.
23997 For more details, see RFC 2426, Section 3.3.2.
24003 <Code> var contactInit = {};
24004 var email = new tizen.ContactEmailAddress('user@domain.com', ['WORK']);
24005 contactInit.emails = [email];
24008 <ExtendedAttributeList>
24009 <ExtendedAttribute name="Constructor">
24010 <webidl>Constructor(DOMString email, optional DOMString[] types, optional boolean isDefault)</webidl>
24012 <Argument name="email">
24013 <Type type="DOMString"/>
24015 <Argument optional="optional" name="types">
24016 <Type type="array">
24017 <Type type="DOMString"/>
24020 <Argument optional="optional" name="isDefault">
24021 <Type type="boolean"/>
24024 </ExtendedAttribute>
24025 </ExtendedAttributeList>
24026 <Attribute name="email" id="::Contact::ContactEmailAddress::email">
24027 <webidl> attribute DOMString email;</webidl>
24030 The full email address.
24036 <Type type="DOMString"/>
24038 <Attribute name="isDefault" id="::Contact::ContactEmailAddress::isDefault">
24039 <webidl> attribute boolean isDefault;</webidl>
24042 The default state of an email address.
24046 Indicates if the email address was marked as <em>default</em> or not for the contact.
24047 The only one among email addresses for a person can have default property,
24048 so that this attribute might be changed without explicit modification
24049 according to the policy of platform.
24052 It deals with the 'pref' TYPE on RFC 2426, Section 3.3.2
24055 By default, this attribute is set to false.
24062 <Type type="boolean"/>
24064 <Attribute name="types" id="::Contact::ContactEmailAddress::types">
24065 <webidl> attribute DOMString[] types;</webidl>
24068 The case insensitive list of email types.
24072 Specifies the intended use of the email address.
24075 At least the following values must be supported:
24079 WORK - Indicates a work email </li>
24081 HOME - Indicates a home email </li>
24083 MOBILE - Indicates a mobile email </li>
24086 By default, this attribute is set to WORK.
24093 <Type type="array">
24094 <Type type="DOMString"/>
24098 <Interface name="ContactGroup" id="::Contact::ContactGroup">
24099 <webidl> [Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)]
24100 interface ContactGroup
24102 readonly attribute <ref>ContactGroupId</ref>? id;
24104 readonly attribute <ref>AddressBookId</ref>? addressBookId;
24106 attribute DOMString name;
24108 attribute DOMString? ringtoneURI;
24110 attribute DOMString? photoURI;
24112 readonly attribute DOMString readOnly;
24121 <Code> var addressbook = null;
24124 // Define the error callback for all the asynchronous calls
24125 function errorCB(err) {
24126 console.log( 'The following error occurred: ' + err.name);
24129 // Define the success callback for retrieving all the
24131 function addressBooksCB(addressbooks) {
24132 addressbook = addressbooks[0];
24134 group = new tizen.ContactGroup('Family', 'file://opt/media/Downloads/ring.mp3');
24136 console.log( 'The following error occurred while converting: ' + err.name);
24141 addressbook.addGroup(group);
24142 console.log('Group was added with ID ' + group.id);
24145 console.log( 'The following error occurred while adding: ' + err.name);
24149 tizen.contact.getAddressBooks(addressBooksCB, errorCB);
24153 <ExtendedAttributeList>
24154 <ExtendedAttribute name="Constructor">
24155 <webidl>Constructor(DOMString name, optional DOMString? ringtoneURI, optional DOMString? photoURI)</webidl>
24157 <Argument name="name">
24158 <Type type="DOMString"/>
24160 <Argument optional="optional" name="ringtoneURI">
24161 <Type type="DOMString" nullable="nullable"/>
24163 <Argument optional="optional" name="photoURI">
24164 <Type type="DOMString" nullable="nullable"/>
24167 </ExtendedAttribute>
24168 </ExtendedAttributeList>
24169 <Attribute readonly="readonly" name="id" id="::Contact::ContactGroup::id">
24170 <webidl> readonly attribute <ref>ContactGroupId</ref>? id;</webidl>
24173 The identifier of a group.
24177 By default, this attribute is set to <var>null</var>.
24184 <Type name="ContactGroupId" nullable="nullable"/>
24186 <Attribute readonly="readonly" name="addressBookId" id="::Contact::ContactGroup::addressBookId">
24187 <webidl> readonly attribute <ref>AddressBookId</ref>? addressBookId;</webidl>
24190 The identifier of the address book that the group belongs to.
24194 By default, this attribute is set to <var>null</var>.
24201 <Type name="AddressBookId" nullable="nullable"/>
24203 <Attribute name="name" id="::Contact::ContactGroup::name">
24204 <webidl> attribute DOMString name;</webidl>
24207 The name of a group.
24213 <Type type="DOMString"/>
24215 <Attribute name="ringtoneURI" id="::Contact::ContactGroup::ringtoneURI">
24216 <webidl> attribute DOMString? ringtoneURI;</webidl>
24219 The URI to the custom ringtone for a group.
24223 To specify a custom ringtone for a group.
24226 By default, this attribute is initialized to <var>null</var>.
24227 This attribute only contains a local file URI.
24234 <Type type="DOMString" nullable="nullable"/>
24236 <Attribute name="photoURI" id="::Contact::ContactGroup::photoURI">
24237 <webidl> attribute DOMString? photoURI;</webidl>
24240 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.
24244 By default, this attribute is set to <var>null</var>.
24251 <Type type="DOMString" nullable="nullable"/>
24253 <Attribute readonly="readonly" name="readOnly" id="::Contact::ContactGroup::readOnly">
24254 <webidl> readonly attribute DOMString readOnly;</webidl>
24257 The flag indicating if the group can be modified / removed or not.
24258 Some groups cannot be edited if this flag sets to <var>true</var>.
24262 By default, this attribute is set to false.
24269 <Type type="DOMString"/>
24272 <Interface name="PersonArraySuccessCallback" id="::Contact::PersonArraySuccessCallback">
24273 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PersonArraySuccessCallback {
24274 void onsuccess(<ref>Person</ref>[] persons);
24278 The success callback that is used for retrieving
24283 The success callback that takes an array of persons as an input
24284 argument. It is used in the asynchronous operation to
24285 get or save a list of persons.
24292 <ExtendedAttributeList>
24293 <ExtendedAttribute name="Callback" value="FunctionOnly">
24294 <webidl>Callback</webidl>
24295 </ExtendedAttribute>
24296 <ExtendedAttribute name="NoInterfaceObject">
24297 <webidl> NoInterfaceObject</webidl>
24298 </ExtendedAttribute>
24299 </ExtendedAttributeList>
24300 <Operation name="onsuccess" id="::Contact::PersonArraySuccessCallback::onsuccess">
24301 <webidl> void onsuccess(<ref>Person</ref>[] persons);</webidl>
24304 The method invoked when a list of persons is retrieved successfully.
24310 <Type type="void"/>
24312 <Argument name="persons">
24318 <Type type="array">
24319 <Type name="Person"/>
24325 <Interface name="ContactArraySuccessCallback" id="::Contact::ContactArraySuccessCallback">
24326 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContactArraySuccessCallback {
24327 void onsuccess(<ref>Contact</ref>[] contacts);
24331 The success callback that is used for saving and retrieving
24332 a list of contacts.
24336 The success callback that takes an array of contacts as an input
24337 argument. It is used in the asynchronous operation to
24338 get or save a list of contacts.
24345 <ExtendedAttributeList>
24346 <ExtendedAttribute name="Callback" value="FunctionOnly">
24347 <webidl>Callback</webidl>
24348 </ExtendedAttribute>
24349 <ExtendedAttribute name="NoInterfaceObject">
24350 <webidl> NoInterfaceObject</webidl>
24351 </ExtendedAttribute>
24352 </ExtendedAttributeList>
24353 <Operation name="onsuccess" id="::Contact::ContactArraySuccessCallback::onsuccess">
24354 <webidl> void onsuccess(<ref>Contact</ref>[] contacts);</webidl>
24357 The method invoked when a list of contacts is retrieved successfully.
24363 <Type type="void"/>
24365 <Argument name="contacts">
24369 The Contacts that were successfully saved must have their identifiers set.
24372 <Type type="array">
24373 <Type name="Contact"/>
24379 <Interface name="AddressBookArraySuccessCallback" id="::Contact::AddressBookArraySuccessCallback">
24380 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface AddressBookArraySuccessCallback {
24381 void onsuccess(<ref>AddressBook</ref>[] addressbooks);
24385 The success callback when retrieving a list of AddressBooks.
24389 The success callback that takes an array of AddressBooks as an input
24390 argument. It is used in the asynchronous operation to
24398 <ExtendedAttributeList>
24399 <ExtendedAttribute name="Callback" value="FunctionOnly">
24400 <webidl>Callback</webidl>
24401 </ExtendedAttribute>
24402 <ExtendedAttribute name="NoInterfaceObject">
24403 <webidl> NoInterfaceObject</webidl>
24404 </ExtendedAttribute>
24405 </ExtendedAttributeList>
24406 <Operation name="onsuccess" id="::Contact::AddressBookArraySuccessCallback::onsuccess">
24407 <webidl> void onsuccess(<ref>AddressBook</ref>[] addressbooks);</webidl>
24410 The method invoked when a list of address books is retrieved successfully.
24416 <Type type="void"/>
24418 <Argument name="addressbooks">
24421 The address books to retrieve.
24424 <Type type="array">
24425 <Type name="AddressBook"/>
24431 <Interface name="AddressBookChangeCallback" id="::Contact::AddressBookChangeCallback">
24432 <webidl> [Callback, NoInterfaceObject] interface AddressBookChangeCallback {
24433 void oncontactsadded(<ref>Contact</ref>[] contacts);
24435 void oncontactsupdated(<ref>Contact</ref>[] contacts);
24437 void oncontactsremoved(<ref>ContactId</ref>[] contactIds);
24441 The interface for specifying the methods to be called for address book
24442 change notifications.
24446 This interface specifies a set of functions that will be invoked every time an address
24447 book change occurs (contact addition/update/deletion).
24454 <ExtendedAttributeList>
24455 <ExtendedAttribute name="Callback">
24456 <webidl>Callback</webidl>
24457 </ExtendedAttribute>
24458 <ExtendedAttribute name="NoInterfaceObject">
24459 <webidl> NoInterfaceObject</webidl>
24460 </ExtendedAttribute>
24461 </ExtendedAttributeList>
24462 <Operation name="oncontactsadded" id="::Contact::AddressBookChangeCallback::oncontactsadded">
24463 <webidl> void oncontactsadded(<ref>Contact</ref>[] contacts);</webidl>
24466 The method invoked when contacts are added to the address book.
24472 <Type type="void"/>
24474 <Argument name="contacts">
24477 A list of contacts to add.
24480 <Type type="array">
24481 <Type name="Contact"/>
24486 <Operation name="oncontactsupdated" id="::Contact::AddressBookChangeCallback::oncontactsupdated">
24487 <webidl> void oncontactsupdated(<ref>Contact</ref>[] contacts);</webidl>
24490 The method invoked when contacts are updated in the address book.
24496 <Type type="void"/>
24498 <Argument name="contacts">
24501 A list of contacts to update.
24504 <Type type="array">
24505 <Type name="Contact"/>
24510 <Operation name="oncontactsremoved" id="::Contact::AddressBookChangeCallback::oncontactsremoved">
24511 <webidl> void oncontactsremoved(<ref>ContactId</ref>[] contactIds);</webidl>
24514 The method invoked when contacts are deleted from the address book.
24520 <Type type="void"/>
24522 <Argument name="contactIds">
24525 A list of identifiers for the contacts to delete.
24528 <Type type="array">
24529 <Type name="ContactId"/>
24535 <Interface name="PersonsChangeCallback" id="::Contact::PersonsChangeCallback">
24536 <webidl> [Callback, NoInterfaceObject] interface PersonsChangeCallback {
24537 void onpersonsadded(<ref>Person</ref>[] persons);
24539 void onpersonsupdated(<ref>Person</ref>[] persons);
24541 void onpersonsremoved(<ref>PersonId</ref>[] personIds);
24545 The interface for specifying the methods to be called for change notifications.
24549 This interface specifies a set of functions that will be invoked every time person's
24550 list change occurs (person addition/update/deletion).
24557 <ExtendedAttributeList>
24558 <ExtendedAttribute name="Callback">
24559 <webidl>Callback</webidl>
24560 </ExtendedAttribute>
24561 <ExtendedAttribute name="NoInterfaceObject">
24562 <webidl> NoInterfaceObject</webidl>
24563 </ExtendedAttribute>
24564 </ExtendedAttributeList>
24565 <Operation name="onpersonsadded" id="::Contact::PersonsChangeCallback::onpersonsadded">
24566 <webidl> void onpersonsadded(<ref>Person</ref>[] persons);</webidl>
24569 The method invoked when persons are added to the person list.
24575 <Type type="void"/>
24577 <Argument name="persons">
24580 A list of persons to add.
24583 <Type type="array">
24584 <Type name="Person"/>
24589 <Operation name="onpersonsupdated" id="::Contact::PersonsChangeCallback::onpersonsupdated">
24590 <webidl> void onpersonsupdated(<ref>Person</ref>[] persons);</webidl>
24593 The method invoked when persons are updated in the person list.
24599 <Type type="void"/>
24601 <Argument name="persons">
24604 A list of persons to update.
24607 <Type type="array">
24608 <Type name="Person"/>
24613 <Operation name="onpersonsremoved" id="::Contact::PersonsChangeCallback::onpersonsremoved">
24614 <webidl> void onpersonsremoved(<ref>PersonId</ref>[] personIds);</webidl>
24617 The method invoked when persons are deleted from the person list.
24623 <Type type="void"/>
24625 <Argument name="personIds">
24628 A list of identifiers for the persons to delete.
24631 <Type type="array">
24632 <Type name="PersonId"/>
24639 <Module name="Content" id="::Content">
24640 <webidl>module Content {
24642 enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };
24644 enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };
24646 enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };
24648 enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };
24650 typedef DOMString ContentId;
24652 typedef DOMString ContentDirectoryId;
24654 [NoInterfaceObject] interface ContentManagerObject {
24655 readonly attribute <ref>ContentManager</ref> content;
24657 <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;
24659 [NoInterfaceObject] interface ContentManager {
24661 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24663 void updateBatch(<ref>Content</ref>[] contents,
24664 optional <ref>SuccessCallback</ref>? successCallback,
24665 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24667 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24668 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24670 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
24671 optional <ref>ErrorCallback</ref>? errorCallback,
24672 optional <ref>ContentDirectoryId</ref>? directoryId,
24673 optional <ref>AbstractFilter</ref>? filter,
24674 optional <ref>SortMode</ref>? sortMode,
24675 optional unsigned long? count,
24676 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
24679 void scanFile(DOMString contentURI,
24680 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
24681 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24683 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
24685 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
24689 [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
24690 void onsuccess(<ref>Content</ref>[] contents);
24693 [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
24694 void onsuccess(<ref>ContentDirectory</ref>[] directories);
24697 [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
24698 void onsuccess(DOMString contentURI);
24701 [Callback, NoInterfaceObject] interface ContentChangeCallback {
24702 void oncontentadded(<ref>Content</ref> content);
24704 void oncontentupdated(<ref>Content</ref> content);
24706 void oncontentremoved(<ref>ContentId</ref> id);
24710 [NoInterfaceObject] interface ContentDirectory {
24712 readonly attribute <ref>ContentDirectoryId</ref> id;
24714 readonly attribute DOMString directoryURI;
24716 readonly attribute DOMString title;
24718 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
24720 readonly attribute Date? modifiedDate;
24724 [NoInterfaceObject] interface Content {
24726 readonly attribute DOMString[] editableAttributes;
24728 readonly attribute <ref>ContentId</ref> id;
24730 attribute DOMString name;
24732 readonly attribute <ref>ContentType</ref> type;
24734 readonly attribute DOMString mimeType;
24736 readonly attribute DOMString title;
24738 readonly attribute DOMString contentURI;
24740 readonly attribute DOMString[]? thumbnailURIs;
24742 readonly attribute Date? releaseDate;
24744 readonly attribute Date? modifiedDate;
24746 readonly attribute unsigned long size;
24748 attribute DOMString? description;
24750 attribute unsigned long rating;
24753 [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
24755 attribute <ref>SimpleCoordinates</ref>? geolocation;
24757 readonly attribute DOMString? album;
24759 readonly attribute DOMString[]? artists;
24761 readonly attribute unsigned long duration;
24763 readonly attribute unsigned long width;
24765 readonly attribute unsigned long height;
24770 [NoInterfaceObject] interface AudioContentLyrics {
24772 readonly attribute <ref>AudioContentLyricsType</ref> type;
24774 readonly attribute unsigned long[] timestamps;
24776 readonly attribute DOMString[] texts;
24779 [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
24781 readonly attribute DOMString? album;
24783 readonly attribute DOMString[]? genres;
24785 readonly attribute DOMString[]? artists;
24787 readonly attribute DOMString[]? composers;
24789 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
24791 readonly attribute DOMString? copyright;
24793 readonly attribute unsigned long bitrate;
24795 readonly attribute unsigned short? trackNumber;
24797 readonly attribute unsigned long duration;
24801 [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
24803 attribute <ref>SimpleCoordinates</ref>? geolocation;
24805 readonly attribute unsigned long width;
24807 readonly attribute unsigned long height;
24809 attribute <ref>ImageContentOrientation</ref> orientation;
24815 This API provides functionality to discover contents such as images, videos, music, or other.
24819 It is possible to search for specific contents using filters.
24820 The API also supports setting attributes of specific contents.
24823 For more information on the Content features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/mediacontent.htm">Content Guide</a>.
24830 <Enum name="ContentDirectoryStorageType" id="::Content::ContentDirectoryStorageType">
24831 <webidl> enum ContentDirectoryStorageType { "INTERNAL", "EXTERNAL" };</webidl>
24835 Defines whether a content directory is stored on internal or external storage (such as a removable memory card).
24842 <EnumValue stringvalue="INTERNAL">
24843 <webidl> "INTERNAL</webidl>
24845 <EnumValue stringvalue="EXTERNAL">
24846 <webidl> "EXTERNAL</webidl>
24849 <Enum name="ContentType" id="::Content::ContentType">
24850 <webidl> enum ContentType { "IMAGE", "VIDEO", "AUDIO", "OTHER" };</webidl>
24854 Defines the type of content such as image, video, audio and other.
24861 "OTHER" type is added since 2.1.
24864 <EnumValue stringvalue="IMAGE">
24865 <webidl> "IMAGE</webidl>
24867 <EnumValue stringvalue="VIDEO">
24868 <webidl> "VIDEO</webidl>
24870 <EnumValue stringvalue="AUDIO">
24871 <webidl> "AUDIO</webidl>
24873 <EnumValue stringvalue="OTHER">
24874 <webidl> "OTHER</webidl>
24877 <Enum name="AudioContentLyricsType" id="::Content::AudioContentLyricsType">
24878 <webidl> enum AudioContentLyricsType { "SYNCHRONIZED", "UNSYNCHRONIZED" };</webidl>
24882 Defines whether the lyric supplied with an audio file is time-synchronized or not.
24889 <EnumValue stringvalue="SYNCHRONIZED">
24890 <webidl> "SYNCHRONIZED</webidl>
24892 <EnumValue stringvalue="UNSYNCHRONIZED">
24893 <webidl> "UNSYNCHRONIZED</webidl>
24896 <Enum name="ImageContentOrientation" id="::Content::ImageContentOrientation">
24897 <webidl> enum ImageContentOrientation { "NORMAL", "FLIP_HORIZONTAL", "ROTATE_180", "FLIP_VERTICAL", "TRANSPOSE", "ROTATE_90", "TRANSVERSE", "ROTATE_270" };</webidl>
24901 Defines an orientation of an image.
24908 <EnumValue stringvalue="NORMAL">
24909 <webidl> "NORMAL</webidl>
24911 <EnumValue stringvalue="FLIP_HORIZONTAL">
24912 <webidl> "FLIP_HORIZONTAL</webidl>
24914 <EnumValue stringvalue="ROTATE_180">
24915 <webidl> "ROTATE_180</webidl>
24917 <EnumValue stringvalue="FLIP_VERTICAL">
24918 <webidl> "FLIP_VERTICAL</webidl>
24920 <EnumValue stringvalue="TRANSPOSE">
24921 <webidl> "TRANSPOSE</webidl>
24923 <EnumValue stringvalue="ROTATE_90">
24924 <webidl> "ROTATE_90</webidl>
24926 <EnumValue stringvalue="TRANSVERSE">
24927 <webidl> "TRANSVERSE</webidl>
24929 <EnumValue stringvalue="ROTATE_270">
24930 <webidl> "ROTATE_270</webidl>
24933 <Typedef name="ContentId" id="::Content::ContentId">
24934 <webidl> typedef DOMString ContentId;</webidl>
24937 Content identifier.
24943 <Type type="DOMString"/>
24945 <Typedef name="ContentDirectoryId" id="::Content::ContentDirectoryId">
24946 <webidl> typedef DOMString ContentDirectoryId;</webidl>
24949 Content directory identifier.
24955 <Type type="DOMString"/>
24957 <Interface name="ContentManagerObject" id="::Content::ContentManagerObject">
24958 <webidl> [NoInterfaceObject] interface ContentManagerObject {
24959 readonly attribute <ref>ContentManager</ref> content;
24963 Defines what is instantiated by the Tizen object.
24967 There is a <em>tizen.content </em>object that allows accessing the functionality of the Content module.
24974 <ExtendedAttributeList>
24975 <ExtendedAttribute name="NoInterfaceObject">
24976 <webidl>NoInterfaceObject</webidl>
24977 </ExtendedAttribute>
24978 </ExtendedAttributeList>
24979 <Attribute readonly="readonly" name="content" id="::Content::ContentManagerObject::content">
24980 <webidl> readonly attribute <ref>ContentManager</ref> content;</webidl>
24981 <Type name="ContentManager"/>
24984 <Implements name1="Tizen" name2="ContentManagerObject">
24985 <webidl> <ref>Tizen</ref> implements <ref>ContentManagerObject</ref>;</webidl>
24987 <Interface name="ContentManager" id="::Content::ContentManager">
24988 <webidl> [NoInterfaceObject] interface ContentManager {
24990 void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);
24992 void updateBatch(<ref>Content</ref>[] contents,
24993 optional <ref>SuccessCallback</ref>? successCallback,
24994 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24996 void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
24997 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
24999 void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25000 optional <ref>ErrorCallback</ref>? errorCallback,
25001 optional <ref>ContentDirectoryId</ref>? directoryId,
25002 optional <ref>AbstractFilter</ref>? filter,
25003 optional <ref>SortMode</ref>? sortMode,
25004 optional unsigned long? count,
25005 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
25008 void scanFile(DOMString contentURI,
25009 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25010 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
25012 void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);
25014 void unsetChangeListener() raises(<ref>WebAPIException</ref>);
25019 This interface provides operations to retrieve and manipulate contents.
25025 <ExtendedAttributeList>
25026 <ExtendedAttribute name="NoInterfaceObject">
25027 <webidl>NoInterfaceObject</webidl>
25028 </ExtendedAttribute>
25029 </ExtendedAttributeList>
25030 <Operation name="update" id="::Content::ContentManager::update">
25031 <webidl> void update(<ref>Content</ref> content) raises(<ref>WebAPIException</ref>);</webidl>
25034 Updates attributes of the content in content database synchronously.
25038 When an application has changed some attributes of a content, this method allows
25039 writing it back to the content database.
25049 http://tizen.org/privilege/content.write
25052 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25053 the attributes that can be changed.
25054 This API does not support updating the metadata of a file.
25056 <Code> // Assume the content is a Content object as a result of find method.
25057 // Check the description is editable, and then set a description.
25058 if (content.editableAttributes.indexOf("description") >= 0) {
25059 content.description = "Sample content";
25061 tizen.content.update(content);
25064 <Type type="void"/>
25066 <Argument name="content">
25069 The content to update.
25072 <Type name="Content"/>
25076 <RaiseException name="WebAPIException">
25079 with error type TypeMismatchError, if any input parameter
25080 is not compatible with the expected type for that parameter.
25083 with error type InvalidValuesError, if any of the input parameters
25084 contain an invalid value.
25087 with error type SecurityError, if the application does not have the privilege to call this method.
25090 with error type UnknownError in any other error case.
25096 <Operation name="updateBatch" id="::Content::ContentManager::updateBatch">
25097 <webidl> void updateBatch(<ref>Content</ref>[] contents,
25098 optional <ref>SuccessCallback</ref>? successCallback,
25099 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25102 Updates a batch of content attributes in the content database synchronously.
25106 When an application has changed any attributes in array of content, this method allows writing them
25107 back to the content database.
25110 The errorCallback can be launched with any of these error types:
25114 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25116 UnknownError: In any other error case. </li>
25126 http://tizen.org/privilege/content.write
25129 The <em>editableAttributes </em>in <em>Content </em>interface indicates
25130 the attributes that can be changed.
25131 This API does not support updating the metadata of a file.
25133 <Code> // The following example increases rating of an content by 1
25135 function errorCB(err) {
25136 console.log( 'The following error occurred: ' + err.name);
25139 function successCB() {
25140 console.log('Attributes set successfully');
25143 // Assume the content is a Content object as a result of find method.
25144 // Check the rating is editable, and then increase by 1.
25145 if (content.editableAttributes.indexOf("rating") >= 0) {
25148 tizen.content.updateBatch([content], successCB, errorCB);
25151 <Type type="void"/>
25153 <Argument name="contents">
25156 Array of content to change.
25159 <Type type="array">
25160 <Type name="Content"/>
25163 <Argument optional="optional" name="successCallback">
25166 Function called when attributes have been changed.
25169 <Type name="SuccessCallback" nullable="nullable"/>
25171 <Argument optional="optional" name="errorCallback">
25174 Function called when an error has occurred.
25177 <Type name="ErrorCallback" nullable="nullable"/>
25181 <RaiseException name="WebAPIException">
25184 with error type TypeMismatchError, if the input parameter
25185 is not compatible with the expected type for that parameter.
25188 with error type SecurityError, if the application does not have the privilege to call this method.
25194 <Operation name="getDirectories" id="::Content::ContentManager::getDirectories">
25195 <webidl> void getDirectories(<ref>ContentDirectoryArraySuccessCallback</ref> successCallback,
25196 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25199 Gets a list of content directory.
25203 This method returns (via callback) a list of content directory objects. To obtain a list of contents
25204 in a specific directory, use find() method with the directory ID.
25207 The errorCallback is launched with this error type:
25211 UnknownError: In any other error case. </li>
25217 <Code> // The following example retrieves content directories in the storage.
25219 function errorCB(err) {
25220 console.log( 'The following error occurred: ' + err.name);
25223 function printDirectory(directory, index, directories) {
25224 console.log('directoryURI: ' + directory.directoryURI + ' Title: ' + directory.title);
25226 function getDirectoriesCB(directories) {
25227 directories.forEach(printDirectory);
25230 tizen.content.getDirectories(getDirectoriesCB, errorCB);
25233 <Type type="void"/>
25235 <Argument name="successCallback">
25238 Function called when content directories have been retrieved successfully.
25241 <Type name="ContentDirectoryArraySuccessCallback"/>
25243 <Argument optional="optional" name="errorCallback">
25246 Function called when an error has occurred.
25249 <Type name="ErrorCallback" nullable="nullable"/>
25253 <RaiseException name="WebAPIException">
25256 with error type TypeMismatchError, if the input parameter
25257 is not compatible with the expected type for that parameter.
25263 <Operation name="find" id="::Content::ContentManager::find">
25264 <webidl> void find(<ref>ContentArraySuccessCallback</ref> successCallback,
25265 optional <ref>ErrorCallback</ref>? errorCallback,
25266 optional <ref>ContentDirectoryId</ref>? directoryId,
25267 optional <ref>AbstractFilter</ref>? filter,
25268 optional <ref>SortMode</ref>? sortMode,
25269 optional unsigned long? count,
25270 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
25273 Finds contents that satisfy the conditions set by a filter.
25277 This method allows searching based on a supplied filter. For more detail on AbstractFilter, see
25278 <a href="../../org.tizen.web.device.apireference/tizen/tizen.html#::Tizen::AbstractFilter">Tizen</a> module. The filter allows precise searching such
25279 as "return all songs by artist U2, ordered by name".
25282 The errorCallback can be launched with these error types:
25286 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
25288 UnknownError: In any other error case. </li>
25298 http://tizen.org/privilege/content.read
25300 <Code> // The following example retrieves all songs from the album "The Joshua Tree", by artist "U2", ordered by the track number.
25303 var sortMode = new tizen.SortMode("trackNumber", "ASC");
25304 var artistFilter = new tizen.AttributeFilter("artists", "EXACTLY", "U2");
25305 var albumFilter = new tizen.AttributeFilter("album", "EXACTLY", "The Joshua Tree");
25306 var filter = new tizen.CompositeFilter("INTERSECTION", [albumFilter, artistFilter]);
25308 function errorCB(err) {
25309 console.log( 'The following error occurred: ' + err.name);
25312 function printContent(content, index, contents) {
25313 console.log('Track: ' + content.trackNumber + ' Title: ' + content.title + 'Duration: ' + content.duration + 'URL: ' + content.contentURI + 'MIME: ' + content.mimeType);
25316 function findCB(contents) {
25317 console.log('The Joshua Tree by U2:');
25318 contents.forEach(printContent);
25319 // Increase the offset as much as the count and then find content again.
25320 if (contents.length == count) {
25322 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25326 tizen.content.find(findCB, errorCB, null, filter, sortMode, count, offset);
25330 <Type type="void"/>
25332 <Argument name="successCallback">
25335 Function called when a content have been retrieved.
25338 <Type name="ContentArraySuccessCallback"/>
25340 <Argument optional="optional" name="errorCallback">
25343 Function called when an error has occurred.
25346 <Type name="ErrorCallback" nullable="nullable"/>
25348 <Argument optional="optional" name="directoryId">
25351 Directory ID that is use to select content to retrieve in a specified directory.
25354 <Type name="ContentDirectoryId" nullable="nullable"/>
25356 <Argument optional="optional" name="filter">
25359 Filter that is used to select content to retrieve.
25362 <Type name="AbstractFilter" nullable="nullable"/>
25364 <Argument optional="optional" name="sortMode">
25367 Used to determine the sort order in which the content are returned.
25370 <Type name="SortMode" nullable="nullable"/>
25372 <Argument optional="optional" name="count">
25375 Maximum amount of content to return.
25378 <Type type="unsigned long" nullable="nullable"/>
25380 <Argument optional="optional" name="offset">
25383 Offset of the result set.
25386 <Type type="unsigned long" nullable="nullable"/>
25390 <RaiseException name="WebAPIException">
25393 with error type TypeMismatchError, if the input parameter
25394 is not compatible with the expected type for that parameter.
25397 with error type SecurityError, if the application does not have the privilege to call this method.
25400 with error type NotSupportedError, if this feature is not supported.
25406 <Operation name="scanFile" id="::Content::ContentManager::scanFile">
25407 <webidl> void scanFile(DOMString contentURI,
25408 optional <ref>ContentScanSuccessCallback</ref>? successCallback,
25409 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
25412 Scan a file to create or update a content in the content database.
25416 When an application creates or updates a content, this method allows scan it
25417 to insert or update the content in the content database.
25427 http://tizen.org/privilege/content.write
25429 <Code> // The following example scan 'tizen.jpg' in media directory
25431 function errorCB(err) {
25432 console.log( 'The following error occurred: ' + err.name);
25435 function successCB(path) {
25436 console.log('scanning is completed');
25439 var path = "file:///opt/usr/media/tizen.jpg";
25440 tizen.content.scanFile(path, successCB, errorCB);
25444 <Type type="void"/>
25446 <Argument name="contentURI">
25449 The URI of content to scan.
25452 <Type type="DOMString"/>
25454 <Argument optional="optional" name="successCallback">
25457 Function called when scanning has been completed.
25460 <Type name="ContentScanSuccessCallback" nullable="nullable"/>
25462 <Argument optional="optional" name="errorCallback">
25465 Function called when an error has occurred.
25468 <Type name="ErrorCallback" nullable="nullable"/>
25472 <RaiseException name="WebAPIException">
25475 with error type TypeMismatchError, if any input parameter
25476 is not compatible with the expected type for that parameter.
25479 with error type InvalidValuesError, if any of the input parameters
25480 contain an invalid value.
25483 with error type SecurityError, if the application does not have the privilege to call this method.
25486 with error type UnknownError in any other error case.
25492 <Operation name="setChangeListener" id="::Content::ContentManager::setChangeListener">
25493 <webidl> void setChangeListener(<ref>ContentChangeCallback</ref> changeCallback) raises(<ref>WebAPIException</ref>);</webidl>
25496 Sets a listener to receive notifications about content changes.
25505 http://tizen.org/privilege/content.read
25507 <Code> var listener= {
25508 oncontentadded: function(content) {
25509 console.log(content.contentURI + ' content is added');
25511 oncontentupdated: function(content) {
25512 console.log(content.contentURI + ' content is updated');
25514 oncontentremoved: function(id) {
25515 console.log(id + ' is removed');
25519 // Registers to be notified when the content changes
25520 tizen.content.setChangeListener(listener);
25524 <Type type="void"/>
25526 <Argument name="changeCallback">
25529 A callback to be invoked for receiving content change notification.
25532 <Type name="ContentChangeCallback"/>
25536 <RaiseException name="WebAPIException">
25539 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
25542 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
25545 with error type SecurityError, if the application does not have the privilege to call this method.
25548 with error type UnknownError, if any other error occurs.
25554 <Operation name="unsetChangeListener" id="::Content::ContentManager::unsetChangeListener">
25555 <webidl> void unsetChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
25558 Unsets the listener to unsubscribes from receiving notification for any content changes.
25567 http://tizen.org/privilege/content.read
25569 <Code> tizen.content.unsetChangeListener();
25573 <Type type="void"/>
25576 <RaiseException name="WebAPIException">
25579 with error type SecurityError, if the application does not have the privilege to call this method.
25582 with error type UnknownError if any other error occurs.
25589 <Interface name="ContentArraySuccessCallback" id="::Content::ContentArraySuccessCallback">
25590 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentArraySuccessCallback {
25591 void onsuccess(<ref>Content</ref>[] contents);
25595 The callback function used to return a list of content objects.
25601 <ExtendedAttributeList>
25602 <ExtendedAttribute name="Callback" value="FunctionOnly">
25603 <webidl>Callback</webidl>
25604 </ExtendedAttribute>
25605 <ExtendedAttribute name="NoInterfaceObject">
25606 <webidl> NoInterfaceObject</webidl>
25607 </ExtendedAttribute>
25608 </ExtendedAttributeList>
25609 <Operation name="onsuccess" id="::Content::ContentArraySuccessCallback::onsuccess">
25610 <webidl> void onsuccess(<ref>Content</ref>[] contents);</webidl>
25613 Called when the list of content is retrieved successfully.
25619 <Type type="void"/>
25621 <Argument name="contents">
25624 The array of <em>Content </em>objects.
25627 <Type type="array">
25628 <Type name="Content"/>
25634 <Interface name="ContentDirectoryArraySuccessCallback" id="::Content::ContentDirectoryArraySuccessCallback">
25635 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentDirectoryArraySuccessCallback {
25636 void onsuccess(<ref>ContentDirectory</ref>[] directories);
25640 The callback function used to return a list of ContentDirectory objects.
25646 <ExtendedAttributeList>
25647 <ExtendedAttribute name="Callback" value="FunctionOnly">
25648 <webidl>Callback</webidl>
25649 </ExtendedAttribute>
25650 <ExtendedAttribute name="NoInterfaceObject">
25651 <webidl> NoInterfaceObject</webidl>
25652 </ExtendedAttribute>
25653 </ExtendedAttributeList>
25654 <Operation name="onsuccess" id="::Content::ContentDirectoryArraySuccessCallback::onsuccess">
25655 <webidl> void onsuccess(<ref>ContentDirectory</ref>[] directories);</webidl>
25658 Called when the list of directory is retrieved successfully.
25664 <Type type="void"/>
25666 <Argument name="directories">
25669 The array of <em>ContentDirectory </em>objects.
25672 <Type type="array">
25673 <Type name="ContentDirectory"/>
25679 <Interface name="ContentScanSuccessCallback" id="::Content::ContentScanSuccessCallback">
25680 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ContentScanSuccessCallback {
25681 void onsuccess(DOMString contentURI);
25685 The callback function used to return a content to scan has been completed.
25691 <ExtendedAttributeList>
25692 <ExtendedAttribute name="Callback" value="FunctionOnly">
25693 <webidl>Callback</webidl>
25694 </ExtendedAttribute>
25695 <ExtendedAttribute name="NoInterfaceObject">
25696 <webidl> NoInterfaceObject</webidl>
25697 </ExtendedAttribute>
25698 </ExtendedAttributeList>
25699 <Operation name="onsuccess" id="::Content::ContentScanSuccessCallback::onsuccess">
25700 <webidl> void onsuccess(DOMString contentURI);</webidl>
25703 Called when the scanning has been completed.
25709 <Type type="void"/>
25711 <Argument name="contentURI">
25714 The URI of <em>Content </em>objects.
25717 <Type type="DOMString"/>
25722 <Interface name="ContentChangeCallback" id="::Content::ContentChangeCallback">
25723 <webidl> [Callback, NoInterfaceObject] interface ContentChangeCallback {
25724 void oncontentadded(<ref>Content</ref> content);
25726 void oncontentupdated(<ref>Content</ref> content);
25728 void oncontentremoved(<ref>ContentId</ref> id);
25732 This interface specifies a set of methods that are invoked every time a content change occurs.
25738 <ExtendedAttributeList>
25739 <ExtendedAttribute name="Callback">
25740 <webidl>Callback</webidl>
25741 </ExtendedAttribute>
25742 <ExtendedAttribute name="NoInterfaceObject">
25743 <webidl> NoInterfaceObject</webidl>
25744 </ExtendedAttribute>
25745 </ExtendedAttributeList>
25746 <Operation name="oncontentadded" id="::Content::ContentChangeCallback::oncontentadded">
25747 <webidl> void oncontentadded(<ref>Content</ref> content);</webidl>
25750 Called when content is added.
25756 <Type type="void"/>
25758 <Argument name="content">
25761 The content to add.
25764 <Type name="Content"/>
25768 <Operation name="oncontentupdated" id="::Content::ContentChangeCallback::oncontentupdated">
25769 <webidl> void oncontentupdated(<ref>Content</ref> content);</webidl>
25772 Called when content is updated.
25778 <Type type="void"/>
25780 <Argument name="content">
25783 The content to update.
25786 <Type name="Content"/>
25790 <Operation name="oncontentremoved" id="::Content::ContentChangeCallback::oncontentremoved">
25791 <webidl> void oncontentremoved(<ref>ContentId</ref> id);</webidl>
25794 Called when content is removed.
25800 <Type type="void"/>
25802 <Argument name="id">
25805 The id of content to remove.
25808 <Type name="ContentId"/>
25813 <Interface name="ContentDirectory" id="::Content::ContentDirectory">
25814 <webidl> [NoInterfaceObject] interface ContentDirectory {
25816 readonly attribute <ref>ContentDirectoryId</ref> id;
25818 readonly attribute DOMString directoryURI;
25820 readonly attribute DOMString title;
25822 readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;
25824 readonly attribute Date? modifiedDate;
25829 This interface that provides access to properties of a content directory.
25835 <ExtendedAttributeList>
25836 <ExtendedAttribute name="NoInterfaceObject">
25837 <webidl>NoInterfaceObject</webidl>
25838 </ExtendedAttribute>
25839 </ExtendedAttributeList>
25840 <Attribute readonly="readonly" name="id" id="::Content::ContentDirectory::id">
25841 <webidl> readonly attribute <ref>ContentDirectoryId</ref> id;</webidl>
25844 The opaque content directory identifier.
25850 <Type name="ContentDirectoryId"/>
25852 <Attribute readonly="readonly" name="directoryURI" id="::Content::ContentDirectory::directoryURI">
25853 <webidl> readonly attribute DOMString directoryURI;</webidl>
25856 The directory path on the device.
25862 <Type type="DOMString"/>
25864 <Attribute readonly="readonly" name="title" id="::Content::ContentDirectory::title">
25865 <webidl> readonly attribute DOMString title;</webidl>
25868 The directory name.
25874 <Type type="DOMString"/>
25876 <Attribute readonly="readonly" name="storageType" id="::Content::ContentDirectory::storageType">
25877 <webidl> readonly attribute <ref>ContentDirectoryStorageType</ref> storageType;</webidl>
25880 The type of a device storage.
25886 <Type name="ContentDirectoryStorageType"/>
25888 <Attribute readonly="readonly" name="modifiedDate" id="::Content::ContentDirectory::modifiedDate">
25889 <webidl> readonly attribute Date? modifiedDate;</webidl>
25892 The last modified date for a directory.
25898 <Type type="Date" nullable="nullable"/>
25901 <Interface name="Content" id="::Content::Content">
25902 <webidl> [NoInterfaceObject] interface Content {
25904 readonly attribute DOMString[] editableAttributes;
25906 readonly attribute <ref>ContentId</ref> id;
25908 attribute DOMString name;
25910 readonly attribute <ref>ContentType</ref> type;
25912 readonly attribute DOMString mimeType;
25914 readonly attribute DOMString title;
25916 readonly attribute DOMString contentURI;
25918 readonly attribute DOMString[]? thumbnailURIs;
25920 readonly attribute Date? releaseDate;
25922 readonly attribute Date? modifiedDate;
25924 readonly attribute unsigned long size;
25926 attribute DOMString? description;
25928 attribute unsigned long rating;
25932 This interface provides access to properties of a content.
25938 <ExtendedAttributeList>
25939 <ExtendedAttribute name="NoInterfaceObject">
25940 <webidl>NoInterfaceObject</webidl>
25941 </ExtendedAttribute>
25942 </ExtendedAttributeList>
25943 <Attribute readonly="readonly" name="editableAttributes" id="::Content::Content::editableAttributes">
25944 <webidl> readonly attribute DOMString[] editableAttributes;</webidl>
25947 The list of attributes that can be editable to the local backend using update or updateBatch method.
25953 <Type type="array">
25954 <Type type="DOMString"/>
25957 <Attribute readonly="readonly" name="id" id="::Content::Content::id">
25958 <webidl> readonly attribute <ref>ContentId</ref> id;</webidl>
25961 The opaque content identifier.
25967 <Type name="ContentId"/>
25969 <Attribute name="name" id="::Content::Content::name">
25970 <webidl> attribute DOMString name;</webidl>
25973 The content name. The initial value is the file name of the content.
25979 <Type type="DOMString"/>
25981 <Attribute readonly="readonly" name="type" id="::Content::Content::type">
25982 <webidl> readonly attribute <ref>ContentType</ref> type;</webidl>
25991 <Type name="ContentType"/>
25993 <Attribute readonly="readonly" name="mimeType" id="::Content::Content::mimeType">
25994 <webidl> readonly attribute DOMString mimeType;</webidl>
25997 The content MIME type.
26003 <Type type="DOMString"/>
26005 <Attribute readonly="readonly" name="title" id="::Content::Content::title">
26006 <webidl> readonly attribute DOMString title;</webidl>
26015 <Type type="DOMString"/>
26017 <Attribute readonly="readonly" name="contentURI" id="::Content::Content::contentURI">
26018 <webidl> readonly attribute DOMString contentURI;</webidl>
26021 The URI to access the content.
26027 <Type type="DOMString"/>
26029 <Attribute readonly="readonly" name="thumbnailURIs" id="::Content::Content::thumbnailURIs">
26030 <webidl> readonly attribute DOMString[]? thumbnailURIs;</webidl>
26033 The array of content thumbnails URIs.
26039 <Type type="array" nullable="nullable">
26040 <Type type="DOMString"/>
26043 <Attribute readonly="readonly" name="releaseDate" id="::Content::Content::releaseDate">
26044 <webidl> readonly attribute Date? releaseDate;</webidl>
26047 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.
26053 <Type type="Date" nullable="nullable"/>
26055 <Attribute readonly="readonly" name="modifiedDate" id="::Content::Content::modifiedDate">
26056 <webidl> readonly attribute Date? modifiedDate;</webidl>
26059 The last modified date for a content.
26065 <Type type="Date" nullable="nullable"/>
26067 <Attribute readonly="readonly" name="size" id="::Content::Content::size">
26068 <webidl> readonly attribute unsigned long size;</webidl>
26071 The file size of the content in bytes.
26077 <Type type="unsigned long"/>
26079 <Attribute name="description" id="::Content::Content::description">
26080 <webidl> attribute DOMString? description;</webidl>
26083 The content description.
26089 <Type type="DOMString" nullable="nullable"/>
26091 <Attribute name="rating" id="::Content::Content::rating">
26092 <webidl> attribute unsigned long rating;</webidl>
26095 The content rating and this value can vary from <var>0 </var>to <var>10</var>.
26101 <Type type="unsigned long"/>
26104 <Interface name="VideoContent" id="::Content::VideoContent">
26105 <webidl> [NoInterfaceObject] interface VideoContent : <ref>Content</ref> {
26107 attribute <ref>SimpleCoordinates</ref>? geolocation;
26109 readonly attribute DOMString? album;
26111 readonly attribute DOMString[]? artists;
26113 readonly attribute unsigned long duration;
26115 readonly attribute unsigned long width;
26117 readonly attribute unsigned long height;
26122 This interface extends a basic <em>Content </em>object with video-specific attributes.
26128 <ExtendedAttributeList>
26129 <ExtendedAttribute name="NoInterfaceObject">
26130 <webidl>NoInterfaceObject</webidl>
26131 </ExtendedAttribute>
26132 </ExtendedAttributeList>
26133 <InterfaceInheritance>
26134 <Name name="Content"/>
26135 </InterfaceInheritance>
26136 <Attribute name="geolocation" id="::Content::VideoContent::geolocation">
26137 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26140 The geographical location where the video was made.
26146 <Type name="SimpleCoordinates" nullable="nullable"/>
26148 <Attribute readonly="readonly" name="album" id="::Content::VideoContent::album">
26149 <webidl> readonly attribute DOMString? album;</webidl>
26152 The album name to which the video belongs.
26158 <Type type="DOMString" nullable="nullable"/>
26160 <Attribute readonly="readonly" name="artists" id="::Content::VideoContent::artists">
26161 <webidl> readonly attribute DOMString[]? artists;</webidl>
26164 The list of artists who created the video.
26170 <Type type="array" nullable="nullable">
26171 <Type type="DOMString"/>
26174 <Attribute readonly="readonly" name="duration" id="::Content::VideoContent::duration">
26175 <webidl> readonly attribute unsigned long duration;</webidl>
26178 The video duration in milliseconds.
26184 <Type type="unsigned long"/>
26186 <Attribute readonly="readonly" name="width" id="::Content::VideoContent::width">
26187 <webidl> readonly attribute unsigned long width;</webidl>
26190 The width of a video in pixels.
26196 <Type type="unsigned long"/>
26198 <Attribute readonly="readonly" name="height" id="::Content::VideoContent::height">
26199 <webidl> readonly attribute unsigned long height;</webidl>
26202 The height of the video in pixels.
26208 <Type type="unsigned long"/>
26211 <Interface name="AudioContentLyrics" id="::Content::AudioContentLyrics">
26212 <webidl> [NoInterfaceObject] interface AudioContentLyrics {
26214 readonly attribute <ref>AudioContentLyricsType</ref> type;
26216 readonly attribute unsigned long[] timestamps;
26218 readonly attribute DOMString[] texts;
26222 This interface provides lyrics for music.
26228 <ExtendedAttributeList>
26229 <ExtendedAttribute name="NoInterfaceObject">
26230 <webidl>NoInterfaceObject</webidl>
26231 </ExtendedAttribute>
26232 </ExtendedAttributeList>
26233 <Attribute readonly="readonly" name="type" id="::Content::AudioContentLyrics::type">
26234 <webidl> readonly attribute <ref>AudioContentLyricsType</ref> type;</webidl>
26237 The type of lyrics, that is, whether they are synchronized with the music or not.
26243 <Type name="AudioContentLyricsType"/>
26245 <Attribute readonly="readonly" name="timestamps" id="::Content::AudioContentLyrics::timestamps">
26246 <webidl> readonly attribute unsigned long[] timestamps;</webidl>
26249 The array of timestamps in milliseconds for lyrics.
26253 If the lyrics are not synchronized (if there is no time information for the lyrics) the array is undefined.
26260 <Type type="array">
26261 <Type type="unsigned long"/>
26264 <Attribute readonly="readonly" name="texts" id="::Content::AudioContentLyrics::texts">
26265 <webidl> readonly attribute DOMString[] texts;</webidl>
26268 The array of lyric snippets.
26272 If the lyrics are not synchronized, the array has only one member with full lyrics.
26279 <Type type="array">
26280 <Type type="DOMString"/>
26284 <Interface name="AudioContent" id="::Content::AudioContent">
26285 <webidl> [NoInterfaceObject] interface AudioContent : <ref>Content</ref> {
26287 readonly attribute DOMString? album;
26289 readonly attribute DOMString[]? genres;
26291 readonly attribute DOMString[]? artists;
26293 readonly attribute DOMString[]? composers;
26295 readonly attribute <ref>AudioContentLyrics</ref>? lyrics;
26297 readonly attribute DOMString? copyright;
26299 readonly attribute unsigned long bitrate;
26301 readonly attribute unsigned short? trackNumber;
26303 readonly attribute unsigned long duration;
26308 This interface extends a basic <em>Content </em>object with audio-specific attributes.
26314 <ExtendedAttributeList>
26315 <ExtendedAttribute name="NoInterfaceObject">
26316 <webidl>NoInterfaceObject</webidl>
26317 </ExtendedAttribute>
26318 </ExtendedAttributeList>
26319 <InterfaceInheritance>
26320 <Name name="Content"/>
26321 </InterfaceInheritance>
26322 <Attribute readonly="readonly" name="album" id="::Content::AudioContent::album">
26323 <webidl> readonly attribute DOMString? album;</webidl>
26326 The album name to which the audio belongs.
26332 <Type type="DOMString" nullable="nullable"/>
26334 <Attribute readonly="readonly" name="genres" id="::Content::AudioContent::genres">
26335 <webidl> readonly attribute DOMString[]? genres;</webidl>
26338 The list of genres to which the audio belongs.
26344 <Type type="array" nullable="nullable">
26345 <Type type="DOMString"/>
26348 <Attribute readonly="readonly" name="artists" id="::Content::AudioContent::artists">
26349 <webidl> readonly attribute DOMString[]? artists;</webidl>
26352 The list of artists who created the audio.
26358 <Type type="array" nullable="nullable">
26359 <Type type="DOMString"/>
26362 <Attribute readonly="readonly" name="composers" id="::Content::AudioContent::composers">
26363 <webidl> readonly attribute DOMString[]? composers;</webidl>
26366 The list of composers for the music.
26372 <Type type="array" nullable="nullable">
26373 <Type type="DOMString"/>
26376 <Attribute readonly="readonly" name="lyrics" id="::Content::AudioContent::lyrics">
26377 <webidl> readonly attribute <ref>AudioContentLyrics</ref>? lyrics;</webidl>
26380 The lyrics of a song in an audio file.
26386 <Type name="AudioContentLyrics" nullable="nullable"/>
26388 <Attribute readonly="readonly" name="copyright" id="::Content::AudioContent::copyright">
26389 <webidl> readonly attribute DOMString? copyright;</webidl>
26392 The copyright information.
26398 <Type type="DOMString" nullable="nullable"/>
26400 <Attribute readonly="readonly" name="bitrate" id="::Content::AudioContent::bitrate">
26401 <webidl> readonly attribute unsigned long bitrate;</webidl>
26404 The audio bitrate in bits per second. By default, this value is 0.
26410 <Type type="unsigned long"/>
26412 <Attribute readonly="readonly" name="trackNumber" id="::Content::AudioContent::trackNumber">
26413 <webidl> readonly attribute unsigned short? trackNumber;</webidl>
26416 The track number if the audio belongs to an album.
26422 <Type type="unsigned short" nullable="nullable"/>
26424 <Attribute readonly="readonly" name="duration" id="::Content::AudioContent::duration">
26425 <webidl> readonly attribute unsigned long duration;</webidl>
26428 The audio duration in milliseconds.
26434 <Type type="unsigned long"/>
26437 <Interface name="ImageContent" id="::Content::ImageContent">
26438 <webidl> [NoInterfaceObject] interface ImageContent : <ref>Content</ref> {
26440 attribute <ref>SimpleCoordinates</ref>? geolocation;
26442 readonly attribute unsigned long width;
26444 readonly attribute unsigned long height;
26446 attribute <ref>ImageContentOrientation</ref> orientation;
26451 This interface extends a basic <em>Content </em>object with image-specific attributes.
26457 <ExtendedAttributeList>
26458 <ExtendedAttribute name="NoInterfaceObject">
26459 <webidl>NoInterfaceObject</webidl>
26460 </ExtendedAttribute>
26461 </ExtendedAttributeList>
26462 <InterfaceInheritance>
26463 <Name name="Content"/>
26464 </InterfaceInheritance>
26465 <Attribute name="geolocation" id="::Content::ImageContent::geolocation">
26466 <webidl> attribute <ref>SimpleCoordinates</ref>? geolocation;</webidl>
26469 The geographical location where the image has been made.
26475 <Type name="SimpleCoordinates" nullable="nullable"/>
26477 <Attribute readonly="readonly" name="width" id="::Content::ImageContent::width">
26478 <webidl> readonly attribute unsigned long width;</webidl>
26481 The width of an image in pixels.
26487 <Type type="unsigned long"/>
26489 <Attribute readonly="readonly" name="height" id="::Content::ImageContent::height">
26490 <webidl> readonly attribute unsigned long height;</webidl>
26493 The height of an image in pixels.
26499 <Type type="unsigned long"/>
26501 <Attribute name="orientation" id="::Content::ImageContent::orientation">
26502 <webidl> attribute <ref>ImageContentOrientation</ref> orientation;</webidl>
26505 The image orientation.
26511 <Type name="ImageContentOrientation"/>
26515 <Module name="DataControl" id="::DataControl">
26516 <webidl>module DataControl {
26517 enum DataType { "MAP", "SQL"};
26519 [NoInterfaceObject] interface DataControlManagerObject {
26520 readonly attribute <ref>DataControlManager</ref> datacontrol;
26522 <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;
26525 [NoInterfaceObject] interface DataControlManager {
26526 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26530 [NoInterfaceObject] interface DataControlConsumerObject {
26531 readonly attribute <ref>DataType</ref> type;
26532 readonly attribute DOMString providerId;
26533 readonly attribute DOMString dataId;
26537 [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26538 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26539 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26540 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26542 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26543 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26544 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26546 void remove(unsigned long reqId, DOMString where,
26547 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26548 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26551 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26552 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26553 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26556 [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26557 void addValue(unsigned long reqId, DOMString key, DOMString value,
26558 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26559 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26561 void removeValue(unsigned long reqId, DOMString key, DOMString value,
26562 <ref>DataControlSuccessCallback</ref> successCallback,
26563 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26565 void getValue(unsigned long reqId, DOMString key,
26566 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
26567 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26569 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
26570 <ref>DataControlSuccessCallback</ref> successCallback,
26571 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26575 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
26576 void onsuccess(unsigned long reqId);
26580 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
26581 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
26585 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
26586 void onsuccess(unsigned long reqId, long insertRowId);
26591 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
26592 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
26596 [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
26597 void onsuccess(DOMString[] values, unsigned long reqid);
26601 dictionary RowData {
26602 DOMString[] columns;
26603 DOMString[] values;
26608 This specification defines a DataControl API for applications.
26612 The DataControl functionality provides a way to access specific data that is exported by other applications.
26615 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.
26622 <Enum name="DataType" id="::DataControl::DataType">
26623 <webidl> enum DataType { "MAP", "SQL"};</webidl>
26632 <EnumValue stringvalue="MAP">
26633 <webidl> "MAP</webidl>
26635 <EnumValue stringvalue="SQL">
26636 <webidl> "SQL</webidl>
26639 <Interface name="DataControlManagerObject" id="::DataControl::DataControlManagerObject">
26640 <webidl> [NoInterfaceObject] interface DataControlManagerObject {
26641 readonly attribute <ref>DataControlManager</ref> datacontrol;
26645 Defines what is instantiated in the <em>Tizen</em> object.
26649 There is a <em>tizen.datacontrol</em> object that allows access to the
26657 <ExtendedAttributeList>
26658 <ExtendedAttribute name="NoInterfaceObject">
26659 <webidl>NoInterfaceObject</webidl>
26660 </ExtendedAttribute>
26661 </ExtendedAttributeList>
26662 <Attribute readonly="readonly" name="datacontrol" id="::DataControl::DataControlManagerObject::datacontrol">
26663 <webidl> readonly attribute <ref>DataControlManager</ref> datacontrol;</webidl>
26664 <Type name="DataControlManager"/>
26667 <Implements name1="Tizen" name2="DataControlManagerObject">
26668 <webidl> <ref>Tizen</ref> implements <ref>DataControlManagerObject</ref>;</webidl>
26670 <Interface name="DataControlManager" id="::DataControl::DataControlManager">
26671 <webidl> [NoInterfaceObject] interface DataControlManager {
26672 <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);
26676 This interface provides access to the <em>DataControlManager </em>object.
26682 <ExtendedAttributeList>
26683 <ExtendedAttribute name="NoInterfaceObject">
26684 <webidl>NoInterfaceObject</webidl>
26685 </ExtendedAttribute>
26686 </ExtendedAttributeList>
26687 <Operation name="getDataControlConsumer" id="::DataControl::DataControlManager::getDataControlConsumer">
26688 <webidl> <ref>DataControlConsumerObject</ref> getDataControlConsumer(DOMString providerId, DOMString dataId, <ref>DataType</ref> type) raises(<ref>WebAPIException</ref>);</webidl>
26691 Gets <em>DataControlConsumerObject</em> with a given DataType.
26700 http://tizen.org/privilege/datacontrol.consumer
26702 <Code> //The data provider, a native application, should be pre-installed and launched.
26703 //The same provider id should be defined for the use of this API between a native application(provider) and a web application(consumer).
26704 //In this example, DictionaryDataControlProvider native sample application is used as a data control provider.
26706 //Gets SQL type DataControlConsumerObject
26708 var globalSQLConsumer = tizen.datacontrol.getDataControlConsumer(
26709 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "SQL");
26711 console.log (err.name +": " + err.message);
26713 // Gets MAP type DataControlConsumerObject
26715 globalMappedConsumer = tizen.datacontrol.getDataControlConsumer(
26716 "http://tizen.org/datacontrol/provider/DictionaryDataControlProvider", "Dictionary", "MAP");
26718 console.log (err.name +": " + err.message);
26722 <Type name="DataControlConsumerObject">
26725 DataControlConsumerObject The local <em>DataControlConsumerObject</em>.
26730 <Argument name="providerId">
26733 A provider ID to use and it should be shared between DataControl provider and DataControl consumer.
26736 <Type type="DOMString"/>
26738 <Argument name="dataId">
26741 A string for identifying a specific data.
26744 <Type type="DOMString"/>
26746 <Argument name="type">
26749 The DataType to use.
26752 <Type name="DataType"/>
26756 <RaiseException name="WebAPIException">
26759 with error type TypeMismatchError, if parameter type is mismatched.
26762 with error type SecurityError, if the application does not have the privilege to call this method.
26765 with error type UnknownError, if any other error occurs.
26772 <Interface name="DataControlConsumerObject" id="::DataControl::DataControlConsumerObject">
26773 <webidl> [NoInterfaceObject] interface DataControlConsumerObject {
26774 readonly attribute <ref>DataType</ref> type;
26775 readonly attribute DOMString providerId;
26776 readonly attribute DOMString dataId;
26780 This interface provides common attributes for other derived DataControlCunsumerObject.
26786 <ExtendedAttributeList>
26787 <ExtendedAttribute name="NoInterfaceObject">
26788 <webidl>NoInterfaceObject</webidl>
26789 </ExtendedAttribute>
26790 </ExtendedAttributeList>
26791 <Attribute readonly="readonly" name="type" id="::DataControl::DataControlConsumerObject::type">
26792 <webidl> readonly attribute <ref>DataType</ref> type;</webidl>
26795 An attribute to store the DataType.
26801 <Type name="DataType"/>
26803 <Attribute readonly="readonly" name="providerId" id="::DataControl::DataControlConsumerObject::providerId">
26804 <webidl> readonly attribute DOMString providerId;</webidl>
26807 An attribute to hold a provider identifier of the application whom it shares the DataControl with.
26808 This attribute should be known to users who want to interact with application to provide.
26814 <Type type="DOMString"/>
26816 <Attribute readonly="readonly" name="dataId" id="::DataControl::DataControlConsumerObject::dataId">
26817 <webidl> readonly attribute DOMString dataId;</webidl>
26820 The dataId identifies specific data, usually a database table to process(insert, delete, update).
26821 The string consists of one or more components, separated by a slash('/').
26827 <Type type="DOMString"/>
26830 <Interface name="SQLDataControlConsumer" id="::DataControl::SQLDataControlConsumer">
26831 <webidl> [NoInterfaceObject] interface SQLDataControlConsumer : <ref>DataControlConsumerObject</ref> {
26832 void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26833 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26834 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26836 void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26837 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26838 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26840 void remove(unsigned long reqId, DOMString where,
26841 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26842 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
26845 void select(unsigned long reqId, DOMString[] columns, DOMString where,
26846 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
26847 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);
26851 This interface defines SQL data type operatiors.
26857 <ExtendedAttributeList>
26858 <ExtendedAttribute name="NoInterfaceObject">
26859 <webidl>NoInterfaceObject</webidl>
26860 </ExtendedAttribute>
26861 </ExtendedAttributeList>
26862 <InterfaceInheritance>
26863 <Name name="DataControlConsumerObject"/>
26864 </InterfaceInheritance>
26865 <Operation name="insert" id="::DataControl::SQLDataControlConsumer::insert">
26866 <webidl> void insert(unsigned long reqId, <ref>RowData</ref> insertionData,
26867 optional <ref>DataControlInsertSuccessCallback</ref>? successCallback,
26868 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26871 Inserts new rows into a table owned by an SQL-type data control provider.
26880 http://tizen.org/privilege/datacontrol.consumer
26882 <Code> function successcb(id)
26884 console.log("ok : reqid "+ id);
26887 function errorcb(id, error)
26889 console.log("error id : " + id + ", error msg : " + error.message);
26894 columns : ["WORD", "WORD_DESC"] ,
26895 values : ["'tizen1'", "'tizen2'"]
26897 // Defines globalReqId before
26898 // Increases globalReqId for uniqueness
26900 globalSQLConsumer.insert(globalReqId, rowData, successcb, errorcb);
26902 console.log (err.name +": " + err.message);
26906 <Type type="void"/>
26908 <Argument name="reqId">
26911 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.
26914 <Type type="unsigned long"/>
26916 <Argument name="insertionData">
26919 The data on columns and values to insert.
26922 <Type name="RowData"/>
26924 <Argument optional="optional" name="successCallback">
26927 The method to invoke when the asynchronous call completes successfully.
26930 <Type name="DataControlInsertSuccessCallback" nullable="nullable"/>
26932 <Argument optional="optional" name="errorCallback">
26935 The method to invoke when an error occurs.
26938 <Type name="DataControlErrorCallback" nullable="nullable"/>
26942 <RaiseException name="WebAPIException">
26945 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
26948 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.
26951 with error type IOError, if a DB operation has failed.
26954 with error type SecurityError, if the application does not have the privilege to call this method.
26957 with error type UnknownError, if any other error occurs.
26963 <Operation name="update" id="::DataControl::SQLDataControlConsumer::update">
26964 <webidl> void update(unsigned long reqId, <ref>RowData</ref> updateData, DOMString where,
26965 optional <ref>DataControlSuccessCallback</ref>? successCallback,
26966 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
26969 Updates values of a table owned by an SQL-type data control provider.
26978 http://tizen.org/privilege/datacontrol.consumer
26980 <Code> function successcb(id)
26982 console.log("ok : reqid " + id);
26985 function errorcb(id, error)
26987 console.log("error id : " + id + ", error msg : " + error.message);
26992 columns : ["WORD", "WORD_DESC"] ,
26993 values : ["'tizen1'", "'samsung platform!'"]
26995 // Defines globalReqId before
26996 // Increases globalReqId for uniqueness
26998 globalSQLConsumer.update(globalReqId, rowData, "WORD='tizen1'", successcb, errorcb);
27000 console.log (err.name +": " + err.message);
27004 <Type type="void"/>
27006 <Argument name="reqId">
27009 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.
27012 <Type type="unsigned long"/>
27014 <Argument name="updateData">
27017 The data on columns and values to update.
27020 <Type name="RowData"/>
27022 <Argument name="where">
27025 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>.
27028 <Type type="DOMString"/>
27030 <Argument optional="optional" name="successCallback">
27033 The method to invoke when the asynchronous call completes successfully.
27036 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27038 <Argument optional="optional" name="errorCallback">
27041 The method to invoke when an error occurs.
27044 <Type name="DataControlErrorCallback" nullable="nullable"/>
27048 <RaiseException name="WebAPIException">
27051 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27054 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.
27057 with error type IOError, if a DB operation has failed.
27060 with error type SecurityError, if the application does not have the privilege to call this method.
27063 with error type UnknownError, if any other error occurs.
27069 <Operation name="remove" id="::DataControl::SQLDataControlConsumer::remove">
27070 <webidl> void remove(unsigned long reqId, DOMString where,
27071 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27072 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27075 Delete rows from a table that is owned by an SQL-type data control provider.
27084 http://tizen.org/privilege/datacontrol.consumer
27086 <Code> function successcb(id)
27088 console.log("ok : reqid " + id);
27091 function errorcb(id, error)
27093 console.log("error id : " + id + ", error msg : " + error.message);
27097 // Defines globalReqId before
27098 // Increases globalReqId for uniqueness
27100 globalSQLConsumer.remove(globalReqId, "WORD='tizen1'", successcb, errorcb);
27102 console.log (err.name +": " + err.message);
27106 <Type type="void"/>
27108 <Argument name="reqId">
27111 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.
27114 <Type type="unsigned long"/>
27116 <Argument name="where">
27119 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>.
27122 <Type type="DOMString"/>
27124 <Argument optional="optional" name="successCallback">
27127 The method to invoke when the asynchronous call completes successfully.
27130 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27132 <Argument optional="optional" name="errorCallback">
27135 The method to invoke when an error occurs.
27138 <Type name="DataControlErrorCallback" nullable="nullable"/>
27142 <RaiseException name="WebAPIException">
27145 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27148 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.
27151 with error type IOError, if a DB operation has failed.
27154 with error type SecurityError, if the application does not have the privilege to call this method.
27157 with error type UnknownError, if any other error occurs.
27163 <Operation name="select" id="::DataControl::SQLDataControlConsumer::select">
27164 <webidl> void select(unsigned long reqId, DOMString[] columns, DOMString where,
27165 <ref>DataControlSelectSuccessCallback</ref> successCallback, optional <ref>DataControlErrorCallback</ref>? errorCallback,
27166 optional unsigned long? page, optional unsigned long? maxNumberPerPage) raises(<ref>WebAPIException</ref>);</webidl>
27169 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.
27178 http://tizen.org/privilege/datacontrol.consumer
27180 <Code> function getValueSuccessCB(result, id)
27182 var length = result.length;
27183 for (var i = 0; i < length; i++)
27186 for (j = 0; j < result[i].columns.length; j++)
27188 console.log("column: " + result[i].columns[j] + ", value: " + result[i].values[j]);
27193 function errorcb(id, error)
27195 console.log("error id : " + id + ", error msg : " + error.message);
27199 // Defines globalReqId before
27200 // Increases globalReqId for uniqueness
27201 var array = ["WORD", "WORD_DESC" ];
27203 globalSQLConsumer.select(globalReqId, array, "WORD='tizen1'", getValueSuccessCB, errorcb);
27206 console.log (err.name +": " + err.message);
27212 <Type type="void"/>
27214 <Argument name="reqId">
27217 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.
27220 <Type type="unsigned long"/>
27222 <Argument name="columns">
27225 The columns to select.
27228 <Type type="array">
27229 <Type type="DOMString"/>
27232 <Argument name="where">
27235 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>.
27238 <Type type="DOMString"/>
27240 <Argument name="successCallback">
27243 The method to invoke when the asynchronous call completes successfully.
27246 <Type name="DataControlSelectSuccessCallback"/>
27248 <Argument optional="optional" name="errorCallback">
27251 The method to invoke when an error occurs.
27254 <Type name="DataControlErrorCallback" nullable="nullable"/>
27256 <Argument optional="optional" name="page">
27259 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.
27262 <Type type="unsigned long" nullable="nullable"/>
27264 <Argument optional="optional" name="maxNumberPerPage">
27267 The maximum number of rows on a page.
27270 <Type type="unsigned long" nullable="nullable"/>
27274 <RaiseException name="WebAPIException">
27277 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27280 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.
27283 with error type IOError, if a DB operation has failed.
27286 with error type SecurityError, if the application does not have the privilege to call this method.
27289 with error type UnknownError, if any other error occurs.
27296 <Interface name="MappedDataControlConsumer" id="::DataControl::MappedDataControlConsumer">
27297 <webidl> [NoInterfaceObject] interface MappedDataControlConsumer : <ref>DataControlConsumerObject</ref> {
27298 void addValue(unsigned long reqId, DOMString key, DOMString value,
27299 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27300 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27302 void removeValue(unsigned long reqId, DOMString key, DOMString value,
27303 <ref>DataControlSuccessCallback</ref> successCallback,
27304 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27306 void getValue(unsigned long reqId, DOMString key,
27307 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27308 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27310 void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27311 <ref>DataControlSuccessCallback</ref> successCallback,
27312 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
27316 This interface defines MAP data type operators.
27322 <ExtendedAttributeList>
27323 <ExtendedAttribute name="NoInterfaceObject">
27324 <webidl>NoInterfaceObject</webidl>
27325 </ExtendedAttribute>
27326 </ExtendedAttributeList>
27327 <InterfaceInheritance>
27328 <Name name="DataControlConsumerObject"/>
27329 </InterfaceInheritance>
27330 <Operation name="addValue" id="::DataControl::MappedDataControlConsumer::addValue">
27331 <webidl> void addValue(unsigned long reqId, DOMString key, DOMString value,
27332 optional <ref>DataControlSuccessCallback</ref>? successCallback,
27333 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27336 Adds the value associated with the specified key to a key-values map owned by MAP-type data control provider.
27345 http://tizen.org/privilege/datacontrol.consumer
27348 function successcb(id)
27350 console.log("ok : reqid " + id);
27353 function errorcb(id, error)
27355 console.log("error id : " + id + ", error msg : " + error.message);
27359 // Defines globalReqId before
27360 // Increases globalReqId for uniqueness
27362 globalMappedConsumer.addValue(globalReqId, "tizen", "samsung", successcb, errorcb);
27364 console.log (err.name +": " + err.message);
27368 <Type type="void"/>
27370 <Argument name="reqId">
27373 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.
27376 <Type type="unsigned long"/>
27378 <Argument name="key">
27381 The key to search a mapped data.
27384 <Type type="DOMString"/>
27386 <Argument name="value">
27389 The value to add into values array mapped by the key.
27392 <Type type="DOMString"/>
27394 <Argument optional="optional" name="successCallback">
27397 The method to invoke when the asynchronous call completes successfully.
27400 <Type name="DataControlSuccessCallback" nullable="nullable"/>
27402 <Argument optional="optional" name="errorCallback">
27405 The method to invoke when an error occurs.
27408 <Type name="DataControlErrorCallback" nullable="nullable"/>
27412 <RaiseException name="WebAPIException">
27415 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27418 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27421 with error type IOError, if a DB operation has failed.
27424 with error type SecurityError, if the application does not have the privilege to call this method.
27427 with error type UnknownError, if any other error occurs.
27433 <Operation name="removeValue" id="::DataControl::MappedDataControlConsumer::removeValue">
27434 <webidl> void removeValue(unsigned long reqId, DOMString key, DOMString value,
27435 <ref>DataControlSuccessCallback</ref> successCallback,
27436 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27439 Removes the value associated with the specified key from a key-values map owned by MAP-type data control provider.
27448 http://tizen.org/privilege/datacontrol.consumer
27450 <Code> function successcb(id)
27452 console.log("ok : reqid " + id);
27455 function errorcb(id, error)
27457 console.log("error id : " + id + ", error msg : " + error.message);
27462 // Defines globalReqId before
27463 // Increases globalReqId for uniqueness
27465 globalMappedConsumer.removeValue(globalReqId, "tizen", "intel", successcb, errorcb);
27467 console.log (err.name +": " + err.message);
27471 <Type type="void"/>
27473 <Argument name="reqId">
27476 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.
27479 <Type type="unsigned long"/>
27481 <Argument name="key">
27484 The key to search a mapped data.
27487 <Type type="DOMString"/>
27489 <Argument name="value">
27492 The value to remove from a values array mapped by the key.
27495 <Type type="DOMString"/>
27497 <Argument name="successCallback">
27500 The method to invoke when the asynchronous call completes successfully.
27503 <Type name="DataControlSuccessCallback"/>
27505 <Argument optional="optional" name="errorCallback">
27508 The method to invoke when an error occurs.
27511 <Type name="DataControlErrorCallback" nullable="nullable"/>
27515 <RaiseException name="WebAPIException">
27518 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27521 with error type InvalidValuesError, if the passed parameter is not available in data provider side or platform.
27524 with error type IOError, if a DB operation has failed.
27527 with error type NotFoundError, if the key cannot be found.
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.
27539 <Operation name="getValue" id="::DataControl::MappedDataControlConsumer::getValue">
27540 <webidl> void getValue(unsigned long reqId, DOMString key,
27541 <ref>DataControlGetValueSuccessCallback</ref> successCallback,
27542 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27545 Gets value associated with the specified key, from a key-values map owned by MAP-type data control provider.
27554 http://tizen.org/privilege/datacontrol.consumer
27556 <Code> function getValueSuccessCB(result, id)
27558 console.log(result.length + ":" + result[0]);
27561 function errorcb(id, error)
27563 console.log("error id : " + id + ", error msg : " + error.message);
27567 // Defines globalReqId before
27568 // Increases globalReqId for uniqueness
27570 globalMappedConsumer.getValue(globalReqId, "tizen", getValueSuccessCB, errorcb);
27572 console.log (err.name +": " + err.message);
27576 <Type type="void"/>
27578 <Argument name="reqId">
27581 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.
27584 <Type type="unsigned long"/>
27586 <Argument name="key">
27589 The key to search a mapped data.
27592 <Type type="DOMString"/>
27594 <Argument name="successCallback">
27597 The method to invoke when the asynchronous call completes successfully.
27600 <Type name="DataControlGetValueSuccessCallback"/>
27602 <Argument optional="optional" name="errorCallback">
27605 The method to invoke when an error occurs.
27608 <Type name="DataControlErrorCallback" nullable="nullable"/>
27612 <RaiseException name="WebAPIException">
27615 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27618 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27621 with error type IOError, if a DB operation has failed.
27624 with error type NotFoundError, if the key cannot be found.
27627 with error type SecurityError, if the application does not have the privilege to call this method.
27630 with error type UnknownError, if any other error occurs.
27636 <Operation name="updateValue" id="::DataControl::MappedDataControlConsumer::updateValue">
27637 <webidl> void updateValue(unsigned long reqId, DOMString key, DOMString oldValue, DOMString newValue,
27638 <ref>DataControlSuccessCallback</ref> successCallback,
27639 optional <ref>DataControlErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
27642 Sets the value associated with the specified key with a new value.
27651 http://tizen.org/privilege/datacontrol.consumer
27654 function successcb(id)
27656 console.log("ok : reqid " + id);
27659 function errorcb(id, error)
27661 console.log("error id : " + id + ", error msg : " + error.message);
27665 // Defines globalReqId before
27666 // Increases globalReqId for uniqueness
27668 globalMappedConsumer.updateValue(globalReqId, "tizen", "samsung", "intel", successcb, errorcb);
27670 console.log (err.name +": " + err.message);
27674 <Type type="void"/>
27676 <Argument name="reqId">
27679 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.
27682 <Type type="unsigned long"/>
27684 <Argument name="key">
27687 The key to search a mapped data.
27690 <Type type="DOMString"/>
27692 <Argument name="oldValue">
27695 The value to update in values array mapped by the key.
27698 <Type type="DOMString"/>
27700 <Argument name="newValue">
27703 The new value to replace in values array mapped by the key.
27706 <Type type="DOMString"/>
27708 <Argument name="successCallback">
27711 The method to invoke when the asynchronous call completes successfully.
27714 <Type name="DataControlSuccessCallback"/>
27716 <Argument optional="optional" name="errorCallback">
27719 The method to invoke when an error occurs.
27722 <Type name="DataControlErrorCallback" nullable="nullable"/>
27726 <RaiseException name="WebAPIException">
27729 with error type TypeMismatchError, if parameter type is not compatible with the expected type for that parameter.
27732 with error type InvalidValuesError, if the passed parameter is not available on data provider side or platform.
27735 with error type IOError, if a DB operation has failed.
27738 with error type NotFoundError, if the key cannot be found.
27741 with error type SecurityError, if the application does not have the privilege to call this method.
27744 with error type UnknownError, if any other error occurs.
27751 <Interface name="DataControlSuccessCallback" id="::DataControl::DataControlSuccessCallback">
27752 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSuccessCallback {
27753 void onsuccess(unsigned long reqId);
27757 This interface provides a SuccessCallback for DataControlConsumerObject.
27763 <ExtendedAttributeList>
27764 <ExtendedAttribute name="Callback" value="FunctionOnly">
27765 <webidl>Callback</webidl>
27766 </ExtendedAttribute>
27767 <ExtendedAttribute name="NoInterfaceObject">
27768 <webidl> NoInterfaceObject</webidl>
27769 </ExtendedAttribute>
27770 </ExtendedAttributeList>
27771 <Operation name="onsuccess" id="::DataControl::DataControlSuccessCallback::onsuccess">
27772 <webidl> void onsuccess(unsigned long reqId);</webidl>
27773 <Type type="void"/>
27775 <Argument name="reqId">
27776 <Type type="unsigned long"/>
27781 <Interface name="DataControlErrorCallback" id="::DataControl::DataControlErrorCallback">
27782 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlErrorCallback {
27783 void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);
27787 This interface provides a ErrorCallback for DataControlConsumerObject.
27793 <ExtendedAttributeList>
27794 <ExtendedAttribute name="Callback" value="FunctionOnly">
27795 <webidl>Callback</webidl>
27796 </ExtendedAttribute>
27797 <ExtendedAttribute name="NoInterfaceObject">
27798 <webidl> NoInterfaceObject</webidl>
27799 </ExtendedAttribute>
27800 </ExtendedAttributeList>
27801 <Operation name="onerror" id="::DataControl::DataControlErrorCallback::onerror">
27802 <webidl> void onerror(unsigned long reqId, <ref>WebAPIError</ref> error);</webidl>
27803 <Type type="void"/>
27805 <Argument name="reqId">
27806 <Type type="unsigned long"/>
27808 <Argument name="error">
27809 <Type name="WebAPIError"/>
27814 <Interface name="DataControlInsertSuccessCallback" id="::DataControl::DataControlInsertSuccessCallback">
27815 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlInsertSuccessCallback {
27816 void onsuccess(unsigned long reqId, long insertRowId);
27820 This interface provides a SuccessCallback for SQLDataControlConsumer.insert().
27826 <ExtendedAttributeList>
27827 <ExtendedAttribute name="Callback" value="FunctionOnly">
27828 <webidl>Callback</webidl>
27829 </ExtendedAttribute>
27830 <ExtendedAttribute name="NoInterfaceObject">
27831 <webidl> NoInterfaceObject</webidl>
27832 </ExtendedAttribute>
27833 </ExtendedAttributeList>
27834 <Operation name="onsuccess" id="::DataControl::DataControlInsertSuccessCallback::onsuccess">
27835 <webidl> void onsuccess(unsigned long reqId, long insertRowId);</webidl>
27844 <Type type="void"/>
27846 <Argument name="reqId">
27849 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.
27852 <Type type="unsigned long"/>
27854 <Argument name="insertRowId">
27857 The inserted row ID set by the data control provider if the specified providerResult is <var>true</var>, else <var>-1</var>.
27860 <Type type="long"/>
27865 <Interface name="DataControlSelectSuccessCallback" id="::DataControl::DataControlSelectSuccessCallback">
27866 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlSelectSuccessCallback {
27867 void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);
27871 This interface provides a SuccessCallback for SQLDataControlConsumer.select().
27877 <ExtendedAttributeList>
27878 <ExtendedAttribute name="Callback" value="FunctionOnly">
27879 <webidl>Callback</webidl>
27880 </ExtendedAttribute>
27881 <ExtendedAttribute name="NoInterfaceObject">
27882 <webidl> NoInterfaceObject</webidl>
27883 </ExtendedAttribute>
27884 </ExtendedAttributeList>
27885 <Operation name="onsuccess" id="::DataControl::DataControlSelectSuccessCallback::onsuccess">
27886 <webidl> void onsuccess(<ref>RowData</ref>[] rows, unsigned long reqId);</webidl>
27895 <Type type="void"/>
27897 <Argument name="rows">
27900 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>.
27903 <Type type="array">
27904 <Type name="RowData"/>
27907 <Argument name="reqId">
27910 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.
27913 <Type type="unsigned long"/>
27918 <Interface name="DataControlGetValueSuccessCallback" id="::DataControl::DataControlGetValueSuccessCallback">
27919 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface DataControlGetValueSuccessCallback {
27920 void onsuccess(DOMString[] values, unsigned long reqid);
27924 This interface provides a SuccessCallback for MapDataControlConsumer.getValue().
27930 <ExtendedAttributeList>
27931 <ExtendedAttribute name="Callback" value="FunctionOnly">
27932 <webidl>Callback</webidl>
27933 </ExtendedAttribute>
27934 <ExtendedAttribute name="NoInterfaceObject">
27935 <webidl> NoInterfaceObject</webidl>
27936 </ExtendedAttribute>
27937 </ExtendedAttributeList>
27938 <Operation name="onsuccess" id="::DataControl::DataControlGetValueSuccessCallback::onsuccess">
27939 <webidl> void onsuccess(DOMString[] values, unsigned long reqid);</webidl>
27940 <Type type="void"/>
27942 <Argument name="values">
27943 <Type type="array">
27944 <Type type="DOMString"/>
27947 <Argument name="reqid">
27948 <Type type="unsigned long"/>
27953 <Dictionary name="RowData" id="::DataControl::RowData">
27954 <webidl> dictionary RowData {
27955 DOMString[] columns;
27956 DOMString[] values;
27960 The dictionary represents RowData holding 1 row of SQL selection results from another application.
27966 <DictionaryMember name="columns" id="::DataControl::RowData::columns">
27967 <webidl> DOMString[] columns;</webidl>
27970 An attribute to hold column names to select, update, and insert.
27976 <Type type="array">
27977 <Type type="DOMString"/>
27979 </DictionaryMember>
27980 <DictionaryMember name="values" id="::DataControl::RowData::values">
27981 <webidl> DOMString[] values;</webidl>
27984 An attribute to hold values of columns to select, update, and insert.
27990 <Type type="array">
27991 <Type type="DOMString"/>
27993 </DictionaryMember>
27996 <Module name="DataSynchronization" id="::DataSynchronization">
27997 <webidl>module DataSynchronization {
27999 typedef DOMString SyncProfileId;
28001 enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };
28003 enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };
28005 enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };
28007 enum SyncServiceType { "CONTACT", "EVENT" };
28009 enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };
28011 [NoInterfaceObject] interface DataSynchronizationManagerObject {
28012 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28015 <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;
28017 [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28018 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28019 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28020 interface SyncInfo {
28021 attribute DOMString url;
28023 attribute DOMString id;
28025 attribute DOMString password;
28027 attribute <ref>SyncMode</ref> mode;
28029 attribute <ref>SyncType</ref>? type;
28031 attribute <ref>SyncInterval</ref>? interval;
28034 [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28035 interface SyncServiceInfo {
28036 attribute boolean enable;
28038 attribute <ref>SyncServiceType</ref> serviceType;
28040 attribute DOMString serverDatabaseUri;
28042 attribute DOMString? id;
28044 attribute DOMString? password;
28047 [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28048 interface SyncProfileInfo {
28049 readonly attribute <ref>SyncProfileId</ref> profileId;
28051 attribute DOMString profileName;
28053 attribute <ref>SyncInfo</ref> syncInfo;
28055 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28058 [NoInterfaceObject] interface SyncStatistics {
28059 readonly attribute <ref>SyncStatus</ref> syncStatus;
28061 readonly attribute <ref>SyncServiceType</ref> serviceType;
28063 readonly attribute Date lastSyncTime;
28065 readonly attribute unsigned long serverToClientTotal;
28067 readonly attribute unsigned long serverToClientAdded;
28069 readonly attribute unsigned long serverToClientUpdated;
28071 readonly attribute unsigned long serverToClientRemoved;
28073 readonly attribute unsigned long clientToServerTotal;
28075 readonly attribute unsigned long clientToServerAdded;
28077 readonly attribute unsigned long clientToServerUpdated;
28079 readonly attribute unsigned long clientToServerRemoved;
28082 [NoInterfaceObject] interface DataSynchronizationManager {
28083 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28085 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28087 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28089 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28091 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28093 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28095 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28097 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28099 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28101 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28104 [Callback, NoInterfaceObject] interface SyncProgressCallback {
28105 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
28107 void oncompleted(<ref>SyncProfileId</ref> profileId);
28109 void onstopped(<ref>SyncProfileId</ref> profileId);
28111 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
28116 This API provides methods to synchronize contact and event data to the server using the OMA DS 1.2 protocol.
28117 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>.
28123 <Typedef name="SyncProfileId" id="::DataSynchronization::SyncProfileId">
28124 <webidl> typedef DOMString SyncProfileId;</webidl>
28127 An attribute to uniquely identify a sync profile.
28133 <Type type="DOMString"/>
28135 <Enum name="SyncMode" id="::DataSynchronization::SyncMode">
28136 <webidl> enum SyncMode { "MANUAL", "PERIODIC", "PUSH" };</webidl>
28139 An enumerator that indicates the supported synchronization modes.
28143 The following values are supported:
28147 MANUAL - Indicates that the synchronization starts by manual trigger. The sync type should be specified. The default value is <em>TWO_WAY</em>. </li>
28149 PERIODIC - Indicates that the synchronization starts automatically by a preset period. The sync interval should be provided. </li>
28151 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>
28158 <EnumValue stringvalue="MANUAL">
28159 <webidl> "MANUAL</webidl>
28161 <EnumValue stringvalue="PERIODIC">
28162 <webidl> "PERIODIC</webidl>
28164 <EnumValue stringvalue="PUSH">
28165 <webidl> "PUSH</webidl>
28168 <Enum name="SyncType" id="::DataSynchronization::SyncType">
28169 <webidl> enum SyncType { "TWO_WAY", "SLOW", "ONE_WAY_FROM_CLIENT", "REFRESH_FROM_CLIENT", "ONE_WAY_FROM_SERVER", "REFRESH_FROM_SERVER" };</webidl>
28172 An enumerator that indicates the supported synchronization types.
28176 The following values are supported:
28180 TWO_WAY - Indicates a normal sync type in which the client and the server exchange information about modified data in these devices. </li>
28182 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>
28184 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>
28186 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>
28188 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>
28190 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>
28197 <EnumValue stringvalue="TWO_WAY">
28198 <webidl> "TWO_WAY</webidl>
28200 <EnumValue stringvalue="SLOW">
28201 <webidl> "SLOW</webidl>
28203 <EnumValue stringvalue="ONE_WAY_FROM_CLIENT">
28204 <webidl> "ONE_WAY_FROM_CLIENT</webidl>
28206 <EnumValue stringvalue="REFRESH_FROM_CLIENT">
28207 <webidl> "REFRESH_FROM_CLIENT</webidl>
28209 <EnumValue stringvalue="ONE_WAY_FROM_SERVER">
28210 <webidl> "ONE_WAY_FROM_SERVER</webidl>
28212 <EnumValue stringvalue="REFRESH_FROM_SERVER">
28213 <webidl> "REFRESH_FROM_SERVER</webidl>
28216 <Enum name="SyncInterval" id="::DataSynchronization::SyncInterval">
28217 <webidl> enum SyncInterval { "5_MINUTES", "15_MINUTES", "1_HOUR", "4_HOURS", "12_HOURS", "1_DAY", "1_WEEK", "1_MONTH" };</webidl>
28220 An enumerator that indicates the supported synchronization intervals.
28224 The following values are supported:
28228 5_MINUTES - Indicates a time period of 5 minutes. </li>
28230 15_MINUTES - Indicates a time period of 15 minutes. </li>
28232 1_HOUR - Indicates a time period of 1 hour. </li>
28234 4_HOURS - Indicates a time period of 4 hours. </li>
28236 12_HOURS - Indicates a time period of 12 hours. </li>
28238 1_DAY - Indicates a time period of 1 day. </li>
28240 1_WEEK - Indicates a time period of 1 week. </li>
28242 1_MONTH - Indicates a time period of 1 month. </li>
28249 <EnumValue stringvalue="5_MINUTES">
28250 <webidl> "5_MINUTES</webidl>
28252 <EnumValue stringvalue="15_MINUTES">
28253 <webidl> "15_MINUTES</webidl>
28255 <EnumValue stringvalue="1_HOUR">
28256 <webidl> "1_HOUR</webidl>
28258 <EnumValue stringvalue="4_HOURS">
28259 <webidl> "4_HOURS</webidl>
28261 <EnumValue stringvalue="12_HOURS">
28262 <webidl> "12_HOURS</webidl>
28264 <EnumValue stringvalue="1_DAY">
28265 <webidl> "1_DAY</webidl>
28267 <EnumValue stringvalue="1_WEEK">
28268 <webidl> "1_WEEK</webidl>
28270 <EnumValue stringvalue="1_MONTH">
28271 <webidl> "1_MONTH</webidl>
28274 <Enum name="SyncServiceType" id="::DataSynchronization::SyncServiceType">
28275 <webidl> enum SyncServiceType { "CONTACT", "EVENT" };</webidl>
28278 An enumerator that indicates the supported synchronization service type of the device.
28282 The following values are supported:
28286 CONTACT - Indicates the device contact records. </li>
28288 EVENT - Indicates the device calendar event records. </li>
28295 <EnumValue stringvalue="CONTACT">
28296 <webidl> "CONTACT</webidl>
28298 <EnumValue stringvalue="EVENT">
28299 <webidl> "EVENT</webidl>
28302 <Enum name="SyncStatus" id="::DataSynchronization::SyncStatus">
28303 <webidl> enum SyncStatus { "SUCCESS", "FAIL", "STOP", "NONE" };</webidl>
28306 An enumerator that indicates the last sync statuses.
28310 The following values are supported:
28314 SUCCESS - Indicates the sync is successful. </li>
28316 FAIL - Indicates the sync has failed. </li>
28318 STOP - Indicates the sync has been stopped by user's action. </li>
28320 NONE - Indicates the sync was never performed. </li>
28327 <EnumValue stringvalue="SUCCESS">
28328 <webidl> "SUCCESS</webidl>
28330 <EnumValue stringvalue="FAIL">
28331 <webidl> "FAIL</webidl>
28333 <EnumValue stringvalue="STOP">
28334 <webidl> "STOP</webidl>
28336 <EnumValue stringvalue="NONE">
28337 <webidl> "NONE</webidl>
28340 <Interface name="DataSynchronizationManagerObject" id="::DataSynchronization::DataSynchronizationManagerObject">
28341 <webidl> [NoInterfaceObject] interface DataSynchronizationManagerObject {
28342 readonly attribute <ref>DataSynchronizationManager</ref> datasync;
28346 This interface defines the default data synchronization manager that is instantiated by the <em>Tizen </em>object.
28347 There will be a <em>tizen.datasync</em> object that allows access to the functionality of the DataSynchronization API.
28353 <ExtendedAttributeList>
28354 <ExtendedAttribute name="NoInterfaceObject">
28355 <webidl>NoInterfaceObject</webidl>
28356 </ExtendedAttribute>
28357 </ExtendedAttributeList>
28358 <Attribute readonly="readonly" name="datasync" id="::DataSynchronization::DataSynchronizationManagerObject::datasync">
28359 <webidl> readonly attribute <ref>DataSynchronizationManager</ref> datasync;</webidl>
28360 <Type name="DataSynchronizationManager"/>
28363 <Implements name1="Tizen" name2="DataSynchronizationManagerObject">
28364 <webidl> <ref>Tizen</ref> implements <ref>DataSynchronizationManagerObject</ref>;</webidl>
28366 <Interface name="SyncInfo" id="::DataSynchronization::SyncInfo">
28367 <webidl> [Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode),
28368 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type),
28369 Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)]
28370 interface SyncInfo {
28371 attribute DOMString url;
28373 attribute DOMString id;
28375 attribute DOMString password;
28377 attribute <ref>SyncMode</ref> mode;
28379 attribute <ref>SyncType</ref>? type;
28381 attribute <ref>SyncInterval</ref>? interval;
28385 This interface defines the sync information.
28391 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.
28394 <ExtendedAttributeList>
28395 <ExtendedAttribute name="Constructor">
28396 <webidl>Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode)</webidl>
28398 <Argument name="url">
28399 <Type type="DOMString"/>
28401 <Argument name="id">
28402 <Type type="DOMString"/>
28404 <Argument name="password">
28405 <Type type="DOMString"/>
28407 <Argument name="mode">
28408 <Type name="SyncMode"/>
28411 </ExtendedAttribute>
28412 <ExtendedAttribute name="Constructor">
28413 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncType</ref> type)</webidl>
28415 <Argument name="url">
28416 <Type type="DOMString"/>
28418 <Argument name="id">
28419 <Type type="DOMString"/>
28421 <Argument name="password">
28422 <Type type="DOMString"/>
28424 <Argument name="mode">
28425 <Type name="SyncMode"/>
28427 <Argument name="type">
28428 <Type name="SyncType"/>
28431 </ExtendedAttribute>
28432 <ExtendedAttribute name="Constructor">
28433 <webidl> Constructor(DOMString url, DOMString id, DOMString password, <ref>SyncMode</ref> mode, <ref>SyncInterval</ref> interval)</webidl>
28435 <Argument name="url">
28436 <Type type="DOMString"/>
28438 <Argument name="id">
28439 <Type type="DOMString"/>
28441 <Argument name="password">
28442 <Type type="DOMString"/>
28444 <Argument name="mode">
28445 <Type name="SyncMode"/>
28447 <Argument name="interval">
28448 <Type name="SyncInterval"/>
28451 </ExtendedAttribute>
28452 </ExtendedAttributeList>
28453 <Attribute name="url" id="::DataSynchronization::SyncInfo::url">
28454 <webidl> attribute DOMString url;</webidl>
28457 An attribute to store the URL of the sync server.
28463 <Type type="DOMString"/>
28465 <Attribute name="id" id="::DataSynchronization::SyncInfo::id">
28466 <webidl> attribute DOMString id;</webidl>
28469 An attribute to store the login ID for the sync server.
28473 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.
28480 <Type type="DOMString"/>
28482 <Attribute name="password" id="::DataSynchronization::SyncInfo::password">
28483 <webidl> attribute DOMString password;</webidl>
28486 An attribute to store the login password to the sync server.
28490 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.
28497 <Type type="DOMString"/>
28499 <Attribute name="mode" id="::DataSynchronization::SyncInfo::mode">
28500 <webidl> attribute <ref>SyncMode</ref> mode;</webidl>
28503 An attribute to store the sync mode.
28509 <Type name="SyncMode"/>
28511 <Attribute name="type" id="::DataSynchronization::SyncInfo::type">
28512 <webidl> attribute <ref>SyncType</ref>? type;</webidl>
28515 An attribute to store the sync type.
28519 This attribute is used when the sync mode is set to <em>MANUAL</em> option.
28526 <Type name="SyncType" nullable="nullable"/>
28528 <Attribute name="interval" id="::DataSynchronization::SyncInfo::interval">
28529 <webidl> attribute <ref>SyncInterval</ref>? interval;</webidl>
28532 An attribute to store the sync interval.
28536 This attribute is used when the sync mode is set to <em>PERIODIC</em> option.
28543 <Type name="SyncInterval" nullable="nullable"/>
28546 <Interface name="SyncServiceInfo" id="::DataSynchronization::SyncServiceInfo">
28547 <webidl> [Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)]
28548 interface SyncServiceInfo {
28549 attribute boolean enable;
28551 attribute <ref>SyncServiceType</ref> serviceType;
28553 attribute DOMString serverDatabaseUri;
28555 attribute DOMString? id;
28557 attribute DOMString? password;
28561 This interface defines the sync service information.
28567 <ExtendedAttributeList>
28568 <ExtendedAttribute name="Constructor">
28569 <webidl>Constructor(boolean enable, <ref>SyncServiceType</ref> serviceType, DOMString serverDatabaseUri, optional DOMString? id, optional DOMString? password)</webidl>
28571 <Argument name="enable">
28572 <Type type="boolean"/>
28574 <Argument name="serviceType">
28575 <Type name="SyncServiceType"/>
28577 <Argument name="serverDatabaseUri">
28578 <Type type="DOMString"/>
28580 <Argument optional="optional" name="id">
28581 <Type type="DOMString" nullable="nullable"/>
28583 <Argument optional="optional" name="password">
28584 <Type type="DOMString" nullable="nullable"/>
28587 </ExtendedAttribute>
28588 </ExtendedAttributeList>
28589 <Attribute name="enable" id="::DataSynchronization::SyncServiceInfo::enable">
28590 <webidl> attribute boolean enable;</webidl>
28593 An attribute to enable or disable a service category for sync.
28599 <Type type="boolean"/>
28601 <Attribute name="serviceType" id="::DataSynchronization::SyncServiceInfo::serviceType">
28602 <webidl> attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28605 An attribute to indicate the sync service type.
28611 <Type name="SyncServiceType"/>
28613 <Attribute name="serverDatabaseUri" id="::DataSynchronization::SyncServiceInfo::serverDatabaseUri">
28614 <webidl> attribute DOMString serverDatabaseUri;</webidl>
28617 An attribute to store the sync service DB URI of the server.
28623 <Type type="DOMString"/>
28625 <Attribute name="id" id="::DataSynchronization::SyncServiceInfo::id">
28626 <webidl> attribute DOMString? id;</webidl>
28629 An attribute to store the sync service DB access ID to the server.
28633 This is used only when the server requires a separate access right to each DB.
28634 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.
28641 <Type type="DOMString" nullable="nullable"/>
28643 <Attribute name="password" id="::DataSynchronization::SyncServiceInfo::password">
28644 <webidl> attribute DOMString? password;</webidl>
28647 An attribute to store the sync service DB access password to the server.
28651 This is used only when the server requires a separate access right to each DB.
28652 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.
28659 <Type type="DOMString" nullable="nullable"/>
28662 <Interface name="SyncProfileInfo" id="::DataSynchronization::SyncProfileInfo">
28663 <webidl> [Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)]
28664 interface SyncProfileInfo {
28665 readonly attribute <ref>SyncProfileId</ref> profileId;
28667 attribute DOMString profileName;
28669 attribute <ref>SyncInfo</ref> syncInfo;
28671 attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;
28675 This interface defines the sync profile information, based on which the synchronization is performed.
28681 <ExtendedAttributeList>
28682 <ExtendedAttribute name="Constructor">
28683 <webidl>Constructor(DOMString profileName, <ref>SyncInfo</ref> syncInfo, optional <ref>SyncServiceInfo</ref>[]? serviceInfo)</webidl>
28685 <Argument name="profileName">
28686 <Type type="DOMString"/>
28688 <Argument name="syncInfo">
28689 <Type name="SyncInfo"/>
28691 <Argument optional="optional" name="serviceInfo">
28692 <Type type="array" nullable="nullable">
28693 <Type name="SyncServiceInfo"/>
28697 </ExtendedAttribute>
28698 </ExtendedAttributeList>
28699 <Attribute readonly="readonly" name="profileId" id="::DataSynchronization::SyncProfileInfo::profileId">
28700 <webidl> readonly attribute <ref>SyncProfileId</ref> profileId;</webidl>
28703 An attribute to store the unique identifier provided by the platform for a profile that has been successfully added.
28709 <Type name="SyncProfileId"/>
28711 <Attribute name="profileName" id="::DataSynchronization::SyncProfileInfo::profileName">
28712 <webidl> attribute DOMString profileName;</webidl>
28715 An attribute to store the profile name.
28721 <Type type="DOMString"/>
28723 <Attribute name="syncInfo" id="::DataSynchronization::SyncProfileInfo::syncInfo">
28724 <webidl> attribute <ref>SyncInfo</ref> syncInfo;</webidl>
28727 An attribute to store the sync info.
28733 <Type name="SyncInfo"/>
28735 <Attribute name="serviceInfo" id="::DataSynchronization::SyncProfileInfo::serviceInfo">
28736 <webidl> attribute <ref>SyncServiceInfo</ref>[]? serviceInfo;</webidl>
28739 An attribute to indicate the service info.
28745 <Type type="array" nullable="nullable">
28746 <Type name="SyncServiceInfo"/>
28750 <Interface name="SyncStatistics" id="::DataSynchronization::SyncStatistics">
28751 <webidl> [NoInterfaceObject] interface SyncStatistics {
28752 readonly attribute <ref>SyncStatus</ref> syncStatus;
28754 readonly attribute <ref>SyncServiceType</ref> serviceType;
28756 readonly attribute Date lastSyncTime;
28758 readonly attribute unsigned long serverToClientTotal;
28760 readonly attribute unsigned long serverToClientAdded;
28762 readonly attribute unsigned long serverToClientUpdated;
28764 readonly attribute unsigned long serverToClientRemoved;
28766 readonly attribute unsigned long clientToServerTotal;
28768 readonly attribute unsigned long clientToServerAdded;
28770 readonly attribute unsigned long clientToServerUpdated;
28772 readonly attribute unsigned long clientToServerRemoved;
28776 This interface defines the sync statistics for a profile service.
28782 <ExtendedAttributeList>
28783 <ExtendedAttribute name="NoInterfaceObject">
28784 <webidl>NoInterfaceObject</webidl>
28785 </ExtendedAttribute>
28786 </ExtendedAttributeList>
28787 <Attribute readonly="readonly" name="syncStatus" id="::DataSynchronization::SyncStatistics::syncStatus">
28788 <webidl> readonly attribute <ref>SyncStatus</ref> syncStatus;</webidl>
28791 An attribute to store the last sync status for a corresponding service category.
28797 <Type name="SyncStatus"/>
28799 <Attribute readonly="readonly" name="serviceType" id="::DataSynchronization::SyncStatistics::serviceType">
28800 <webidl> readonly attribute <ref>SyncServiceType</ref> serviceType;</webidl>
28803 An attribute to indicate the sync service type.
28809 <Type name="SyncServiceType"/>
28811 <Attribute readonly="readonly" name="lastSyncTime" id="::DataSynchronization::SyncStatistics::lastSyncTime">
28812 <webidl> readonly attribute Date lastSyncTime;</webidl>
28815 An attribute to store the last sync time.
28821 <Type type="Date"/>
28823 <Attribute readonly="readonly" name="serverToClientTotal" id="::DataSynchronization::SyncStatistics::serverToClientTotal">
28824 <webidl> readonly attribute unsigned long serverToClientTotal;</webidl>
28827 An attribute to indicate the total number of items sent from the server to the client direction.
28833 <Type type="unsigned long"/>
28835 <Attribute readonly="readonly" name="serverToClientAdded" id="::DataSynchronization::SyncStatistics::serverToClientAdded">
28836 <webidl> readonly attribute unsigned long serverToClientAdded;</webidl>
28839 An attribute to indicate the number of added items from the server to the client direction.
28845 <Type type="unsigned long"/>
28847 <Attribute readonly="readonly" name="serverToClientUpdated" id="::DataSynchronization::SyncStatistics::serverToClientUpdated">
28848 <webidl> readonly attribute unsigned long serverToClientUpdated;</webidl>
28851 An attribute to indicate the number of updated items from the server to the client direction.
28857 <Type type="unsigned long"/>
28859 <Attribute readonly="readonly" name="serverToClientRemoved" id="::DataSynchronization::SyncStatistics::serverToClientRemoved">
28860 <webidl> readonly attribute unsigned long serverToClientRemoved;</webidl>
28863 An attribute to indicate the number of removed items from the server to the client direction.
28869 <Type type="unsigned long"/>
28871 <Attribute readonly="readonly" name="clientToServerTotal" id="::DataSynchronization::SyncStatistics::clientToServerTotal">
28872 <webidl> readonly attribute unsigned long clientToServerTotal;</webidl>
28875 An attribute to indicate the total number of items from the client to the server direction.
28881 <Type type="unsigned long"/>
28883 <Attribute readonly="readonly" name="clientToServerAdded" id="::DataSynchronization::SyncStatistics::clientToServerAdded">
28884 <webidl> readonly attribute unsigned long clientToServerAdded;</webidl>
28887 An attribute to indicate the number of added items from the client to the server direction.
28893 <Type type="unsigned long"/>
28895 <Attribute readonly="readonly" name="clientToServerUpdated" id="::DataSynchronization::SyncStatistics::clientToServerUpdated">
28896 <webidl> readonly attribute unsigned long clientToServerUpdated;</webidl>
28899 An attribute to indicate the number of updated items from the client to the server direction.
28905 <Type type="unsigned long"/>
28907 <Attribute readonly="readonly" name="clientToServerRemoved" id="::DataSynchronization::SyncStatistics::clientToServerRemoved">
28908 <webidl> readonly attribute unsigned long clientToServerRemoved;</webidl>
28911 An attribute to indicate the number of removed items from the client to the server direction.
28917 <Type type="unsigned long"/>
28920 <Interface name="DataSynchronizationManager" id="::DataSynchronization::DataSynchronizationManager">
28921 <webidl> [NoInterfaceObject] interface DataSynchronizationManager {
28922 void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28924 void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);
28926 void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28928 long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);
28930 unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);
28932 <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28934 <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);
28936 void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);
28938 void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28940 <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);
28944 This interface allows managing profiles and synchronizing data between the server and the client device based on the stored profile information.
28950 <ExtendedAttributeList>
28951 <ExtendedAttribute name="NoInterfaceObject">
28952 <webidl>NoInterfaceObject</webidl>
28953 </ExtendedAttribute>
28954 </ExtendedAttributeList>
28955 <Operation name="add" id="::DataSynchronization::DataSynchronizationManager::add">
28956 <webidl> void add(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
28959 Adds a sync profile.
28963 The profile ID is provided when the profile is successfully added.
28973 http://tizen.org/privilege/datasync
28975 <Code> // Creates a sync info
28976 var syncInfo = new tizen.SyncInfo("http://example.com/sync", "myId", "myPassword", "MANUAL", "TWO_WAY");
28978 // Syncs both contacts and events
28979 var contactInfo = new tizen.SyncServiceInfo(true, "CONTACT", "serverContact");
28980 var eventInfo = new tizen.SyncServiceInfo(true, "EVENT", "serverEvent");
28981 var serviceInfo = [contactInfo, eventInfo];
28983 // Adds a profile to sync
28984 var profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo);
28985 tizen.datasync.add(profile);
28988 <Type type="void"/>
28990 <Argument name="profile">
28993 The sync profile information to add.
28996 <Type name="SyncProfileInfo"/>
29000 <RaiseException name="WebAPIException">
29003 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29006 with error type QuotaExceededError, if the platform has already reached the maximum number of profiles.
29009 with error type NotSupportedError, if this feature is not supported.
29012 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29015 with error type SecurityError, if the application does not have the privilege to call this method.
29018 with error type UnknownError, if any other error occurs.
29024 <Operation name="update" id="::DataSynchronization::DataSynchronizationManager::update">
29025 <webidl> void update(<ref>SyncProfileInfo</ref> profile) raises(<ref>WebAPIException</ref>);</webidl>
29028 Updates an existing sync profile.
29037 http://tizen.org/privilege/datasync
29039 <Code> // Retrieves and updates a profile
29040 var profile = tizen.datasync.get(profileId);
29042 profile.profileName = "newProfileName";
29044 tizen.datasync.update(profile);
29047 <Type type="void"/>
29049 <Argument name="profile">
29052 The sync profile information to update.
29055 <Type name="SyncProfileInfo"/>
29059 <RaiseException name="WebAPIException">
29062 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29065 with error type NotSupportedError, if this feature is not supported.
29068 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29071 with error type SecurityError, if the application does not have the privilege to call this method.
29074 with error type UnknownError, if any other error occurs.
29080 <Operation name="remove" id="::DataSynchronization::DataSynchronizationManager::remove">
29081 <webidl> void remove(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29084 Removes an existing sync profile.
29093 http://tizen.org/privilege/datasync
29095 <Code> // Removes a profile
29096 tizen.datasync.remove(profileId);
29099 <Type type="void"/>
29101 <Argument name="profileId">
29104 The sync profile ID to remove.
29107 <Type name="SyncProfileId"/>
29111 <RaiseException name="WebAPIException">
29114 with error type NotFoundError, if the identifier does not match any saved profile.
29117 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29120 with error type NotSupportedError, if this feature is not supported.
29123 with error type SecurityError, if the application does not have the privilege to call this method.
29126 with error type UnknownError, if any other error occurs.
29132 <Operation name="getMaxProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getMaxProfilesNum">
29133 <webidl> long getMaxProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29136 Gets the maximum number of supported sync profiles on a platform.
29137 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.
29146 http://tizen.org/privilege/datasync
29148 <Code> // Gets the maximum number of supported profiles on the platform
29149 var numMaxProfiles = tizen.datasync.getMaxProfilesNum();
29155 long The number of supported profiles on a platform.
29161 <RaiseException name="WebAPIException">
29164 with error type NotSupportedError, if this feature is not supported.
29167 with error type SecurityError, if the application does not have the privilege to call this method.
29170 with error type UnknownError, if any other error occurs.
29176 <Operation name="getProfilesNum" id="::DataSynchronization::DataSynchronizationManager::getProfilesNum">
29177 <webidl> unsigned long getProfilesNum() raises(<ref>WebAPIException</ref>);</webidl>
29180 Gets the current number of sync profiles on a device.
29189 http://tizen.org/privilege/datasync
29191 <Code> // Gets the present number of profiles on the device
29192 var numProfiles = tizen.datasync.getProfilesNum();
29195 <Type type="unsigned long">
29198 unsigned long The current number of profiles on a device.
29204 <RaiseException name="WebAPIException">
29207 with error type NotSupportedError, if this feature is not supported.
29210 with error type SecurityError, if the application does not have the privilege to call this method.
29213 with error type UnknownError, if any other error occurs.
29219 <Operation name="get" id="::DataSynchronization::DataSynchronizationManager::get">
29220 <webidl> <ref>SyncProfileInfo</ref> get(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29223 Gets the <em>SyncProfileInfo</em> object from a given profile ID.
29227 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>.
29237 http://tizen.org/privilege/datasync
29239 <Code> // Gets the profile information with the given ID
29240 var profile = tizen.datasync.get(profileId);
29243 <Type name="SyncProfileInfo">
29246 SyncProfileInfo The profile information of the given ID.
29251 <Argument name="profileId">
29254 The ID to use to get the profile information.
29257 <Type name="SyncProfileId"/>
29261 <RaiseException name="WebAPIException">
29264 with error type NotFoundError, if the identifier does not match any profile saved.
29267 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29270 with error type NotSupportedError, if this feature is not supported.
29273 with error type SecurityError, if the application does not have the privilege to call this method.
29276 with error type UnknownError, if any other error occurs.
29282 <Operation name="getAll" id="::DataSynchronization::DataSynchronizationManager::getAll">
29283 <webidl> <ref>SyncProfileInfo</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
29286 Gets the information of all sync profiles saved in a device.
29290 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>.
29300 http://tizen.org/privilege/datasync
29302 <Code> // Gets the all profile information
29303 var profiles = tizen.datasync.getAll();
29306 <Type type="array">
29309 SyncProfileInfo[] The profile information array.
29312 <Type name="SyncProfileInfo"/>
29316 <RaiseException name="WebAPIException">
29319 with error type NotSupportedError, if this feature is not supported.
29322 with error type SecurityError, if the application does not have the privilege to call this method.
29325 with error type UnknownError, if any other error occurs.
29331 <Operation name="startSync" id="::DataSynchronization::DataSynchronizationManager::startSync">
29332 <webidl> void startSync(<ref>SyncProfileId</ref> profileId, optional <ref>SyncProgressCallback</ref>? progressCallback) raises(<ref>WebAPIException</ref>);</webidl>
29335 Starts a sync operation with a given profile ID.
29339 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.
29349 http://tizen.org/privilege/datasync
29351 <Code> var profileId; //profileId obtained from SyncProfileInfo
29352 var syncCallback = {
29353 onprogress: function(profileId, serviceType, isFromServer, totalPerType, syncedPerType) {
29354 console.log('Total: ' + totalPerType + ', synced: ' + syncedPerType + ' for the sync type: ' + serviceType);
29356 onfailed: function(profileId, error) {
29357 console.log('Failed with id: ' + profileId + ', error name: ' + error.name);
29361 // Starts the sync operation with the corresponding callbacks
29362 tizen.datasync.startSync(profileId, syncCallback);
29365 <Type type="void"/>
29367 <Argument name="profileId">
29370 The profile ID with which to initiate the sync operation.
29373 <Type name="SyncProfileId"/>
29375 <Argument optional="optional" name="progressCallback">
29378 The method to invoke when the sync operation progresses or an error occurs.
29381 <Type name="SyncProgressCallback" nullable="nullable"/>
29385 <RaiseException name="WebAPIException">
29388 with error type NotFoundError, if the identifier does not match any profile saved.
29391 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29394 with error type NotSupportedError, if this feature is not supported.
29397 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
29400 with error type SecurityError, if the application does not have the privilege to call this method.
29403 with error type UnknownError, if any other error occurs.
29409 <Operation name="stopSync" id="::DataSynchronization::DataSynchronizationManager::stopSync">
29410 <webidl> void stopSync(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29413 Stops an ongoing sync operation that is specified by the <em>profileId</em> parameter.
29422 http://tizen.org/privilege/datasync
29424 <Code> var profileId; //profileId obtained from SyncProfileInfo
29425 // Stops the ongoing sync operation
29426 tizen.datasync.stopSync(profileId);
29429 <Type type="void"/>
29431 <Argument name="profileId">
29434 The ID of the ongoing sync operation to stop.
29437 <Type name="SyncProfileId"/>
29441 <RaiseException name="WebAPIException">
29444 with error type NotFoundError, if the identifier does not match any profile saved.
29447 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29450 with error type NotSupportedError, if this feature is not supported.
29453 with error type SecurityError, if the application does not have the privilege to call this method.
29456 with error type UnknownError, if any other error occurs.
29462 <Operation name="getLastSyncStatistics" id="::DataSynchronization::DataSynchronizationManager::getLastSyncStatistics">
29463 <webidl> <ref>SyncStatistics</ref>[] getLastSyncStatistics(<ref>SyncProfileId</ref> profileId) raises(<ref>WebAPIException</ref>);</webidl>
29466 Gets the sync statistics of a given profile ID.
29475 http://tizen.org/privilege/datasync
29477 <Code> var profileId; //profileId obtained from SyncProfileInfo
29478 // Gets the sync statistics information with the given ID
29479 var statistics = tizen.datasync.getLastSyncStatistics(profileId);
29482 <Type type="array">
29485 SyncStatictics[] The sync statistics information of a given ID.
29488 <Type name="SyncStatistics"/>
29491 <Argument name="profileId">
29494 The ID to use to get the sync statistics.
29497 <Type name="SyncProfileId"/>
29501 <RaiseException name="WebAPIException">
29504 with error type NotFoundError, if the identifier does not match any profile saved.
29507 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
29510 with error type NotSupportedError, if this feature is not supported.
29513 with error type SecurityError, if the application does not have the privilege to call this method.
29516 with error type UnknownError, if any other error occurs.
29523 <Interface name="SyncProgressCallback" id="::DataSynchronization::SyncProgressCallback">
29524 <webidl> [Callback, NoInterfaceObject] interface SyncProgressCallback {
29525 void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);
29527 void oncompleted(<ref>SyncProfileId</ref> profileId);
29529 void onstopped(<ref>SyncProfileId</ref> profileId);
29531 void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);
29535 This interface defines progress notification callbacks for the ongoing sync operation.
29541 <ExtendedAttributeList>
29542 <ExtendedAttribute name="Callback">
29543 <webidl>Callback</webidl>
29544 </ExtendedAttribute>
29545 <ExtendedAttribute name="NoInterfaceObject">
29546 <webidl> NoInterfaceObject</webidl>
29547 </ExtendedAttribute>
29548 </ExtendedAttributeList>
29549 <Operation name="onprogress" id="::DataSynchronization::SyncProgressCallback::onprogress">
29550 <webidl> void onprogress(<ref>SyncProfileId</ref> profileId, <ref>SyncServiceType</ref> serviceType, boolean isFromServer, unsigned long totalPerService, unsigned long syncedPerService);</webidl>
29553 Called when a synchronization operation is started and progress is made.
29557 The frequency of this callback invocation is dependent on the platform implementation.
29558 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.
29565 <Type type="void"/>
29567 <Argument name="profileId">
29570 The ID of the corresponding sync operation.
29573 <Type name="SyncProfileId"/>
29575 <Argument name="serviceType">
29578 The sync service category type.
29581 <Type name="SyncServiceType"/>
29583 <Argument name="isFromServer">
29586 The direction of the operation.<br/> If the direction of operation is from the server to the client, then value is<var> true</var>.
29589 <Type type="boolean"/>
29591 <Argument name="totalPerService">
29594 The total number of records to synchronize for the current sync service type aggregating all operations.
29597 <Type type="unsigned long"/>
29599 <Argument name="syncedPerService">
29602 The number of synchronized records for the current sync service type aggregating all operations.
29605 <Type type="unsigned long"/>
29609 <Operation name="oncompleted" id="::DataSynchronization::SyncProgressCallback::oncompleted">
29610 <webidl> void oncompleted(<ref>SyncProfileId</ref> profileId);</webidl>
29613 Called when the sync operation has completed.
29619 <Type type="void"/>
29621 <Argument name="profileId">
29624 The ID of the corresponding sync operation.
29627 <Type name="SyncProfileId"/>
29631 <Operation name="onstopped" id="::DataSynchronization::SyncProgressCallback::onstopped">
29632 <webidl> void onstopped(<ref>SyncProfileId</ref> profileId);</webidl>
29635 Called when the sync operation is stopped by user.
29641 <Type type="void"/>
29643 <Argument name="profileId">
29646 The ID of the corresponding sync operation.
29649 <Type name="SyncProfileId"/>
29653 <Operation name="onfailed" id="::DataSynchronization::SyncProgressCallback::onfailed">
29654 <webidl> void onfailed(<ref>SyncProfileId</ref> profileId, <ref>WebAPIError</ref> error);</webidl>
29657 Called when the sync operation fails.
29663 <Type type="void"/>
29665 <Argument name="profileId">
29668 The ID of the corresponding sync operation.
29671 <Type name="SyncProfileId"/>
29673 <Argument name="error">
29676 The reason for the sync failure.
29679 <Type name="WebAPIError"/>
29685 <Module name="Download" id="::Download">
29686 <webidl>module Download {
29687 typedef object DownloadHTTPHeaderFields;
29689 enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };
29691 enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };
29693 [NoInterfaceObject] interface DownloadManagerObject {
29694 readonly attribute <ref>DownloadManager</ref> download;
29696 <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;
29698 [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29699 interface DownloadRequest {
29700 attribute DOMString url;
29702 attribute DOMString? destination;
29704 attribute DOMString? fileName;
29706 attribute <ref>DownloadNetworkType</ref>? networkType;
29708 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29711 [NoInterfaceObject] interface DownloadManager {
29712 long start(<ref>DownloadRequest</ref> downloadRequest,
29713 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
29715 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
29717 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
29719 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
29721 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
29723 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
29725 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
29727 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
29730 [Callback, NoInterfaceObject] interface DownloadCallback {
29731 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
29733 void onpaused(long downloadId);
29735 void oncanceled(long downloadId);
29737 void oncompleted(long downloadId, DOMString fullPath);
29739 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
29744 This API provides methods to asynchronously download the contents of a URL to a storage.
29748 For more information on the Download features, see <a href="../../org.tizen.web.appprogramming/html/guide/content_guide/download.htm">Download Guide</a>.
29754 <def-api-feature identifier="http://tizen.org/feature/network.wifi">
29758 To guarantee this application running on a device with Wi-Fi feature, define below in the config file:
29763 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
29767 To guarantee this application running on a device with Cellular feature, define below in the config file:
29773 <Typedef name="DownloadHTTPHeaderFields" id="::Download::DownloadHTTPHeaderFields">
29774 <webidl> typedef object DownloadHTTPHeaderFields;</webidl>
29777 A set of HTTP header fields.
29781 The key / value type of each HTTP header field should be DOMString.
29788 <Type type="object"/>
29790 <Enum name="DownloadState" id="::Download::DownloadState">
29791 <webidl> enum DownloadState { "QUEUED", "DOWNLOADING", "PAUSED", "CANCELED", "COMPLETED", "FAILED" };</webidl>
29794 An enumerator to indicate the state of a download operation.
29798 The following values are supported:
29802 QUEUED - Indicates that the download operation is listed in a queue. </li>
29804 DOWNLOADING - Indicates that the download operation is in progress. </li>
29806 PAUSED - Indicates that the download operation is in a paused state by user request. </li>
29808 CANCELED - Indicates that the download operation is canceled by user request. </li>
29810 COMPLETED - Indicates that the download operation is in a completed state. </li>
29812 FAILED - Indicates that the download operation has failed due to some reasons. </li>
29819 <EnumValue stringvalue="QUEUED">
29820 <webidl> "QUEUED</webidl>
29822 <EnumValue stringvalue="DOWNLOADING">
29823 <webidl> "DOWNLOADING</webidl>
29825 <EnumValue stringvalue="PAUSED">
29826 <webidl> "PAUSED</webidl>
29828 <EnumValue stringvalue="CANCELED">
29829 <webidl> "CANCELED</webidl>
29831 <EnumValue stringvalue="COMPLETED">
29832 <webidl> "COMPLETED</webidl>
29834 <EnumValue stringvalue="FAILED">
29835 <webidl> "FAILED</webidl>
29838 <Enum name="DownloadNetworkType" id="::Download::DownloadNetworkType">
29839 <webidl> enum DownloadNetworkType { "CELLULAR", "WIFI", "ALL" };</webidl>
29842 An enumerator to indicate the network type.
29846 The following values are supported:
29850 CELLULAR - Indicates that the download operation is allowed in the cellular network only. </li>
29852 WIFI - Indicates that the download operation is allowed in the Wi-Fi network only. </li>
29854 ALL - Indicates that the download operation is allowed in all network types. </li>
29861 <EnumValue stringvalue="CELLULAR">
29862 <webidl> "CELLULAR</webidl>
29864 <EnumValue stringvalue="WIFI">
29865 <webidl> "WIFI</webidl>
29867 <EnumValue stringvalue="ALL">
29868 <webidl> "ALL</webidl>
29871 <Interface name="DownloadManagerObject" id="::Download::DownloadManagerObject">
29872 <webidl> [NoInterfaceObject] interface DownloadManagerObject {
29873 readonly attribute <ref>DownloadManager</ref> download;
29877 This interface defines the default download manager that is instantiated by the <em>Tizen </em>object.
29878 There will be a <em>tizen.download </em>object that allows access to the functionality of the Download API.
29884 <ExtendedAttributeList>
29885 <ExtendedAttribute name="NoInterfaceObject">
29886 <webidl>NoInterfaceObject</webidl>
29887 </ExtendedAttribute>
29888 </ExtendedAttributeList>
29889 <Attribute readonly="readonly" name="download" id="::Download::DownloadManagerObject::download">
29890 <webidl> readonly attribute <ref>DownloadManager</ref> download;</webidl>
29891 <Type name="DownloadManager"/>
29894 <Implements name1="Tizen" name2="DownloadManagerObject">
29895 <webidl> <ref>Tizen</ref> implements <ref>DownloadManagerObject</ref>;</webidl>
29897 <Interface name="DownloadRequest" id="::Download::DownloadRequest">
29898 <webidl> [Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)]
29899 interface DownloadRequest {
29900 attribute DOMString url;
29902 attribute DOMString? destination;
29904 attribute DOMString? fileName;
29906 attribute <ref>DownloadNetworkType</ref>? networkType;
29908 attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;
29912 This interface defines the download request object.
29918 <ExtendedAttributeList>
29919 <ExtendedAttribute name="Constructor">
29920 <webidl>Constructor(DOMString url, optional DOMString? destination, optional DOMString? fileName, optional <ref>DownloadNetworkType</ref>? networkType, optional <ref>DownloadHTTPHeaderFields</ref>? httpHeader)</webidl>
29922 <Argument name="url">
29923 <Type type="DOMString"/>
29925 <Argument optional="optional" name="destination">
29926 <Type type="DOMString" nullable="nullable"/>
29928 <Argument optional="optional" name="fileName">
29929 <Type type="DOMString" nullable="nullable"/>
29931 <Argument optional="optional" name="networkType">
29932 <Type name="DownloadNetworkType" nullable="nullable"/>
29934 <Argument optional="optional" name="httpHeader">
29935 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
29938 </ExtendedAttribute>
29939 </ExtendedAttributeList>
29940 <Attribute name="url" id="::Download::DownloadRequest::url">
29941 <webidl> attribute DOMString url;</webidl>
29944 An attribute to store the URL of the object to download.
29950 <Type type="DOMString"/>
29952 <Attribute name="destination" id="::Download::DownloadRequest::destination">
29953 <webidl> attribute DOMString? destination;</webidl>
29956 An attribute to store the folder path of the destination folder to which a requested file object will be downloaded.
29960 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>.
29963 The default value is an empty string.
29970 <Type type="DOMString" nullable="nullable"/>
29972 <Attribute name="fileName" id="::Download::DownloadRequest::fileName">
29973 <webidl> attribute DOMString? fileName;</webidl>
29976 An attribute to store the file name for the specified URL.
29980 If the file name is not given or an empty string, the original file name from URL is used.
29983 The default value is an empty string.
29990 <Type type="DOMString" nullable="nullable"/>
29992 <Attribute name="networkType" id="::Download::DownloadRequest::networkType">
29993 <webidl> attribute <ref>DownloadNetworkType</ref>? networkType;</webidl>
29996 An attribute to store the allowed network type.
30000 If the network type is not given, all network type are allowed.
30003 The default value is "ALL".
30010 <Type name="DownloadNetworkType" nullable="nullable"/>
30012 <Attribute name="httpHeader" id="::Download::DownloadRequest::httpHeader">
30013 <webidl> attribute <ref>DownloadHTTPHeaderFields</ref>? httpHeader;</webidl>
30016 An attribute to store extra HTTP header fields.
30020 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>
30022 The default value is an empty object.
30025 <Code> var req = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt");
30026 req.httpHeader["Pragma"] = "no-cache";
30027 req.httpHeader["Cookie"] = "version=1; Skin=new";
30028 req.httpHeader["X-Agent"] = "Tizen Sample App";
30034 <Type name="DownloadHTTPHeaderFields" nullable="nullable"/>
30037 <Interface name="DownloadManager" id="::Download::DownloadManager">
30038 <webidl> [NoInterfaceObject] interface DownloadManager {
30039 long start(<ref>DownloadRequest</ref> downloadRequest,
30040 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);
30042 void cancel(long downloadId) raises(<ref>WebAPIException</ref>);
30044 void pause(long downloadId) raises(<ref>WebAPIException</ref>);
30046 void resume(long downloadId) raises(<ref>WebAPIException</ref>);
30048 <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);
30050 <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);
30052 DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);
30054 void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);
30058 This interface handles requests for downloading. Each step of download operation will be informed through callbacks.
30064 <ExtendedAttributeList>
30065 <ExtendedAttribute name="NoInterfaceObject">
30066 <webidl>NoInterfaceObject</webidl>
30067 </ExtendedAttribute>
30068 </ExtendedAttributeList>
30069 <Operation name="start" id="::Download::DownloadManager::start">
30070 <webidl> long start(<ref>DownloadRequest</ref> downloadRequest,
30071 optional <ref>DownloadCallback</ref>? downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30074 Starts a download operation with the specified URL information.
30083 http://tizen.org/privilege/download
30085 <Code> var listener = {
30086 onprogress: function(id, receivedSize, totalSize) {
30087 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30089 onpaused: function(id) {
30090 console.log('Paused with id: ' + id);
30092 oncanceled: function(id) {
30093 console.log('Canceled with id: ' + id);
30095 oncompleted: function(id, fullPath) {
30096 console.log('Completed with id: ' + id + ', full path: ' + fullPath);
30098 onfailed: function(id, error) {
30099 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30103 // Starts downloading of the file from the Web with the corresponding callbacks.
30104 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30105 downloadId = tizen.download.start(downloadRequest, listener);
30111 long An identifier for each download operation.
30116 <Argument name="downloadRequest">
30119 The URL and destination information of the object to download.
30122 <Type name="DownloadRequest"/>
30124 <Argument optional="optional" name="downloadCallback">
30127 The method to invoke when the download state changes or an error occurs.
30130 <Type name="DownloadCallback" nullable="nullable"/>
30134 <RaiseException name="WebAPIException">
30137 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30140 with error type NotSupportedError, if this feature is not supported.
30143 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30146 with error type SecurityError, if the application does not have the privilege to call this method.
30149 with error type UnknownError if any other error occurs.
30155 <Operation name="cancel" id="::Download::DownloadManager::cancel">
30156 <webidl> void cancel(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30159 Cancels an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30164 <Code> // Cancels the ongoing download operation with the specified id.
30165 tizen.download.cancel(downloadId);
30168 <Type type="void"/>
30170 <Argument name="downloadId">
30173 The ID of the ongoing download operation to stop.
30176 <Type type="long"/>
30180 <RaiseException name="WebAPIException">
30183 with error type NotFoundError, if the identifier does not match any download operation in progress.
30186 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30189 with error type NotSupportedError, if this feature is not supported.
30192 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30195 with error type UnknownError, if any other error occurs.
30201 <Operation name="pause" id="::Download::DownloadManager::pause">
30202 <webidl> void pause(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30205 Pauses an ongoing download operation that is specified by the <em>downloadId</em> parameter.
30206 The paused download operation can be resumed later by the <em>resume()</em> method.
30211 <Code> // Pauses the ongoing download operation with the specified id.
30212 tizen.download.pause(downloadId);
30215 <Type type="void"/>
30217 <Argument name="downloadId">
30220 The ID of the ongoing download operation to pause.
30223 <Type type="long"/>
30227 <RaiseException name="WebAPIException">
30230 with error type NotFoundError, if the identifier does not match any download operation in progress.
30233 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30236 with error type NotSupportedError, if this feature is not supported.
30239 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30242 with error type UnknownError, if any other error occurs.
30248 <Operation name="resume" id="::Download::DownloadManager::resume">
30249 <webidl> void resume(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30252 Resumes a paused download operation that is specified by the <em>downloadId</em> parameter.
30257 <Code> // Resumes the paused download operation with the specified id.
30258 tizen.download.resume(downloadId);
30261 <Type type="void"/>
30263 <Argument name="downloadId">
30266 The ID of the paused download operation to be resume.
30269 <Type type="long"/>
30273 <RaiseException name="WebAPIException">
30276 with error type NotFoundError, if the identifier does not match any download operation in progress.
30279 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30282 with error type NotSupportedError, if this feature is not supported.
30285 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30288 with error type UnknownError, if any other error occurs.
30294 <Operation name="getState" id="::Download::DownloadManager::getState">
30295 <webidl> <ref>DownloadState</ref> getState(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30298 Gets the download state of an operation synchronously with the specified ID.
30303 <Code> // Gets the state of the download operation with the given id.
30304 var state = tizen.download.getState(downloadId);
30307 <Type name="DownloadState">
30310 DownloadState The current download state of the specified ID.
30315 <Argument name="downloadId">
30318 The ID to get the current state of download operation.
30321 <Type type="long"/>
30325 <RaiseException name="WebAPIException">
30328 with error type NotFoundError, if the identifier does not match any download operation in progress.
30331 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
30334 with error type NotSupportedError, if this feature is not supported.
30337 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
30340 with error type UnknownError, if any other error occurs.
30346 <Operation name="getDownloadRequest" id="::Download::DownloadManager::getDownloadRequest">
30347 <webidl> <ref>DownloadRequest</ref> getDownloadRequest(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30350 Gets the DownloadRequest object from a given id.
30355 <Code> // Gets the download request information with the given id.
30356 var downloadRequest = tizen.download.getDownloadRequest(downloadId);
30359 <Type name="DownloadRequest">
30362 DownloadRequest The download request information of the given id.
30367 <Argument name="downloadId">
30370 The ID to get the download request information.
30373 <Type type="long"/>
30377 <RaiseException name="WebAPIException">
30380 with error type NotFoundError, if the identifier does not match
30381 any download operation in progress.
30384 with error type TypeMismatchError, if the input parameter is not
30385 compatible with the expected type.
30388 with error type NotSupportedError, if this feature is not supported.
30391 with error type InvalidValuesError, if any of the input
30392 parameters contain an invalid value.
30395 with error type UnknownError in any other error case.
30401 <Operation name="getMIMEType" id="::Download::DownloadManager::getMIMEType">
30402 <webidl> DOMString getMIMEType(long downloadId) raises(<ref>WebAPIException</ref>);</webidl>
30405 Gets the MIME type of the downloaded file.
30408 This function will return a valid MIME type when the download operation has been started
30409 and successfully retrieved the file header.
30414 <Code> // Get the MIME type of the download operation with the given id.
30415 var MIMEtype = tizen.download.getMIMEType(downloadId);
30418 <Type type="DOMString">
30421 DOMString The MIME type of the downloaded file.
30426 <Argument name="downloadId">
30429 The ID to get the MIME type information.
30432 <Type type="long"/>
30436 <RaiseException name="WebAPIException">
30439 with error type NotFoundError, if the identifier does not match
30440 any download operation in progress.
30443 with error type TypeMismatchError, if the input parameter is not
30444 compatible with the expected type.
30447 with error type NotSupportedError, if this feature is not supported.
30450 with error type InvalidValuesError, if any of the input
30451 parameters contain an invalid value.
30454 with error type UnknownError in any other error case.
30460 <Operation name="setListener" id="::Download::DownloadManager::setListener">
30461 <webidl> void setListener(long downloadId, <ref>DownloadCallback</ref> downloadCallback) raises(<ref>WebAPIException</ref>);</webidl>
30464 Sets the download callback to the download operation of given id.
30465 It's possible to change or register the listener of download operation using the saved id.
30470 <Code> var listener = {
30471 onprogress: function(id, receivedSize, totalSize) {
30472 console.log('Received with id: ' + id + ', ' + receivedSize + '/' + totalSize);
30474 onpaused: function(id) {
30475 console.log('Paused with id: ' + id);
30477 oncanceled: function(id) {
30478 console.log('Canceled with id: ' + id);
30480 oncompleted: function(id, fileName) {
30481 console.log('Completed with id: ' + id + ', file name: ' + fileName);
30483 onfailed: function(id, error) {
30484 console.log('Failed with id: ' + id + ', error name: ' + error.name);
30488 // Start downloading the html file on the web with the corresponding callbacks.
30489 var downloadRequest = new tizen.DownloadRequest("http://download.tizen.org/tools/README.txt", "documents");
30490 downloadId = tizen.download.start(downloadRequest);
30492 // Add the listener.
30493 tizen.download.setListener(downloadId, listener);
30496 <Type type="void"/>
30498 <Argument name="downloadId">
30501 The ID to set the download callback.
30504 <Type type="long"/>
30506 <Argument name="downloadCallback">
30509 The method to invoke when the download state changes or an error occurs.
30512 <Type name="DownloadCallback"/>
30516 <RaiseException name="WebAPIException">
30519 with error type NotFoundError, if the identifier does not match
30520 any download operation in progress.
30523 with error type TypeMismatchError, if the input parameter is not
30524 compatible with the expected type.
30527 with error type NotSupportedError, if this feature is not supported.
30530 with error type InvalidValuesError, if any of the input
30531 parameters contain an invalid value.
30534 with error type UnknownError in any other error case.
30541 <Interface name="DownloadCallback" id="::Download::DownloadCallback">
30542 <webidl> [Callback, NoInterfaceObject] interface DownloadCallback {
30543 void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);
30545 void onpaused(long downloadId);
30547 void oncanceled(long downloadId);
30549 void oncompleted(long downloadId, DOMString fullPath);
30551 void onfailed(long downloadId, <ref>WebAPIError</ref> error);
30555 This interface defines notification callbacks for the download state change or progress.
30561 <ExtendedAttributeList>
30562 <ExtendedAttribute name="Callback">
30563 <webidl>Callback</webidl>
30564 </ExtendedAttribute>
30565 <ExtendedAttribute name="NoInterfaceObject">
30566 <webidl> NoInterfaceObject</webidl>
30567 </ExtendedAttribute>
30568 </ExtendedAttributeList>
30569 <Operation name="onprogress" id="::Download::DownloadCallback::onprogress">
30570 <webidl> void onprogress(long downloadId, unsigned long long receivedSize, unsigned long long totalSize);</webidl>
30573 Called when a download is successful and it called multiple times as the download progresses.
30574 The interval between <em>onprogress()</em> callback is platform-dependent. When the download is started, the <em>receivedSize </em>can be <var>0</var>.
30580 <Type type="void"/>
30582 <Argument name="downloadId">
30585 The ID of the corresponding download operation.
30588 <Type type="long"/>
30590 <Argument name="receivedSize">
30593 The size of data received in bytes.
30596 <Type type="unsigned long long"/>
30598 <Argument name="totalSize">
30601 The total size of data to receive in bytes.
30604 <Type type="unsigned long long"/>
30608 <Operation name="onpaused" id="::Download::DownloadCallback::onpaused">
30609 <webidl> void onpaused(long downloadId);</webidl>
30612 Called when the download operation is paused by the <em>pause() </em>method.
30618 <Type type="void"/>
30620 <Argument name="downloadId">
30623 The ID of the corresponding download operation.
30626 <Type type="long"/>
30630 <Operation name="oncanceled" id="::Download::DownloadCallback::oncanceled">
30631 <webidl> void oncanceled(long downloadId);</webidl>
30634 Called when download is canceled by the <em>cancel() </em>method.
30640 <Type type="void"/>
30642 <Argument name="downloadId">
30645 The ID of the corresponding download operation.
30648 <Type type="long"/>
30652 <Operation name="oncompleted" id="::Download::DownloadCallback::oncompleted">
30653 <webidl> void oncompleted(long downloadId, DOMString fullPath);</webidl>
30656 Called when the download operation is completed with the final full path.
30657 If the same file name already exists in the destination, it is changed according to the platform policy and delivered in this callback.
30663 <Type type="void"/>
30665 <Argument name="downloadId">
30668 The ID of the corresponding download operation.
30671 <Type type="long"/>
30673 <Argument name="fullPath">
30676 The final full path for the downloaded file.
30679 <Type type="DOMString"/>
30683 <Operation name="onfailed" id="::Download::DownloadCallback::onfailed">
30684 <webidl> void onfailed(long downloadId, <ref>WebAPIError</ref> error);</webidl>
30687 Called when the download operation fails.
30693 <Type type="void"/>
30695 <Argument name="downloadId">
30698 The ID of the corresponding download operation.
30701 <Type type="long"/>
30703 <Argument name="error">
30706 The reason for the download failure.
30709 <Type name="WebAPIError"/>
30715 <Module name="Filesystem" id="::Filesystem">
30716 <webidl>module Filesystem {
30717 enum FileMode { "r", "rw", "w", "a" };
30719 enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };
30721 enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };
30723 [NoInterfaceObject] interface FileSystemManagerObject {
30724 readonly attribute <ref>FileSystemManager</ref> filesystem;
30726 <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;
30728 [NoInterfaceObject] interface FileSystemManager {
30729 readonly attribute long maxPathLength;
30731 void resolve(DOMString location,
30732 <ref>FileSuccessCallback</ref> onsuccess,
30733 optional <ref>ErrorCallback</ref>? onerror,
30734 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
30736 void getStorage(DOMString label,
30737 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30738 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30740 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
30741 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30743 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
30744 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30746 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
30749 [NoInterfaceObject] interface FileSystemStorage {
30750 readonly attribute DOMString label;
30752 readonly attribute <ref>FileSystemStorageType</ref> type;
30754 readonly attribute <ref>FileSystemStorageState</ref> state;
30757 [NoInterfaceObject] interface File {
30758 readonly attribute <ref>File</ref>? parent;
30760 readonly attribute boolean readOnly;
30762 readonly attribute boolean isFile;
30764 readonly attribute boolean isDirectory;
30766 readonly attribute Date? created;
30768 readonly attribute Date? modified;
30770 readonly attribute DOMString path;
30772 readonly attribute DOMString name;
30774 readonly attribute DOMString fullPath;
30776 readonly attribute unsigned long long fileSize;
30778 readonly attribute long length;
30780 DOMString toURI() raises(<ref>WebAPIException</ref>);
30782 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
30783 optional <ref>ErrorCallback</ref>? onerror,
30784 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
30786 void openStream(<ref>FileMode</ref> mode,
30787 <ref>FileStreamSuccessCallback</ref> onsuccess,
30788 optional <ref>ErrorCallback</ref>? onerror,
30789 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30791 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
30792 optional <ref>ErrorCallback</ref>? onerror,
30793 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
30795 void copyTo(DOMString originFilePath,
30796 DOMString destinationFilePath,
30798 optional <ref>SuccessCallback</ref>? onsuccess,
30799 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30801 void moveTo(DOMString originFilePath,
30802 DOMString destinationFilePath,
30804 optional <ref>SuccessCallback</ref>? onsuccess,
30805 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30807 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
30809 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
30811 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
30813 void deleteDirectory(DOMString directoryPath,
30815 optional <ref>SuccessCallback</ref>? onsuccess,
30816 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30818 void deleteFile(DOMString filePath,
30819 optional <ref>SuccessCallback</ref>? onsuccess,
30820 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
30824 dictionary FileFilter {
30827 Date startModified;
30836 [NoInterfaceObject] interface FileStream {
30837 readonly attribute boolean eof;
30839 attribute long position setraises(<ref>WebAPIException</ref>);
30841 readonly attribute long bytesAvailable;
30845 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
30847 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
30849 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
30851 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
30853 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
30855 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
30858 [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
30859 void onsuccess(<ref>File</ref> file);
30862 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
30863 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
30866 [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
30867 void onsuccess(<ref>FileSystemStorage</ref> storage);
30870 [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
30871 void onsuccess(DOMString fileStr);
30874 [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
30875 void onsuccess(<ref>FileStream</ref> filestream);
30878 [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
30879 void onsuccess(<ref>File</ref>[] files);
30884 This API provides access to a device's filesystem.
30888 The filesystem is represented as an abstract collection of disjointed filesystem virtual
30889 root locations, each corresponding to a specific location in the device
30890 filesystem. The filesystem API exposes the hierarchies below these root
30891 locations as a single virtual filesystem, but provides no access to other
30892 parts of the device filesystem.
30895 Each virtual root has a string name. Each file or directory within the virtual
30896 filesystem is addressed using a fully-qualified path of the form:
30897 <em><root name>/<path></em> where <em><rootname></em> is
30898 the name of the virtual root and <em><path></em> is the path to the file or
30899 directory relative to that root.
30902 The following virtual roots MUST be supported:
30906 images: the images location </li>
30908 videos: the videos location </li>
30910 music: the sounds location </li>
30912 documents: the documents location </li>
30914 downloads: the location for downloaded items </li>
30916 ringtones: the location for ringtones (read-only location) </li>
30918 wgt-package: the widget package location (read-only location) </li>
30920 wgt-private: the widget private storage </li>
30922 wgt-private-tmp: the widget private volatile storage area </li>
30925 The file URI path is also supported. if you want to access other paths out of virtual root,
30926 for example '/tmp/', 'file:///tmp' could be used as location parameter.
30929 To access specific locations from those specified above, a file handle
30930 must be retrieved using the filesystem.resolve call.
30933 A file handle represents either a file or a directory. For a file, the
30934 isFile attribute is <em>true</em>. For a directory, the isDirectory attribute
30935 is <em>true</em>. A file can be opened for read and write operations, using a
30936 FileStream handle. A list of files and sub-directories can be obtained from a
30937 directory and a resolve method exists to resolve files or sub-directories
30938 more conveniently than processing directory listings.
30941 The implementation MUST support the use of the following
30942 characters in file names:
30946 Letters (azAZ) </li>
30948 Numbers (0-9) </li>
30952 Underscores ("_") </li>
30954 Hyphens ("-") </li>
30956 Periods (".") </li>
30959 The implementation MAY support additional characters in file names,
30960 depending on platform support.
30963 The implementation MAY forbid the use of additional characters in file
30964 names, depending on the platform. The use of the path separator "/"
30965 in file names MUST NOT be allowed. The "/" character is used as the (path)
30966 component separator.
30969 Some other file name and path characteristics are platform-dependent,
30970 for example, maximum path length, file name length, case sensitivity, additional
30971 character support, etc. Therefore, it is recommended that you avoid any dependency
30972 on aspects that cannot be supported across many platforms.
30975 When a path is used to interact with the underlying filesystem,
30976 the encoding used for the file path SHOULD be the platform default.
30979 For more information on the Filesystem features, see <a href="../../org.tizen.web.appprogramming/html/guide/io_guide/filesystem.htm">File System Guide</a>.
30986 <Enum name="FileMode" id="::Filesystem::FileMode">
30987 <webidl> enum FileMode { "r", "rw", "w", "a" };</webidl>
30990 The file mode provided when opening.
30994 Value "r" to obtain read-only access, "rw" to obtain read and write
30995 access, "w" to obtain write access and "a" for appending.
31002 <EnumValue stringvalue="r">
31003 <webidl> "r</webidl>
31005 <EnumValue stringvalue="rw">
31006 <webidl> "rw</webidl>
31008 <EnumValue stringvalue="w">
31009 <webidl> "w</webidl>
31011 <EnumValue stringvalue="a">
31012 <webidl> "a</webidl>
31015 <Enum name="FileSystemStorageType" id="::Filesystem::FileSystemStorageType">
31016 <webidl> enum FileSystemStorageType { "INTERNAL", "EXTERNAL" };</webidl>
31019 The type of storage.
31024 INTERNAL: Internal storage is storage that cannot be removed, such as a
31025 flash memory. </li>
31027 EXTERNAL: External storage is removable storage, such as a USB drive or
31028 memory cards. </li>
31035 <EnumValue stringvalue="INTERNAL">
31036 <webidl> "INTERNAL</webidl>
31038 <EnumValue stringvalue="EXTERNAL">
31039 <webidl> "EXTERNAL</webidl>
31042 <Enum name="FileSystemStorageState" id="::Filesystem::FileSystemStorageState">
31043 <webidl> enum FileSystemStorageState { "MOUNTED", "REMOVED", "UNMOUNTABLE" };</webidl>
31046 The state of the storage.
31051 MOUNTED: The device is mounted and can be browsed. </li>
31053 REMOVED: The device was removed. This states only applies to external drives. </li>
31055 UNMOUNTABLE: The device cannot be mounted due to an error. </li>
31062 <EnumValue stringvalue="MOUNTED">
31063 <webidl> "MOUNTED</webidl>
31065 <EnumValue stringvalue="REMOVED">
31066 <webidl> "REMOVED</webidl>
31068 <EnumValue stringvalue="UNMOUNTABLE">
31069 <webidl> "UNMOUNTABLE</webidl>
31072 <Interface name="FileSystemManagerObject" id="::Filesystem::FileSystemManagerObject">
31073 <webidl> [NoInterfaceObject] interface FileSystemManagerObject {
31074 readonly attribute <ref>FileSystemManager</ref> filesystem;
31078 Defines what is instantiated in the tizen object.
31082 There will be a tizen.filesystem object that allows accessing the
31083 functionality of the filesystem API.
31090 <ExtendedAttributeList>
31091 <ExtendedAttribute name="NoInterfaceObject">
31092 <webidl>NoInterfaceObject</webidl>
31093 </ExtendedAttribute>
31094 </ExtendedAttributeList>
31095 <Attribute readonly="readonly" name="filesystem" id="::Filesystem::FileSystemManagerObject::filesystem">
31096 <webidl> readonly attribute <ref>FileSystemManager</ref> filesystem;</webidl>
31097 <Type name="FileSystemManager"/>
31100 <Implements name1="Tizen" name2="FileSystemManagerObject">
31101 <webidl> <ref>Tizen</ref> implements <ref>FileSystemManagerObject</ref>;</webidl>
31103 <Interface name="FileSystemManager" id="::Filesystem::FileSystemManager">
31104 <webidl> [NoInterfaceObject] interface FileSystemManager {
31105 readonly attribute long maxPathLength;
31107 void resolve(DOMString location,
31108 <ref>FileSuccessCallback</ref> onsuccess,
31109 optional <ref>ErrorCallback</ref>? onerror,
31110 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);
31112 void getStorage(DOMString label,
31113 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31114 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31116 void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31117 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31119 long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31120 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31122 void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
31126 The file system manager interface that provides access to the filesystem API.
31130 This manager exposes the filesystem base API, and provides functionality, such as
31131 determining root and default locations, resolving a given location
31132 into a file handle, and registering filesystem listeners for
31139 <Code> var documentsDir;
31140 function onsuccess(files) {
31141 for(var i = 0; i < files.length; i++) {
31142 console.log("File Name is " + files[i].name); // displays file name
31145 var testFile = documentsDir.createFile("test.txt");
31147 if (testFile != null) {
31148 testFile.openStream(
31151 fs.write("HelloWorld");
31154 console.log("Error " + e.message);
31155 }, "UTF-8"
31160 function onerror(error) {
31161 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
31164 tizen.filesystem.resolve(
31167 documentsDir = dir;
31168 dir.listFiles(onsuccess, onerror);
31170 console.log("Error" + e.message);
31175 <ExtendedAttributeList>
31176 <ExtendedAttribute name="NoInterfaceObject">
31177 <webidl>NoInterfaceObject</webidl>
31178 </ExtendedAttribute>
31179 </ExtendedAttributeList>
31180 <Attribute readonly="readonly" name="maxPathLength" id="::Filesystem::FileSystemManager::maxPathLength">
31181 <webidl> readonly attribute long maxPathLength;</webidl>
31184 Contains the platform-dependent maximum path length.
31189 <Code> console.log("The maximum path length is " + tizen.filesystem.maxPathLength);
31192 <Type type="long"/>
31194 <Operation name="resolve" id="::Filesystem::FileSystemManager::resolve">
31195 <webidl> void resolve(DOMString location,
31196 <ref>FileSuccessCallback</ref> onsuccess,
31197 optional <ref>ErrorCallback</ref>? onerror,
31198 optional <ref>FileMode</ref>? mode) raises(<ref>WebAPIException</ref>);</webidl>
31201 Resolves a location to a file handle.
31205 It validates and resolves the given location to a file handle.
31206 If the operation completes successfully, the handle is returned
31207 in the FileSuccessCallback.
31208 A valid location is prefixed with a valid root or
31209 default location and must address an existing,
31210 accessible file or directory.
31213 A location can contain virtual path like (<var>documents/some_file.txt</var>)
31214 or it can be a file's URI (<var>file:///my_strange_path/some_file.png</var>).
31217 The list of root locations that MUST be supported by a compliant
31218 implementation are:
31222 documents: Describes the default folder in which text documents
31223 (such as pdf, doc...) are stored by default in the device. For example, in some
31224 platforms it corresponds to the "My Documents" folder. </li>
31226 images: Describes the default folder in which still images, like
31227 pictures (such as jpg, gif, png, etc.), are stored in the
31228 device by default. For example, in some platforms it corresponds to the "My Images"
31231 music: Describes the default folder in which sound clips (such as mp3,
31232 aac, etc.) are stored in the device by default. For example, in some platforms it
31233 corresponds to the "My Music" folder. </li>
31235 videos: Describes the default folder in which video clips (such as
31236 avi, mp4, etc.) are stored in the device by default. For example, in some platforms
31237 it corresponds to the "My Videos" folder. </li>
31239 downloads: Describes the default folder in which files downloaded
31240 (such as by a browser, e-mail client, etc.) are stored by default in the
31241 device. For example, in some platforms it corresponds to the "Downloads" folder.
31244 ringtones: Describes the default folder in which ringtones (such as mp3, etc)
31245 are stored by default in the device. </li>
31247 wgt-package: Describes the read-only folder in which the content of
31248 the widget file was extracted to. </li>
31250 wgt-private: Describes a private folder in which a widget can
31251 store information. This folder MUST be accessible only to the
31252 widget. Other widgets or applications MUST NOT access the
31253 information stored there. </li>
31255 wgt-private-tmp: Describes a temporary, private folder in which a widget
31256 can store data that is available during one widget execution
31257 cycle. Content of this folder MAY be removed from this directory
31258 when the widget is closed or the Web Runtime is restarted.
31259 This folder MUST be accessible only to the widget. Other
31260 widgets or applications MUST NOT have access to it. </li>
31263 The mode parameter specifies whether the resulting File object
31264 has read-only access ("r" access), read and write access ("rw" access),
31265 append access ("a" access), or write access ("w" access)
31266 to the root location containing directory tree.
31267 Permission for the requested access is obtained from the security framework.
31268 Once the resulting File object has access, access is inherited by
31269 any other File objects derived from this instance without any
31270 further reference to the security framework, as noted in
31271 descriptions of certain methods of File.
31274 The ErrorCallback is launched with these error types:
31278 InvalidValuesError: If any of the input parameters contain an invalid value.
31279 For example, the mode is not valid (that is not "r", "rw", "a", or "w"). </li>
31281 NotFoundError: The location input argument does not correspond to a valid location. </li>
31283 UnknownError: In any other error case. </li>
31293 http://tizen.org/privilege/filesystem.read
31295 <Code> tizen.filesystem.resolve(
31298 console.log("Mount point Name is " + dir.path);
31300 console.log("Error: " + e.message);
31305 <Type type="void"/>
31307 <Argument name="location">
31310 Location to resolve.
31313 <Type type="DOMString"/>
31315 <Argument name="onsuccess">
31318 Called when the location has been.
31319 successfully resolved, passing the newly created File object.
31322 <Type name="FileSuccessCallback"/>
31324 <Argument optional="optional" name="onerror">
31327 Called if an error occurred.
31330 <Type name="ErrorCallback" nullable="nullable"/>
31332 <Argument optional="optional" name="mode">
31335 Optional string of value "r" to obtain read-only access,
31336 "rw" to obtain read and write access, "a" to obtain append access,
31337 or "w" to obtain write access to all files and
31338 directories that can be reached from the File object passed
31339 to onsuccess. Defaults to "rw" if absent or <em>null</em>.
31342 <Type name="FileMode" nullable="nullable"/>
31346 <RaiseException name="WebAPIException">
31349 with error type TypeMismatchError, if the input parameter
31350 is not compatible with the expected type for that parameter.
31353 with error type SecurityError, if the application does not have the privilege to call this method.
31356 with error type NotSupportedError, if the feature is not supported.
31362 <Operation name="getStorage" id="::Filesystem::FileSystemManager::getStorage">
31363 <webidl> void getStorage(DOMString label,
31364 <ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31365 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31368 Gets information about a storage based on its label.
31372 Get storage information based on its label (example: "MyThumbDrive",
31373 "InternalFlash"). The onsuccess will receive as input argument the data
31374 structure containing additional information about the drive.
31377 The ErrorCallback is launched with these error types:
31381 NotFoundError: No drive was found with the given label. </li>
31383 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31385 UnknownError: In any other error case. </li>
31395 http://tizen.org/privilege/filesystem.read
31397 <Code> function onStorage(storage) {
31401 function onStorageError(e) {
31402 console.log("Storage not found!" + e.message);
31405 tizen.filesystem.getStorage("music", onStorage, onStorageError);
31408 <Type type="void"/>
31410 <Argument name="label">
31416 <Type type="DOMString"/>
31418 <Argument name="onsuccess">
31421 Called when the list of storage is available,
31422 passing the storage list to the callback.
31425 <Type name="FileSystemStorageSuccessCallback"/>
31427 <Argument optional="optional" name="onerror">
31430 Called if an error occurred.
31433 <Type name="ErrorCallback" nullable="nullable"/>
31437 <RaiseException name="WebAPIException">
31440 with error type TypeMismatchError, if the input parameter
31441 is not compatible with the expected type for that parameter.
31444 with error type SecurityError, if the application does not have the privilege to call this method.
31447 with error type NotSupportedError, if the feature is not supported.
31453 <Operation name="listStorages" id="::Filesystem::FileSystemManager::listStorages">
31454 <webidl> void listStorages(<ref>FileSystemStorageArraySuccessCallback</ref> onsuccess,
31455 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31458 Lists the available storages on the device.
31462 Get the list of available internal and external storage devices. The
31463 onsuccess will receive as input argument a list of the data
31464 structure containing additional information about each drive found.
31465 Can get storages would have a label named as 'internal0', virtual roots (images, documents,...), 'removable1', 'removable2'.
31466 'removable1' label would be used to resolve sdcard and 'removable2' label would be used to resolve usb host, if supported.
31467 The vfat filesystem used widly as sdcard filesystem is not case-sensitive.
31468 If you want to handle the file on sdcard, you need to consider case-sensitive filenames are regarded as same name.
31471 Labels can be different, depends on platform implementation.
31474 The ErrorCallback is launched with these error types:
31478 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
31480 UnknownError: In any other error case. </li>
31490 http://tizen.org/privilege/filesystem.read
31492 <Code> function alertForCorruptedRemovableDrives(storages) {
31493 for (var i = 0; i < storages.length; i++) {
31494 if (storages[i].type != "EXTERNAL")
31496 if (storages[i].state == "UNMOUNTABLE")
31497 console.log("External drive " + storages[i].label + " is corrupted.");
31501 tizen.filesystem.listStorages(alertForCorruptedRemovableDrives);
31504 <Type type="void"/>
31506 <Argument name="onsuccess">
31509 Called when the list of storage is available,
31510 passing the storage list to the callback.
31513 <Type name="FileSystemStorageArraySuccessCallback"/>
31515 <Argument optional="optional" name="onerror">
31518 Called if an error occurred.
31521 <Type name="ErrorCallback" nullable="nullable"/>
31525 <RaiseException name="WebAPIException">
31528 with error type TypeMismatchError, if the input parameter
31529 is not compatible with the expected type for that parameter.
31532 with error type SecurityError, if the application does not have the privilege to call this method.
31535 with error type NotSupportedError, if the feature is not supported.
31541 <Operation name="addStorageStateChangeListener" id="::Filesystem::FileSystemManager::addStorageStateChangeListener">
31542 <webidl> long addStorageStateChangeListener(<ref>FileSystemStorageSuccessCallback</ref> onsuccess,
31543 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
31546 Subscribes to notifications when a storage state changes.
31550 The most common usage for this method would be to watch notifications of
31551 additions and removals of external storages.
31554 When executed, the implementation MUST immediately return a subscription identifier that identifies
31555 the watch operation. After returning the identifier, the watch operation is started
31556 asynchronously. The onsuccess MUST be invoked every time
31557 a storage state changes. If the attempt fails, the onerror (if present)
31558 MUST be invoked with the relevant error type.
31561 The watch operation MUST continue until the removeStorageStateChangeListener() method is
31562 called with the corresponding subscription identifier.
31572 http://tizen.org/privilege/filesystem.write
31574 <Code> var watchID;
31575 function onStorageStateChanged(storage) {
31576 if (storage.state == "MOUNTED")
31577 console.log("Storage " + storage.label + " was added!");
31580 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31586 long The identifier used to clear the watch subscription.
31591 <Argument name="onsuccess">
31594 To be invoked in every change on storage state.
31597 <Type name="FileSystemStorageSuccessCallback"/>
31599 <Argument optional="optional" name="onerror">
31602 To be invoked in case of error during the watch process.
31605 <Type name="ErrorCallback" nullable="nullable"/>
31609 <RaiseException name="WebAPIException">
31612 with error type TypeMismatchError, if any input parameter
31613 is not compatible with the expected type for that parameter.
31616 with error type SecurityError, if the application does not have the privilege to call this method.
31619 with error type NotSupportedError, if the feature is not supported.
31622 with error type UnknownError, if any other error case.
31628 <Operation name="removeStorageStateChangeListener" id="::Filesystem::FileSystemManager::removeStorageStateChangeListener">
31629 <webidl> void removeStorageStateChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
31632 Unsubscribes a storage watch operation.
31636 If the watchId argument is valid and corresponds to a subscription already in
31637 place, the watch process MUST immediately stop and no further callbacks MUST be
31648 http://tizen.org/privilege/filesystem.write
31650 <Code> var watchID;
31651 function onStorageStateChanged(storage) {
31652 if (storage.state == "MOUNTED")
31653 console.log("Storage " + storage.label + " was added!");
31654 tizen.filesystem.removeStorageStateChangeListener(watchID);
31657 watchID = tizen.filesystem.addStorageStateChangeListener(onStorageStateChanged);
31662 <Type type="void"/>
31664 <Argument name="watchId">
31667 Subscription Identifier.
31670 <Type type="long"/>
31674 <RaiseException name="WebAPIException">
31677 with error type TypeMismatchError, if any input parameter
31678 is not compatible with the expected type for that parameter.
31681 with error type InvalidValuesError, if any of the input
31682 parameters contain an invalid value.
31685 with error type SecurityError, if the application does not have the privilege to call this method.
31688 with error type NotSupportedError, if the feature is not supported.
31691 with error type UnknownError, if any other error case.
31694 with error type NotFoundError, if the watchId does not exist.
31701 <Interface name="FileSystemStorage" id="::Filesystem::FileSystemStorage">
31702 <webidl> [NoInterfaceObject] interface FileSystemStorage {
31703 readonly attribute DOMString label;
31705 readonly attribute <ref>FileSystemStorageType</ref> type;
31707 readonly attribute <ref>FileSystemStorageState</ref> state;
31711 The FileSystemStorage interface.
31715 This interface gives additional information about a storage, such as if the
31716 device is mounted, if it's a removable drive or not, or the device's name.
31717 To retrieve the mount point, the resolve() method should be used using
31718 the label as argument.
31725 <ExtendedAttributeList>
31726 <ExtendedAttribute name="NoInterfaceObject">
31727 <webidl>NoInterfaceObject</webidl>
31728 </ExtendedAttribute>
31729 </ExtendedAttributeList>
31730 <Attribute readonly="readonly" name="label" id="::Filesystem::FileSystemStorage::label">
31731 <webidl> readonly attribute DOMString label;</webidl>
31738 Used as input for functions like getStorage() and also used as 'location' parameter for File.resolve() and FileSystemManager.resolve().
31745 <Type type="DOMString"/>
31747 <Attribute readonly="readonly" name="type" id="::Filesystem::FileSystemStorage::type">
31748 <webidl> readonly attribute <ref>FileSystemStorageType</ref> type;</webidl>
31755 Defines whether the storage is internal or external.
31762 <Type name="FileSystemStorageType"/>
31764 <Attribute readonly="readonly" name="state" id="::Filesystem::FileSystemStorage::state">
31765 <webidl> readonly attribute <ref>FileSystemStorageState</ref> state;</webidl>
31772 Defines whether the storage is mounted or not.
31779 <Type name="FileSystemStorageState"/>
31782 <Interface name="File" id="::Filesystem::File">
31783 <webidl> [NoInterfaceObject] interface File {
31784 readonly attribute <ref>File</ref>? parent;
31786 readonly attribute boolean readOnly;
31788 readonly attribute boolean isFile;
31790 readonly attribute boolean isDirectory;
31792 readonly attribute Date? created;
31794 readonly attribute Date? modified;
31796 readonly attribute DOMString path;
31798 readonly attribute DOMString name;
31800 readonly attribute DOMString fullPath;
31802 readonly attribute unsigned long long fileSize;
31804 readonly attribute long length;
31806 DOMString toURI() raises(<ref>WebAPIException</ref>);
31808 void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
31809 optional <ref>ErrorCallback</ref>? onerror,
31810 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
31812 void openStream(<ref>FileMode</ref> mode,
31813 <ref>FileStreamSuccessCallback</ref> onsuccess,
31814 optional <ref>ErrorCallback</ref>? onerror,
31815 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31817 void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
31818 optional <ref>ErrorCallback</ref>? onerror,
31819 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);
31821 void copyTo(DOMString originFilePath,
31822 DOMString destinationFilePath,
31824 optional <ref>SuccessCallback</ref>? onsuccess,
31825 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31827 void moveTo(DOMString originFilePath,
31828 DOMString destinationFilePath,
31830 optional <ref>SuccessCallback</ref>? onsuccess,
31831 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31833 <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);
31835 <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);
31837 <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);
31839 void deleteDirectory(DOMString directoryPath,
31841 optional <ref>SuccessCallback</ref>? onsuccess,
31842 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31844 void deleteFile(DOMString filePath,
31845 optional <ref>SuccessCallback</ref>? onsuccess,
31846 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);
31850 The file interface.
31854 This interface represents the file abstraction in use.
31855 A file handle represents a file
31856 if the isFile property is <em>true</em>, if the isFile property is <em>false</em>, the file
31857 handle represents a directory.
31858 If a file handle represents a directory, it can address files and directories.
31861 The file object permissions for the file object location and tree rooted
31862 at that location depends upon the mode defined in the resolve method.
31863 When a File object creates a child File object,
31864 the new File object inherits its access rights from
31865 the parent object without any reference to the security framework, as
31866 noted in certain methods of File.
31869 A file handle representing a file can be opened for I/O operations,
31870 such as reading and writing.
31873 A file handle representing a directory can be used for listing all
31874 files and directories rooted as the file handle location.
31880 <Code> function onsuccess(files) {
31881 for(var i = 0; i < files.length; i++) {
31882 // alerts each name of dir's contents
31883 console.log(files[i].name);
31887 function onerror(error) {
31888 console.log("The error " + error.message +
31889 " occurred when listing the files in the selected folder");
31892 // list directory contents
31893 dir.listFiles(onsuccess, onerror);
31896 <ExtendedAttributeList>
31897 <ExtendedAttribute name="NoInterfaceObject">
31898 <webidl>NoInterfaceObject</webidl>
31899 </ExtendedAttribute>
31900 </ExtendedAttributeList>
31901 <Attribute readonly="readonly" name="parent" id="::Filesystem::File::parent">
31902 <webidl> readonly attribute <ref>File</ref>? parent;</webidl>
31905 The parent directory handle.
31909 <em>null</em> if there is no parent directory.
31912 If there is no parent directory, this represents a root location.
31918 <Code> // list directory contents
31919 dir.listFiles(onsuccess, onerror);
31921 function onsuccess(files) {
31922 for(var i = 0; i < files.length; i++) {
31923 // prints the file parent, should contain the
31924 // same value for all the files in the loop
31925 console.log("All the files should have the same parent " +
31930 function onerror(error){
31931 console.log("The error " + error.message +
31932 " occurred when listing the files in the selected folder");
31936 <Type name="File" nullable="nullable"/>
31938 <Attribute readonly="readonly" name="readOnly" id="::Filesystem::File::readOnly">
31939 <webidl> readonly attribute boolean readOnly;</webidl>
31942 The file/directory access state in the filesystem.
31946 <em>true</em> if object has read-only access at its location.
31949 <em>false</em> if object has write access at its location.
31952 This attribute represents the actual state of a
31953 file or directory in the filesystem. Its value is not affected by
31954 the mode used in FileSystemManager.resolve that was used to
31955 create the File object from which this File object was obtained.
31961 <Code> // list directory contents
31962 dir.listFiles(onsuccess, onerror);
31964 function onsuccess(files) {
31965 for(var i = 0; i < files.length; i++) {
31966 if(files[i].readOnly)
31967 console.log("Cannot write to file " + files[i].name);
31969 console.log("Can write to file " + files[i].name);
31973 function onerror(error) {
31974 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
31978 <Type type="boolean"/>
31980 <Attribute readonly="readonly" name="isFile" id="::Filesystem::File::isFile">
31981 <webidl> readonly attribute boolean isFile;</webidl>
31988 <em>true</em> if this handle is a file.
31989 <em>false</em> if this handle is a directory.
31996 <Type type="boolean"/>
31998 <Attribute readonly="readonly" name="isDirectory" id="::Filesystem::File::isDirectory">
31999 <webidl> readonly attribute boolean isDirectory;</webidl>
32006 <em>true</em> if this handle is a directory,
32007 <em>false</em> if this handle is a file.
32014 <Type type="boolean"/>
32016 <Attribute readonly="readonly" name="created" id="::Filesystem::File::created">
32017 <webidl> readonly attribute Date? created;</webidl>
32020 The creation timestamp of this file.
32024 This is the timestamp when the file was first created in the filesystem.
32025 Equivalent to the timestamp when a call to createFile() succeeds.
32028 If the platform does not support this attribute, it MUST
32032 It is unspecified and platform-dependent if the creation
32033 timestamp changes when a file is moved.
32040 <Type type="Date" nullable="nullable"/>
32042 <Attribute readonly="readonly" name="modified" id="::Filesystem::File::modified">
32043 <webidl> readonly attribute Date? modified;</webidl>
32046 The modification timestamp.
32050 The modification timestamp of this file. This is the timestamp
32051 of the most recent modification to the file, usually when the last
32052 write operation succeeded. Opening a file for reading does not change
32053 the modification timestamp.
32056 If the platform does not support this attribute, it MUST
32060 It is unspecified and platform-dependent if the modified
32061 timestamp changes when a file is moved.
32067 <Code> console.log(file.modified); // displays the modification timestamp
32070 <Type type="Date" nullable="nullable"/>
32072 <Attribute readonly="readonly" name="path" id="::Filesystem::File::path">
32073 <webidl> readonly attribute DOMString path;</webidl>
32076 The path of this file, excluding the file name.
32080 This is the path of this file, beginning with the name of the root containing the file,
32081 up to and including the directory containing the file, but excluding the file name.
32084 Except in a special case of the File representing the root itself, the last
32085 character is always the character '/'.
32088 For example, if a file is located at music/ramones/volume1/RockawayBeach.mp3,
32089 the path would be music/ramones/volume1/.
32092 For example, if a directory is located at music/ramones/volume1, the path would be
32096 For the virtual roots, the path is same as the name of the virtual root.
32097 For example, if the root is music, then the path is music. If the root is documents, then the path is documents.
32103 <Code> console.log(file.path); // should be 'music/' if the file is music/foo.mp3
32106 <Type type="DOMString"/>
32108 <Attribute readonly="readonly" name="name" id="::Filesystem::File::name">
32109 <webidl> readonly attribute DOMString name;</webidl>
32112 The file name, excluding any path components.
32116 This is the name of this file, excluding the root name and any other path components.
32119 For example, if a file is located at
32120 music/ramones/volume1/RockawayBeach.mp3, the name would be RockawayBeach.mp3.
32123 For example, if a directory is located at music/ramones/volume1, the
32124 name would be volume1.
32127 For the special case of the root itself, the name is an empty string.
32133 <Code> console.log(file.name); // should be foo.mp3 if the file path is music/foo.mp3
32136 <Type type="DOMString"/>
32138 <Attribute readonly="readonly" name="fullPath" id="::Filesystem::File::fullPath">
32139 <webidl> readonly attribute DOMString fullPath;</webidl>
32142 The full path of this file.
32146 The full path of this file, beginning with the name of the root containing the file,
32147 and including the name of the file or directory itself.
32150 For instance, for a file, if the file is located at
32151 music/ramones/volume1/RockawayBeach.mp3, then the fullPath is
32152 music/ramones/volume1/RockawayBeach.mp3.
32155 For a directory, if the directory is located at music/ramones/volume1, then the
32156 fullPath is music/ramones/volume1.
32159 For the special case of the root itself, if the root is music, then the fullPath is
32163 The fullPath is always equal to path + name.
32169 <Code> console.log(file.fullPath); // should be music/track1.mp3 if the file is music/track1.mp3
32172 <Type type="DOMString"/>
32174 <Attribute readonly="readonly" name="fileSize" id="::Filesystem::File::fileSize">
32175 <webidl> readonly attribute unsigned long long fileSize;</webidl>
32178 The size of this file, in bytes.
32182 If there's an attempt to read this attribute on a directory,
32183 <em>undefined</em> is returned. To retrieve the
32184 number of files and directories contained in the directory,
32185 use the length attribute, instead.
32191 <Code> console.log(file.fileSize); // displays the file size
32194 <Type type="unsigned long long"/>
32196 <Attribute readonly="readonly" name="length" id="::Filesystem::File::length">
32197 <webidl> readonly attribute long length;</webidl>
32200 The number of files and directories contained in this file handle.
32204 If there's an attempt to read this attribute on a file,
32205 <em>undefined</em> is returned. To retrieve the
32206 size of a file, use the fileSize attribute instead.
32212 <Code> console.log(file.length); // '3' if the directory contains two files and one sub-directory
32215 <Type type="long"/>
32217 <Operation name="toURI" id="::Filesystem::File::toURI">
32218 <webidl> DOMString toURI() raises(<ref>WebAPIException</ref>);</webidl>
32221 Returns a URI for the file.
32225 Returns a URI that can be used to identify this entry (such as using it
32226 as the src attribute on an HTML img element). The URI has no specific
32227 expiration, it should be valid at least as long as the file exists.
32230 When this method is invoked, the implementation MUST generate a URI.
32233 If that URI corresponds to any of the public virtual roots (that is
32234 images, videos, music, documents, and downloads) the URI
32235 MUST be globally unique and could be used by any widget.
32238 If that URI corresponds to a file located in any of the widget private
32239 areas (such as wgt-package, wgt-private, wgt-private-tmp). The generated
32240 URI MUST be unique for that file and for the widget making the request
32241 (such as including some derived from the widget id in the URI).
32242 These URIs MUST NOT be accessible to other widgets,
32243 apart from the one invoking this method.
32253 http://tizen.org/privilege/filesystem.read
32255 <Code> // 'file:///opt/usr/media/music/ramones/RockawayBeach.mp3' if the file is
32256 // music/ramones/RockawayBeach.mp3
32257 console.log(file.toURI());
32260 <Type type="DOMString">
32263 DOMString The URI that identifies the file or <em>null</em> if an error occurs.
32269 <RaiseException name="WebAPIException">
32272 with error type NotSupportedError, if the feature is not supported.
32275 with error type SecurityError, if the application does not have the privilege to call this method.
32278 with error type UnknownError in any other error situation.
32284 <Operation name="listFiles" id="::Filesystem::File::listFiles">
32285 <webidl> void listFiles(<ref>FileArraySuccessCallback</ref> onsuccess,
32286 optional <ref>ErrorCallback</ref>? onerror,
32287 optional <ref>FileFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
32290 Returns the list of all files in this directory.
32294 The list of files will be passed as a File[] in the onsuccess
32295 and contains directories and files. However, the directories "." and ".."
32296 MUST NOT be returned. Each File object part of the array MUST inherit
32297 all the access rights (that is one of the values in FileMode) from the File object in which
32298 this method was invoked.
32301 If the filter is passed and contains valid values, only those directories
32302 and files in the directory that match the filter criteria specified
32303 in the FileFilter interface MUST be returned in the onsuccess.
32304 If no filter is passed, the filter is <em>null</em> or undefined, or the filter contains invalid
32305 values, the implementation MUST return the full list of files in the directory.
32308 If the directory does not contain any files or directories, or
32309 the filter criteria is unmatched to any files or directories, the onsuccess will be
32310 invoked with an empty array.
32313 The ErrorCallback is launched with these error types:
32317 IOError: The operation is launched on a file (not a directory). </li>
32319 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32321 UnknownError: In any other error case. </li>
32331 http://tizen.org/privilege/filesystem.read
32333 <Code> function onsuccess(files) {
32334 console.log("There are " + files.length + " in the selected folder");
32337 function onerror(error) {
32338 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32341 tizen.filesystem.resolve(
32342 "documents",
32344 dir.listFiles(onsuccess, onerror);
32346 console.log("Error " + e.message);
32351 <Type type="void"/>
32353 <Argument name="onsuccess">
32356 Called when the list operation has been successfully completed.
32359 <Type name="FileArraySuccessCallback"/>
32361 <Argument optional="optional" name="onerror">
32364 Called if an error occurred.
32367 <Type name="ErrorCallback" nullable="nullable"/>
32369 <Argument optional="optional" name="filter">
32372 Used to restrict the listed files.
32375 <Type name="FileFilter" nullable="nullable"/>
32379 <RaiseException name="WebAPIException">
32382 with error type TypeMismatchError, if the input parameter
32383 is not compatible with the expected type for that parameter.
32386 with error type SecurityError, if the application does not have the privilege to call this method.
32389 with error type NotSupportedError, if the feature is not supported.
32395 <Operation name="openStream" id="::Filesystem::File::openStream">
32396 <webidl> void openStream(<ref>FileMode</ref> mode,
32397 <ref>FileStreamSuccessCallback</ref> onsuccess,
32398 optional <ref>ErrorCallback</ref>? onerror,
32399 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32402 Opens the file in the given mode supporting the given
32407 This operation is performed asynchronously. If the file is opened
32408 successfully, the onsuccess is invoked with a FileStream
32409 that can be used for reading and writing the file, depending on the
32410 mode. The return FileStream instance includes a file pointer, which represents
32411 the current position in the file. The filepointer will, by default, be at the start of the file,
32412 except in the case of opening with append ("a") mode, in which case
32413 the filepointer points to the end of the file.
32416 The ErrorCallback is launched with these error types:
32420 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
32422 IOError: The operation is launched on a directory (not a file), the file is not
32423 valid or it does not exist. </li>
32425 UnknownError: In any other error case. </li>
32435 http://tizen.org/privilege/filesystem.read
32437 <Code> var documentsDir;
32438 function onsuccess(files) {
32439 for(var i = 0; i < files.length; i++) {
32440 console.log("File Name is " + files[i].name); // displays file name
32443 var testFile = documentsDir.createFile("test.txt");
32444 if (testFile != null) {
32445 testFile.openStream(
32448 fs.write("HelloWorld");
32451 console.log("Error " + e.message);
32452 }, "UTF-8"
32457 function onerror(error) {
32458 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32461 tizen.filesystem.resolve(
32464 documentsDir = dir; dir.listFiles(onsuccess,onerror);
32466 console.log("Error" + e.message);
32471 <Type type="void"/>
32473 <Argument name="mode">
32476 The mode for opening a file:
32477 <b>"r"</b> for reading
32478 <b>"a"</b> for appending
32479 <b>"w"</b> for [over]writing
32480 <b>"rw"</b> for reading and writing
32483 <Type name="FileMode"/>
32485 <Argument name="onsuccess">
32488 Called when the file has been opened.
32491 <Type name="FileStreamSuccessCallback"/>
32493 <Argument optional="optional" name="onerror">
32496 Called if an error occurred.
32499 <Type name="ErrorCallback" nullable="nullable"/>
32501 <Argument optional="optional" name="encoding">
32504 The encoding for read/write operations on the file,
32505 at least the following encodings MUST be supported:
32506 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32507 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32508 If no encoding is passed by the developer, then the default platform encoding
32512 <Type type="DOMString" nullable="nullable"/>
32516 <RaiseException name="WebAPIException">
32519 with error type TypeMismatchError, if the input parameter
32520 is not compatible with the expected type for that parameter.
32523 with error type SecurityError, if the application does not have the privilege to call this method.
32526 with error type NotSupportedError, if the feature is not supported.
32532 <Operation name="readAsText" id="::Filesystem::File::readAsText">
32533 <webidl> void readAsText(<ref>FileStringSuccessCallback</ref> onsuccess,
32534 optional <ref>ErrorCallback</ref>? onerror,
32535 optional DOMString? encoding) raises(<ref>WebAPIException</ref>);</webidl>
32538 Reads the content of a file as a DOMString.
32542 If the operation is successfully executed, the onsuccess is
32543 invoked and a DOMString is passed as input parameter that represents
32544 the file content in the format determined by the encoding parameter.
32547 The ErrorCallback is launched with these error types:
32551 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32553 IOError: The operation is launched on a directory (not a file), the file is not
32554 valid, or the file does not exist. </li>
32556 UnknownError: In any other error case. </li>
32566 http://tizen.org/privilege/filesystem.read
32568 <Code> function onsuccess(files) {
32569 for(var i = 0; i < files.length; i++) {
32570 console.log("File Name is " + files[i].name); // displays file name
32571 if (files[i].isDirectory == false)
32572 files[i].readAsText(
32574 console.log("The file content " + str);
32576 console.log("Error " + e.message);
32577 }, "UTF-8"
32582 function onerror(error) {
32583 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
32587 tizen.filesystem.resolve(
32590 documentsDir = dir;
32591 dir.listFiles(onsuccess,onerror);
32593 console.log("Error" + e.message);
32598 <Type type="void"/>
32600 <Argument name="onsuccess">
32603 Called when the file has been successfully read.
32606 <Type name="FileStringSuccessCallback"/>
32608 <Argument optional="optional" name="onerror">
32611 If an error occurs while reading the file.
32614 <Type name="ErrorCallback" nullable="nullable"/>
32616 <Argument optional="optional" name="encoding">
32619 The encoding for read/write operations on the file,
32620 at least the following encodings MUST be supported:
32621 "<a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>" default encoding,
32622 "<a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>" latin1 encoding.
32623 If no encoding is passed by the developer, then the default platform
32624 encoding MUST be used.
32627 <Type type="DOMString" nullable="nullable"/>
32631 <RaiseException name="WebAPIException">
32634 with error type TypeMismatchError, if the input parameter
32635 is not compatible with the expected type for that parameter.
32638 with error type SecurityError, if the application does not have the privilege to call this method.
32641 with error type NotSupportedError, if the feature is not supported.
32647 <Operation name="copyTo" id="::Filesystem::File::copyTo">
32648 <webidl> void copyTo(DOMString originFilePath,
32649 DOMString destinationFilePath,
32651 optional <ref>SuccessCallback</ref>? onsuccess,
32652 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32655 Copies (and overwrites if possible and specified) a file or a
32656 directory from a specified location to another specified location.
32660 The copy of the file or directory identified by the originFilePath parameter
32661 MUST be created in the path passed in the destinationFilePath parameter.
32664 The file or directory to be copied MUST be under the Directory from which the method
32665 is invoked, otherwise the operation MUST NOT be performed.
32668 If the copy is performed successfully, the onsuccess is invoked.
32671 The ErrorCallback is launched with these error types:
32675 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32677 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32679 IOError: The File in which the copyTo method is invoked is a file (not a directory),
32680 originFilePath corresponds to a file or directory in use by another process,
32681 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32682 file or directory. </li>
32684 UnknownError: In any other error case. </li>
32694 http://tizen.org/privilege/filesystem.write
32696 <Code> var documentsDir;
32697 function onsuccess(files) {
32698 for(var i = 0; i < files.length; i++) {
32699 if (files[i].isDirectory == false) {
32700 documentsDir.copyTo(files[i].fullPath,
32701 "images/backup/" + files[i].name,
32703 function(){console.log("file copied");});
32708 function onerror(error) {
32709 console.log("The error " + error.message +
32710 " occurred when listing the files in the selected folder");
32713 tizen.filesystem.resolve(
32716 documentsDir = dir;
32717 dir.listFiles(onsuccess, onerror);
32719 console.log("Error" + e.message);
32724 <Type type="void"/>
32726 <Argument name="originFilePath">
32729 The origin full virtual file or directory path, it must be under the current directory.
32732 <Type type="DOMString"/>
32734 <Argument name="destinationFilePath">
32737 The new full virtual file path or directory path.
32740 <Type type="DOMString"/>
32742 <Argument name="overwrite">
32745 <em>true</em> enforces overwriting an existing file.
32748 <Type type="boolean"/>
32750 <Argument optional="optional" name="onsuccess">
32753 Called when the file has been copied.
32756 <Type name="SuccessCallback" nullable="nullable"/>
32758 <Argument optional="optional" name="onerror">
32761 Called if an error occurred.
32764 <Type name="ErrorCallback" nullable="nullable"/>
32768 <RaiseException name="WebAPIException">
32771 with error type TypeMismatchError, if the input parameter
32772 is not compatible with the expected type for that parameter.
32775 with error type SecurityError, if the application does not have the privilege to call this method.
32778 with error type NotSupportedError, if the feature is not supported.
32784 <Operation name="moveTo" id="::Filesystem::File::moveTo">
32785 <webidl> void moveTo(DOMString originFilePath,
32786 DOMString destinationFilePath,
32788 optional <ref>SuccessCallback</ref>? onsuccess,
32789 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
32792 Moves a file or a directory from a specified location to another.
32796 The file or directory will be moved (and will overwrite if possible and specified)
32797 atomically to the given path. This operation is different from
32798 instantiating copyTo and then deleting the original file, as on certain
32799 platforms, this operation does not require extra disk space.
32802 The file or directory identified by the originFilePath parameter
32803 MUST be moved to the path passed in the destinationFilePath parameter.
32806 The file to be moved MUST be under the Directory from which the method
32807 is invoked, otherwise the operation MUST NOT be performed.
32810 If the file or directory is moved successfully, the onsuccess is
32814 The ErrorCallback is launched with these error types:
32818 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
32820 NotFoundError: originFilePath does not correspond to a valid file or destinationPath is not a valid path. </li>
32822 IOError: The File in which the moveTo method is invoked is a file (not a directory),
32823 originFilePath corresponds to a file or directory in use by another process,
32824 overwrite parameter is <em>false</em> and destinationFilePath corresponds to an existing
32825 file or directory. </li>
32827 UnknownError: In any other error case. </li>
32837 http://tizen.org/privilege/filesystem.write
32839 <Code> var documentsDir;
32840 function onsuccess(files) {
32841 for(var i = 0; i < files.length; i++) {
32842 if (files[i].isDirectory == false) {
32843 documentsDir.moveTo(files[i].fullPath,
32844 "images/newFolder/" + files[i].name,
32846 function(){console.log("file moved");});
32851 function onerror(error) {
32852 console.log("The error " + error.message +
32853 " occurred during listing the files in the selected folder");
32856 tizen.filesystem.resolve(
32859 documentsDir = dir;
32860 dir.listFiles(onsuccess, onerror);
32862 console.log("Error" + e.message);
32867 <Type type="void"/>
32869 <Argument name="originFilePath">
32872 The origin full virtual file or directory path, it must be under the current directory.
32875 <Type type="DOMString"/>
32877 <Argument name="destinationFilePath">
32880 The new full virtual file path or directory path.
32883 <Type type="DOMString"/>
32885 <Argument name="overwrite">
32888 <em>true</em> enforces overwriting an existing file.
32891 <Type type="boolean"/>
32893 <Argument optional="optional" name="onsuccess">
32896 Called when the file has been moved.
32899 <Type name="SuccessCallback" nullable="nullable"/>
32901 <Argument optional="optional" name="onerror">
32904 Called if an error occurred.
32907 <Type name="ErrorCallback" nullable="nullable"/>
32911 <RaiseException name="WebAPIException">
32914 with error type TypeMismatchError, if the input parameter
32915 is not compatible with the expected type for that parameter.
32918 with error type SecurityError, if the application does not have the privilege to call this method.
32921 with error type NotSupportedError, if the feature is not supported.
32927 <Operation name="createDirectory" id="::Filesystem::File::createDirectory">
32928 <webidl> <ref>File</ref> createDirectory(DOMString dirPath) raises(<ref>WebAPIException</ref>);</webidl>
32931 Creates a new directory.
32935 A new directory will be created relative to the current
32936 directory that this operation is performed on. The implementation will attempt to
32937 create all necessary sub-directories specified in the dirPath, as well. The use of "."
32938 or ".." in path components is not supported.
32941 This operation can only be performed on file handlers that
32942 represent a directory (that is, <var>isDirectory == true</var>).
32945 If the directory is successfully created, it will be returned.
32948 In case the directory cannot be created, an error MUST be thrown
32949 with the appropriate error type.
32959 http://tizen.org/privilege/filesystem.write
32961 <Code> var dir; //Directory object obtained from filesystem API
32962 var newDir = dir.createDirectory("newDir");
32963 var anotherNewDir = dir.createDirectory("newDir1/subNewDir1");
32969 File The file handle of the new directory. The new File object
32970 will have "rw" access rights, as it inherits this from
32971 the File object on which the createDirectory() method is
32977 <Argument name="dirPath">
32980 The relative directory path, it should only contain
32981 characters supported by the underlying filesystem.
32984 <Type type="DOMString"/>
32988 <RaiseException name="WebAPIException">
32991 with error type IOError, if the dirPath already exists.
32994 with error type InvalidValuesError, if the dirPath does not contain a valid path.
32997 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33000 with error type SecurityError, if the application does not have the privilege to call this method.
33003 with error type NotSupportedError, if the feature is not supported.
33006 with error type UnknownError in any other error case.
33012 <Operation name="createFile" id="::Filesystem::File::createFile">
33013 <webidl> <ref>File</ref> createFile(DOMString relativeFilePath) raises(<ref>WebAPIException</ref>);</webidl>
33016 Creates a new empty file in a specified location.
33020 A new empty file is created in the given path relative
33021 to the directory indicated by current 'File' object's 'path' attribute.
33022 The use of "." or ".." in path components is not supported.
33023 This operation can only be performed on file handlers that
33024 represent a directory (that is, <var>isDirectory == true</var>).
33027 If the file is successfully created, a file handler MUST
33028 be returned by this method.
33031 In case the file cannot be created, an error MUST be thrown
33032 with the appropriate error type.
33042 http://tizen.org/privilege/filesystem.write
33044 <Code> var newFile = dir.createFile("newFilePath");
33050 File The file handle of the new empty file. The new File object
33051 will have "rw" access rights, as it inherits this from
33052 the File object on which the createFile() method is
33058 <Argument name="relativeFilePath">
33061 The new file path, it should only contain characters supported by the underlying filesystem.
33064 <Type type="DOMString"/>
33068 <RaiseException name="WebAPIException">
33071 with error type IOError, if the filePath already exists.
33074 with error type InvalidValuesError, if the filePath contains an invalid value.
33077 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
33080 with error type SecurityError, if the application does not have the privilege to call this method.
33083 with error type NotSupportedError, if the feature is not supported.
33086 with error type UnknownError, in any other error case.
33092 <Operation name="resolve" id="::Filesystem::File::resolve">
33093 <webidl> <ref>File</ref> resolve(DOMString filePath) raises(<ref>WebAPIException</ref>);</webidl>
33096 Resolves an existing file or directory relative to
33097 the current directory this operation is performed on, and
33098 returns a file handle for it.
33102 The filePath is not allowed to contain the "." or ".." directories.
33105 The encoding of file paths is <a href="http://www.ietf.org/rfc/rfc2279.txt">UTF-8</a>.
33115 http://tizen.org/privilege/filesystem.read
33118 // Resolves helloWorld.doc file that is located in the
33119 // documents root location
33120 tizen.filesystem.resolve(
33122 function(dir){ file = dir.resolve("helloWorld.doc");},
33123 function(e){ console.log("Error" + e.message);},
33130 File The file handle of the file. The new File object will inherit its access
33131 rights from the File object on which this resolve() method
33137 <Argument name="filePath">
33140 The relative file/directory path/file URI to resolve.
33143 <Type type="DOMString"/>
33147 <RaiseException name="WebAPIException">
33150 with error type TypeMismatchError, if the input parameter
33151 is not compatible with the expected type for that parameter.
33154 with error type InvalidValuesError, if the file path contains an
33158 with error type IOError, if the method is executed in a File object
33159 that does not represent a directory (that is, isDirectory attribute is false).
33162 with error type NotFoundError, if a file does not exist for the passed
33166 with error type SecurityError, if the application does not have the privilege to call this method.
33169 with error type NotSupportedError, if the feature is not supported.
33172 with error type UnknownError in any other error case.
33178 <Operation name="deleteDirectory" id="::Filesystem::File::deleteDirectory">
33179 <webidl> void deleteDirectory(DOMString directoryPath,
33181 optional <ref>SuccessCallback</ref>? onsuccess,
33182 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33185 Deletes a specified directory and directory tree if specified.
33189 This function attempts to asynchronously delete a directory or directory tree under the current
33193 If the recursive parameter is set to <em>true</em>, all the directories and files under the specified
33194 directory MUST be deleted. If the recursive parameter is set to false, the directory will
33195 only be deleted if it is empty, otherwise an IOError error type will be passed in onerror.
33198 The directory to be deleted MUST be under the Directory that the method
33199 is invoked from, otherwise the operation MUST NOT be performed.
33200 If the deletion is performed successfully, the onsuccess is invoked.
33203 The ErrorCallback is launched with these error types:
33207 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33209 NotFoundError: The passed directory does not correspond to a valid directory. </li>
33211 IOError: The File in which the delete method is invoked
33212 is a file (not a directory), the directory is in use by another process
33213 or the directory is not empty and recursive argument is <em>false</em>.
33214 This code will be also used if a recursive deletion partially fails
33215 and any data deleted so far cannot be recovered. This may occur
33216 due to the lack of filesystem permissions or if any
33217 directories or files are opened by other processes. </li>
33219 UnknownError: In any other error case. </li>
33229 http://tizen.org/privilege/filesystem.write
33231 <Code> var documentsDir;
33232 function onsuccess(files) {
33233 for(var i = 0; i < files.length; i++) {
33234 if (files[i].isDirectory) {
33235 documentsDir.deleteDirectory(
33239 console.log("Directory Deleted");
33241 console.log("Error" + e.message);
33244 documentsDir.deleteFile(
33247 console.log("File Deleted");
33249 console.log("Error" + e.message);
33255 function onerror(error) {
33256 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33259 tizen.filesystem.resolve(
33262 documentsDir = dir;
33263 dir.listFiles(onsuccess,onerror);
33265 console.log("Error" + e.message);
33270 <Type type="void"/>
33272 <Argument name="directoryPath">
33275 The full virtual path to the directory to be deleted (must be under the current one).
33278 <Type type="DOMString"/>
33280 <Argument name="recursive">
33283 <em>true</em> means a recursive deletion. This
33284 will delete all data in all subdirectories. Use with caution.
33287 <Type type="boolean"/>
33289 <Argument optional="optional" name="onsuccess">
33292 Called if the directory is successfully deleted.
33295 <Type name="SuccessCallback" nullable="nullable"/>
33297 <Argument optional="optional" name="onerror">
33300 Called if an error occurred.
33303 <Type name="ErrorCallback" nullable="nullable"/>
33307 <RaiseException name="WebAPIException">
33310 with error type TypeMismatchError, if the input parameter
33311 is not compatible with the expected type for that parameter.
33314 with error type SecurityError, if the application does not have the privilege to call this method.
33317 with error type NotSupportedError, if the feature is not supported.
33323 <Operation name="deleteFile" id="::Filesystem::File::deleteFile">
33324 <webidl> void deleteFile(DOMString filePath,
33325 optional <ref>SuccessCallback</ref>? onsuccess,
33326 optional <ref>ErrorCallback</ref>? onerror) raises(<ref>WebAPIException</ref>);</webidl>
33329 Deletes a specified file.
33333 This function attempts to asynchronously delete a file under the current directory.
33336 The file to be deleted MUST be under the Directory from which the method
33337 is invoked, otherwise the operation MUST NOT be performed.
33340 If the deletion is performed successfully, the onsuccess is invoked.
33343 The ErrorCallback is launched with these error types:
33347 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
33349 NotFoundError: The file does not correspond to a valid file. </li>
33351 IOError: The file in which the delete method is invoked
33352 is a directory (not a file), the file is in use by another process,
33353 or there is no permission in the file system. </li>
33355 UnknownError: In any other error case. </li>
33365 http://tizen.org/privilege/filesystem.write
33367 <Code> function onsuccess(files) {
33368 for(var i = 0; i < files.length; i++) {
33369 if (files[i].isDirectory) {
33370 documentsDir.deleteDirectory(
33374 console.log("Directory Deleted");
33376 console.log("Error" + e.message);
33379 documentsDir.deleteFile(
33382 console.log("File Deleted");
33384 console.log("Error" + e.message);
33390 function onerror(error) {
33391 console.log("The error " + error.message + " occurred when listing the files in the selected folder");
33395 tizen.filesystem.resolve(
33398 documentsDir = dir;
33399 dir.listFiles(onsuccess,onerror);
33401 console.log("Error" + e.message);
33406 <Type type="void"/>
33408 <Argument name="filePath">
33411 The full virtual path to the file to be deleted (must be under the current directory).
33414 <Type type="DOMString"/>
33416 <Argument optional="optional" name="onsuccess">
33419 Called if the file is successfully deleted.
33422 <Type name="SuccessCallback" nullable="nullable"/>
33424 <Argument optional="optional" name="onerror">
33427 Called if an error occurred.
33430 <Type name="ErrorCallback" nullable="nullable"/>
33434 <RaiseException name="WebAPIException">
33437 with error type TypeMismatchError, if the input parameter
33438 is not compatible with the expected type for that parameter.
33441 with error type SecurityError, if the application does not have the privilege to call this method.
33444 with error type NotSupportedError, if the feature is not supported.
33451 <Dictionary name="FileFilter" id="::Filesystem::FileFilter">
33452 <webidl> dictionary FileFilter {
33455 Date startModified;
33465 Dictionary created to filter the items returned by the listFiles method.
33469 When this dictionary is passed in the listFiles method, the result-set of
33470 the listFiles method MUST only contain the file items entries that match
33471 the attribute values of the filter.
33472 The result set of the listFiles method does not guarantee any sort order.
33475 A file item only matches the FileFilter object if all the attributes of the file item match
33476 all the attribute values of the filter which are defined (that is, only matching values other
33477 than undefined or <em>null</em>). This is similar to an SQL "AND" operation.
33480 An attribute of the file entry matches the FileFilter attribute value in accordance with the
33485 For FileFilter attributes of type DOMString, an entry matches this value only if its
33486 corresponding attribute is an exact match. If the filter contains U+0025 'PERCENT SIGN' it is
33487 interpreted as a wildcard character and '%' matches any string of any length, including no
33488 length. If wildcards are used, the behavior is similar to the LIKE condition in SQL. To
33489 specify that a 'PERCENT SIGN' character is to be considered literally instead of interpreting it
33490 as a wildcard, developers may escape it with the backslash character (\).
33491 The matching is not case sensitive, such as "FOO" matches a "foo" or an "f%" filter.
33494 For File entry attributes of type Date, attributes start and end are included to allow
33495 filtering of File entries between two supplied dates. If either or both of these attributes are
33496 specified, the following rules apply:
33497 A) If both start and end dates are specified (that is, other than <em>null</em>), a File entry matches the
33498 filter if it's corresponding attribute is the same as either start or end or between the two
33499 supplied dates (that is, after start and before end).
33500 B) If only the start attribute contains a value (other than <em>null</em>), a File entry matches the
33501 filter if its corresponding attribute is later than or equal to the start one.
33502 C) If only the end date contains a value (other than <em>null</em>), a file matches the filter if its
33503 corresponding attribute is earlier than or equal to the end date.
33511 <DictionaryMember name="name" id="::Filesystem::FileFilter::name">
33512 <webidl> DOMString name;</webidl>
33515 Used for filtering the File name attribute.
33519 Files which name corresponds with this attribute
33520 (either exactly or with the specified wildcards) match
33521 this filtering criteria.
33528 <Type type="DOMString"/>
33529 </DictionaryMember>
33530 <DictionaryMember name="startModified" id="::Filesystem::FileFilter::startModified">
33531 <webidl> Date startModified;</webidl>
33534 Used for filtering the File modified attribute.
33538 Files with modified date later than this attribute or equal to it match
33539 the filtering criteria.
33546 <Type type="Date"/>
33547 </DictionaryMember>
33548 <DictionaryMember name="endModified" id="::Filesystem::FileFilter::endModified">
33549 <webidl> Date endModified;</webidl>
33552 Used for filtering the File created attribute.
33556 Files with modified date earlier than this attribute or equal to it
33557 match the filtering criteria.
33564 <Type type="Date"/>
33565 </DictionaryMember>
33566 <DictionaryMember name="startCreated" id="::Filesystem::FileFilter::startCreated">
33567 <webidl> Date startCreated;</webidl>
33570 Used for filtering the File created attribute.
33574 Files with created date later than this attribute or equal to it match
33575 the filtering criteria.
33582 <Type type="Date"/>
33583 </DictionaryMember>
33584 <DictionaryMember name="endCreated" id="::Filesystem::FileFilter::endCreated">
33585 <webidl> Date endCreated;</webidl>
33588 Used for filtering the File created attribute.
33592 Files with created date earlier than this attribute or equal to it
33593 match the filtering criteria.
33600 <Type type="Date"/>
33601 </DictionaryMember>
33603 <Interface name="FileStream" id="::Filesystem::FileStream">
33604 <webidl> [NoInterfaceObject] interface FileStream {
33605 readonly attribute boolean eof;
33607 attribute long position setraises(<ref>WebAPIException</ref>);
33609 readonly attribute long bytesAvailable;
33613 DOMString read(long charCount) raises(<ref>WebAPIException</ref>);
33615 octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);
33617 DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);
33619 void write(DOMString stringData) raises(<ref>WebAPIException</ref>);
33621 void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);
33623 void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);
33631 A FileStream represents a handle to a File opened for read and/or
33632 write operations. Read and write operations are performed relative
33633 to a position attribute, which is a pointer that represents the current position in the file.
33636 A series of read/write methods are available that permit both binary and
33637 text to be processed.
33640 Once a file stream is closed, any operation attempted on this stream
33641 will result in a standard JavaScript error.
33644 The read/write operations in this interface do not throw any security
33645 exceptions as the access rights are expected to be granted through the initial
33646 resolve() method or through the openStream() method of the File interface.
33647 Therefore, all actions performed on a successfully resolved File and FileStream are
33648 expected to succeed. This avoids successive asynchronous calls and may potentially increase
33649 application for a user.
33656 <ExtendedAttributeList>
33657 <ExtendedAttribute name="NoInterfaceObject">
33658 <webidl>NoInterfaceObject</webidl>
33659 </ExtendedAttribute>
33660 </ExtendedAttributeList>
33661 <Attribute readonly="readonly" name="eof" id="::Filesystem::FileStream::eof">
33662 <webidl> readonly attribute boolean eof;</webidl>
33665 Indicates whether or not the current file pointer is at the end
33670 If <em>true</em>, this attribute indicates that the file pointer is at the end of the file.
33673 If <em>false</em>, this attribute indicates that the file pointer is not at the end of the file
33674 and may be anywhere within the file.
33680 <Code> if(stream.eof) {
33681 // file has been read completely
33685 <Type type="boolean"/>
33687 <Attribute name="position" id="::Filesystem::FileStream::position">
33688 <webidl> attribute long position setraises(<ref>WebAPIException</ref>);</webidl>
33691 Gets/sets stream position for reads/writes.
33695 The stream position is an offset of bytes from the start of
33696 the file stream. When invoking an operation that reads or
33697 writes from the stream, the operation will take place from the
33698 byte defined by this position attribute. If the read or write
33699 operation is successful, the position of the stream is advanced
33700 by the number of bytes read or written. If the read/write operation is not
33701 successful, the position of the stream is unchanged.
33707 <Code> console.log(stream.position); // displays current stream position
33708 // alters current stream position to the begin of the file,
33709 // like seek() in C
33710 stream.position = 0;
33713 <Type type="long"/>
33715 <RaiseException name="WebAPIException"/>
33718 <Attribute readonly="readonly" name="bytesAvailable" id="::Filesystem::FileStream::bytesAvailable">
33719 <webidl> readonly attribute long bytesAvailable;</webidl>
33722 Returns the number of bytes that are available for
33723 reading from the stream.
33727 The number of bytes available for reading is the maximum
33728 amount of bytes that can be read in the next read operation.
33729 It corresponds to the number of bytes available after the file pointer
33730 denoted by the position attribute.
33733 -1 if eof is <em>true</em>.
33739 <Code> console.log(stream.bytesAvailable); // displays the available bytes to be read
33742 <Type type="long"/>
33744 <Operation name="close" id="::Filesystem::FileStream::close">
33745 <webidl> void close();</webidl>
33748 Closes this FileStream.
33752 Flushes any pending buffered writes and closes the File. Always succeeds.
33753 Note that pending writes might not succeed.
33763 http://tizen.org/privilege/filesystem.read
33765 <Code> stream.close(); // closes this stream, no subsequent access to stream allowed
33768 <Type type="void"/>
33771 <Operation name="read" id="::Filesystem::FileStream::read">
33772 <webidl> DOMString read(long charCount) raises(<ref>WebAPIException</ref>);</webidl>
33775 Reads the specified number of characters from this FileStream.
33779 Reads the specified number of characters after the position file pointer and returns them as a string.
33780 The resulting string length might be shorter than charCount if eof
33791 http://tizen.org/privilege/filesystem.read
33793 <Code> var text = stream.read(file.fileSize);
33797 <Type type="DOMString">
33800 DOMString The result of read characters as a string.
33805 <Argument name="charCount">
33808 Number of characters being read.
33811 <Type type="long"/>
33815 <RaiseException name="WebAPIException">
33818 with error type IOError, if a read error occurs, such as the bytes in the stream
33819 cannot be decoded with the encoding in use.
33822 with error type TypeMismatchError, if the input parameter
33823 is not compatible with the expected type for that parameter.
33826 with error type InvalidValuesError, if any of the input
33827 parameters contain an invalid value.
33830 with error type SecurityError, if the application does not have the privilege to call this method.
33833 with error type NotSupportedError, if the feature is not supported.
33839 <Operation name="readBytes" id="::Filesystem::FileStream::readBytes">
33840 <webidl> octet[] readBytes(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33843 Reads the specified number of bytes from this FileStream.
33852 http://tizen.org/privilege/filesystem.read
33854 <Code> // reads up to 256 bytes from the stream
33855 var raw = stream.readBytes(256);
33856 for(var i = 0; i < raw.length; i++) {
33857 // raw[i] contains the i-th byte of the current data chunk
33861 <Type type="array">
33864 octet[] The result of read bytes as a byte (or number) array.
33867 <Type type="octet"/>
33870 <Argument name="byteCount">
33873 Number of bytes being read.
33876 <Type type="long"/>
33880 <RaiseException name="WebAPIException">
33883 with error type IOError, if a read error occurs.
33886 with error type TypeMismatchError, if the input parameter
33887 is not compatible with the expected type for that parameter.
33890 with error type InvalidValuesError, if any of the input
33891 parameters contain an invalid value.
33894 with error type SecurityError, if the application does not have the privilege to call this method.
33897 with error type NotSupportedError, if the feature is not supported.
33903 <Operation name="readBase64" id="::Filesystem::FileStream::readBase64">
33904 <webidl> DOMString readBase64(long byteCount) raises(<ref>WebAPIException</ref>);</webidl>
33907 Reads the specified number of bytes from this FileStream, encoding
33908 the result in base64.
33917 http://tizen.org/privilege/filesystem.read
33919 <Code> // reads up to 256 bytes from the stream
33920 var base64 = stream.readBase64(256);
33923 <Type type="DOMString">
33926 DOMString The result of read bytes as base64 encoding string.
33931 <Argument name="byteCount">
33934 Number of bytes being read.
33937 <Type type="long"/>
33941 <RaiseException name="WebAPIException">
33944 with error type IOError, if a read error occurs.
33947 with error type TypeMismatchError, if the input parameter
33948 is not compatible with the expected type for that parameter.
33951 with error type InvalidValuesError, if any of the input
33952 parameters contain an invalid value.
33955 with error type SecurityError, if the application does not have the privilege to call this method.
33958 with error type NotSupportedError, if the feature is not supported.
33964 <Operation name="write" id="::Filesystem::FileStream::write">
33965 <webidl> void write(DOMString stringData) raises(<ref>WebAPIException</ref>);</webidl>
33968 Writes the specified DOMString to this FileStream.
33977 http://tizen.org/privilege/filesystem.write
33979 <Code> var text = "Hello world";
33980 stream.write(text);
33983 <Type type="void"/>
33985 <Argument name="stringData">
33988 The actual string to be written.
33991 <Type type="DOMString"/>
33995 <RaiseException name="WebAPIException">
33998 with error type IOError, if a write error occurs.
34001 with error type TypeMismatchError, if the input parameter
34002 is not compatible with the expected type for that parameter.
34005 with error type SecurityError, if the application does not have the privilege to call this method.
34008 with error type NotSupportedError, if the feature is not supported.
34014 <Operation name="writeBytes" id="::Filesystem::FileStream::writeBytes">
34015 <webidl> void writeBytes(octet[] byteData) raises(<ref>WebAPIException</ref>);</webidl>
34018 Writes the specified bytes to this FileStream.
34027 http://tizen.org/privilege/filesystem.write
34029 <Code> var bytes = in.readBytes(256);
34030 out.writeBytes(bytes); // writes the bytes read from in to out
34033 <Type type="void"/>
34035 <Argument name="byteData">
34038 The byte data array being written.
34041 <Type type="array">
34042 <Type type="octet"/>
34047 <RaiseException name="WebAPIException">
34050 with error type IOError, if a write error occurs.
34053 with error type TypeMismatchError, if the input parameter
34054 is not compatible with the expected type for that parameter.
34057 with error type SecurityError, if the application does not have the privilege to call this method.
34060 with error type NotSupportedError, if the feature is not supported.
34066 <Operation name="writeBase64" id="::Filesystem::FileStream::writeBase64">
34067 <webidl> void writeBase64(DOMString base64Data) raises(<ref>WebAPIException</ref>);</webidl>
34070 Converts the specified base64 DOMString to bytes and writes the
34071 result to this FileStream.
34080 http://tizen.org/privilege/filesystem.write
34082 <Code> var base64 = in.readBase64(256);
34083 out.writeBase64(base64); // writes the base64 data read from in to out
34086 <Type type="void"/>
34088 <Argument name="base64Data">
34091 The base64 data being written.
34094 <Type type="DOMString"/>
34098 <RaiseException name="WebAPIException">
34101 with error type IOError, if an error occurs during writeBase64.
34104 with error type TypeMismatchError, if the input parameter
34105 is not compatible with the expected type for that parameter.
34108 with error type SecurityError, if the application does not have the privilege to call this method.
34111 with error type NotSupportedError, if the feature is not supported.
34118 <Interface name="FileSuccessCallback" id="::Filesystem::FileSuccessCallback">
34119 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSuccessCallback {
34120 void onsuccess(<ref>File</ref> file);
34124 The file system specific success callback.
34128 This callback interface specifies a success callback with
34129 a File object as input argument. It is used in asynchronous
34130 operations, such as FileSystemManager.resolve() and
34131 copying, moving, and deleting files.
34138 <ExtendedAttributeList>
34139 <ExtendedAttribute name="Callback" value="FunctionOnly">
34140 <webidl>Callback</webidl>
34141 </ExtendedAttribute>
34142 <ExtendedAttribute name="NoInterfaceObject">
34143 <webidl> NoInterfaceObject</webidl>
34144 </ExtendedAttribute>
34145 </ExtendedAttributeList>
34146 <Operation name="onsuccess" id="::Filesystem::FileSuccessCallback::onsuccess">
34147 <webidl> void onsuccess(<ref>File</ref> file);</webidl>
34150 The method invoked when the asynchronous call completes successfully.
34156 <Type type="void"/>
34158 <Argument name="file">
34161 The file resulting from the asynchronous call.
34164 <Type name="File"/>
34169 <Interface name="FileSystemStorageArraySuccessCallback" id="::Filesystem::FileSystemStorageArraySuccessCallback">
34170 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageArraySuccessCallback {
34171 void onsuccess(<ref>FileSystemStorage</ref>[] storages);
34175 The success callback to retrieve FileSystemStorage objects.
34179 This callback interface specifies a success callback with
34180 an array of FileSystemStorage objects as input argument. It is used in asynchronous
34181 operations, such as FileSystemManager.listStorages().
34188 <ExtendedAttributeList>
34189 <ExtendedAttribute name="Callback" value="FunctionOnly">
34190 <webidl>Callback</webidl>
34191 </ExtendedAttribute>
34192 <ExtendedAttribute name="NoInterfaceObject">
34193 <webidl> NoInterfaceObject</webidl>
34194 </ExtendedAttribute>
34195 </ExtendedAttributeList>
34196 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageArraySuccessCallback::onsuccess">
34197 <webidl> void onsuccess(<ref>FileSystemStorage</ref>[] storages);</webidl>
34200 The method invoked when the asynchronous call completes successfully.
34206 <Type type="void"/>
34208 <Argument name="storages">
34211 List of available storage devices.
34214 <Type type="array">
34215 <Type name="FileSystemStorage"/>
34221 <Interface name="FileSystemStorageSuccessCallback" id="::Filesystem::FileSystemStorageSuccessCallback">
34222 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileSystemStorageSuccessCallback {
34223 void onsuccess(<ref>FileSystemStorage</ref> storage);
34227 The success callback to retrieve a FileSystemStorage object.
34231 This callback interface specifies a success callback with
34232 a FileSystmeStorage object as input argument. It is used in asynchronous
34233 operations, such as FileSystemManager.getStorage() and
34234 FileSystemManager.addStorageStateChangeListener().
34241 <ExtendedAttributeList>
34242 <ExtendedAttribute name="Callback" value="FunctionOnly">
34243 <webidl>Callback</webidl>
34244 </ExtendedAttribute>
34245 <ExtendedAttribute name="NoInterfaceObject">
34246 <webidl> NoInterfaceObject</webidl>
34247 </ExtendedAttribute>
34248 </ExtendedAttributeList>
34249 <Operation name="onsuccess" id="::Filesystem::FileSystemStorageSuccessCallback::onsuccess">
34250 <webidl> void onsuccess(<ref>FileSystemStorage</ref> storage);</webidl>
34253 The method invoked when the asynchronous call completes successfully.
34259 <Type type="void"/>
34261 <Argument name="storage">
34264 The storage device structure.
34267 <Type name="FileSystemStorage"/>
34272 <Interface name="FileStringSuccessCallback" id="::Filesystem::FileStringSuccessCallback">
34273 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStringSuccessCallback {
34274 void onsuccess(DOMString fileStr);
34278 The success callback to read the content of a file as a DOMString.
34282 This callback interface specifies a success callback with
34283 a DOMString object as input argument. It is used in asynchronous
34284 operations, such as File.readAsText().
34291 <ExtendedAttributeList>
34292 <ExtendedAttribute name="Callback" value="FunctionOnly">
34293 <webidl>Callback</webidl>
34294 </ExtendedAttribute>
34295 <ExtendedAttribute name="NoInterfaceObject">
34296 <webidl> NoInterfaceObject</webidl>
34297 </ExtendedAttribute>
34298 </ExtendedAttributeList>
34299 <Operation name="onsuccess" id="::Filesystem::FileStringSuccessCallback::onsuccess">
34300 <webidl> void onsuccess(DOMString fileStr);</webidl>
34303 The method invoked when the asynchronous call completes successfully.
34309 <Type type="void"/>
34311 <Argument name="fileStr">
34314 The file represented as a DOMString resulting from the asynchronous call.
34317 <Type type="DOMString"/>
34322 <Interface name="FileStreamSuccessCallback" id="::Filesystem::FileStreamSuccessCallback">
34323 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileStreamSuccessCallback {
34324 void onsuccess(<ref>FileStream</ref> filestream);
34328 The success callback to open a file for raw access.
34332 This callback interface specifies a success callback with
34333 a FileStream object as input argument. It is used by asynchronous
34334 methods, such as File.openStream().
34341 <ExtendedAttributeList>
34342 <ExtendedAttribute name="Callback" value="FunctionOnly">
34343 <webidl>Callback</webidl>
34344 </ExtendedAttribute>
34345 <ExtendedAttribute name="NoInterfaceObject">
34346 <webidl> NoInterfaceObject</webidl>
34347 </ExtendedAttribute>
34348 </ExtendedAttributeList>
34349 <Operation name="onsuccess" id="::Filesystem::FileStreamSuccessCallback::onsuccess">
34350 <webidl> void onsuccess(<ref>FileStream</ref> filestream);</webidl>
34353 The method invoked when the File.openStream asynchronous call completes successfully.
34359 <Type type="void"/>
34361 <Argument name="filestream">
34364 The filestream to access file content.
34367 <Type name="FileStream"/>
34372 <Interface name="FileArraySuccessCallback" id="::Filesystem::FileArraySuccessCallback">
34373 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface FileArraySuccessCallback {
34374 void onsuccess(<ref>File</ref>[] files);
34378 The file system specific success callback for listing methods.
34382 This callback interface specifies a success callback with a function
34383 taking an array of File objects as input argument. It is used in asynchronous
34384 methods, such as File.listFiles().
34391 <ExtendedAttributeList>
34392 <ExtendedAttribute name="Callback" value="FunctionOnly">
34393 <webidl>Callback</webidl>
34394 </ExtendedAttribute>
34395 <ExtendedAttribute name="NoInterfaceObject">
34396 <webidl> NoInterfaceObject</webidl>
34397 </ExtendedAttribute>
34398 </ExtendedAttributeList>
34399 <Operation name="onsuccess" id="::Filesystem::FileArraySuccessCallback::onsuccess">
34400 <webidl> void onsuccess(<ref>File</ref>[] files);</webidl>
34403 The method invoked when the asynchronous call completes successfully.
34409 <Type type="void"/>
34411 <Argument name="files">
34414 The files resulting from the asynchronous call.
34417 <Type type="array">
34418 <Type name="File"/>
34425 <Module name="MessagePort" id="::MessagePort">
34426 <webidl>module MessagePort {
34428 [NoInterfaceObject] interface MessagePortManagerObject {
34429 readonly attribute <ref>MessagePortManager</ref> messageport;
34431 <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;
34433 [NoInterfaceObject] interface MessagePortManager {
34435 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34437 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34439 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34441 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34444 [NoInterfaceObject] interface LocalMessagePort {
34446 readonly attribute DOMString messagePortName;
34448 readonly attribute boolean isTrusted;
34450 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34452 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34455 [NoInterfaceObject] interface RemoteMessagePort {
34457 readonly attribute DOMString messagePortName;
34459 readonly attribute <ref>ApplicationId</ref> appId;
34461 readonly attribute boolean isTrusted;
34463 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34466 dictionary MessagePortDataItem {
34471 [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
34472 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
34477 This API provides the functionality for communicating with other applications.
34483 <Interface name="MessagePortManagerObject" id="::MessagePort::MessagePortManagerObject">
34484 <webidl> [NoInterfaceObject] interface MessagePortManagerObject {
34485 readonly attribute <ref>MessagePortManager</ref> messageport;
34489 The <em>MessagePortManagerObject</em> interface defines what is instantiated by the Tizen object from the Tizen Platform.
34493 There is a <em>tizen.messageport</em> object that allows access to the functionality of the Message Port API.
34500 <ExtendedAttributeList>
34501 <ExtendedAttribute name="NoInterfaceObject">
34502 <webidl>NoInterfaceObject</webidl>
34503 </ExtendedAttribute>
34504 </ExtendedAttributeList>
34505 <Attribute readonly="readonly" name="messageport" id="::MessagePort::MessagePortManagerObject::messageport">
34506 <webidl> readonly attribute <ref>MessagePortManager</ref> messageport;</webidl>
34507 <Type name="MessagePortManager"/>
34510 <Implements name1="Tizen" name2="MessagePortManagerObject">
34511 <webidl> <ref>Tizen</ref> implements <ref>MessagePortManagerObject</ref>;</webidl>
34513 <Interface name="MessagePortManager" id="::MessagePort::MessagePortManager">
34514 <webidl> [NoInterfaceObject] interface MessagePortManager {
34516 <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34518 <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);
34520 <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34522 <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);
34526 The <em>MessagePortManager</em> interface provides methods to request message port to communicate.
34532 <ExtendedAttributeList>
34533 <ExtendedAttribute name="NoInterfaceObject">
34534 <webidl>NoInterfaceObject</webidl>
34535 </ExtendedAttribute>
34536 </ExtendedAttributeList>
34537 <Operation name="requestLocalMessagePort" id="::MessagePort::MessagePortManager::requestLocalMessagePort">
34538 <webidl> <ref>LocalMessagePort</ref> requestLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34541 Requests a LocalMessage Port instance to start receiving message from another application.
34546 <Code> // Requests the LocalMessagePort instance with the specified message port name
34547 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34550 <Type name="LocalMessagePort">
34553 LocalMessagePort The LocalMessagePort instance.
34558 <Argument name="localMessagePortName">
34561 The name of the local message port to retrieve.<br/>The LocalMessagePort instances are identical for the same message port name.
34564 <Type type="DOMString"/>
34568 <RaiseException name="WebAPIException">
34571 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34574 with error type InvalidValuesError, if the input parameter contains an invalid value.
34577 with error type UnknownError, if any other error occurs.
34583 <Operation name="requestTrustedLocalMessagePort" id="::MessagePort::MessagePortManager::requestTrustedLocalMessagePort">
34584 <webidl> <ref>LocalMessagePort</ref> requestTrustedLocalMessagePort(DOMString localMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34587 Requests a trusted LocalMessagePort instance to receive message from another application.
34591 Trusted local message port can communicate with applications that are signed with same certificate.
34597 <Code> // Requests the LocalMessagePort instance with the specified message port name
34598 var localMsgPort = tizen.messageport.requestTrustedLocalMessagePort('MessagePortB');
34601 <Type name="LocalMessagePort">
34604 LocalMessagePort The trusted LocalMessagePort instance.
34609 <Argument name="localMessagePortName">
34612 The name of local message port.<br/>The LocalMessagePort instances are identical for the same message port name.
34615 <Type type="DOMString"/>
34619 <RaiseException name="WebAPIException">
34622 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34625 with error type InvalidValuesError, if the input parameter contains an invalid value.
34628 with error type UnknownError, if any other error occurs.
34634 <Operation name="requestRemoteMessagePort" id="::MessagePort::MessagePortManager::requestRemoteMessagePort">
34635 <webidl> <ref>RemoteMessagePort</ref> requestRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34638 Requests a RemoteMessagePort instance to send message to another application.
34642 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34648 <Code> // Requests the RemoteMessagePort instance with the specified message port name
34649 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortA');
34652 <Type name="RemoteMessagePort">
34655 RemoteMessagePort The RemoteMessagePort instance.
34660 <Argument name="appId">
34663 The ID of the application to send messages.
34666 <Type name="ApplicationId"/>
34668 <Argument name="remoteMessagePortName">
34671 The name of remote message port.
34674 <Type type="DOMString"/>
34678 <RaiseException name="WebAPIException">
34681 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34684 with error type InvalidValuesError, if an input parameter contains an invalid value.
34687 with error type NotFoundError, if the port of the target application is not found.
34690 with error type UnknownError, if any other error occurs.
34696 <Operation name="requestTrustedRemoteMessagePort" id="::MessagePort::MessagePortManager::requestTrustedRemoteMessagePort">
34697 <webidl> <ref>RemoteMessagePort</ref> requestTrustedRemoteMessagePort(<ref>ApplicationId</ref> appId, DOMString remoteMessagePortName) raises(<ref>WebAPIException</ref>);</webidl>
34700 Requests a trusted RemoteMessagePort instance to receive message from another application.
34704 If the message port name and application ID is the same, the platform returns the same RemoteMessagePort instance.
34705 Trusted remote message port can communicate with applications that are signed with same certificate.
34711 <Code> // Requests the RemoteMessagePort instance with the specified message port name.
34712 var remoteMsgPort = tizen.messageport.requestTrustedRemoteMessagePort('6xauflskd.App1', 'MessagePortB');
34715 <Type name="RemoteMessagePort">
34718 RemoteMessagePort The trusted RemoteMessagePort instance.
34723 <Argument name="appId">
34726 The ID of the application to send messages.
34729 <Type name="ApplicationId"/>
34731 <Argument name="remoteMessagePortName">
34734 The name of remote message port.
34737 <Type type="DOMString"/>
34741 <RaiseException name="WebAPIException">
34744 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34747 with error type InvalidValuesError, if an input parameter contains an invalid value.
34750 with error type NotFoundError, if the port of the target application is not found.
34753 with error type InvalidAccessError, if the target application is not signed with the same certification.
34756 with error type UnknownError, if any other error occurs
34763 <Interface name="LocalMessagePort" id="::MessagePort::LocalMessagePort">
34764 <webidl> [NoInterfaceObject] interface LocalMessagePort {
34766 readonly attribute DOMString messagePortName;
34768 readonly attribute boolean isTrusted;
34770 long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);
34772 void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);
34776 The <em>LocalMessagePort</em> interface provides methods to receive data.
34782 <ExtendedAttributeList>
34783 <ExtendedAttribute name="NoInterfaceObject">
34784 <webidl>NoInterfaceObject</webidl>
34785 </ExtendedAttribute>
34786 </ExtendedAttributeList>
34787 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::LocalMessagePort::messagePortName">
34788 <webidl> readonly attribute DOMString messagePortName;</webidl>
34791 An attribute that stores the name of the message port name.
34797 <Type type="DOMString"/>
34799 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::LocalMessagePort::isTrusted">
34800 <webidl> readonly attribute boolean isTrusted;</webidl>
34803 An attribute that determines whether the message port is trusted or not.
34809 <Type type="boolean"/>
34811 <Operation name="addMessagePortListener" id="::MessagePort::LocalMessagePort::addMessagePortListener">
34812 <webidl> long addMessagePortListener(<ref>MessagePortCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
34815 Adds a message port listener to receive messages from other applications.
34820 <Code> function onreceived(data, remoteMsgPort) {
34821 console.log('Received data to \'' + remoteMsgPort.messagePortName + '\'');
34824 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34825 var watchId = localMsgPort.addMessagePortListener(onreceived);
34831 long ID of the listener that is later used to remove the listener.
34836 <Argument name="listener">
34839 The method to invoke when a message is received.
34842 <Type name="MessagePortCallback"/>
34846 <RaiseException name="WebAPIException">
34849 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34852 with error type InvalidValuesError, if the input parameter contains an invalid value.
34855 with error type UnknownError, if any other error occurs.
34861 <Operation name="removeMessagePortListener" id="::MessagePort::LocalMessagePort::removeMessagePortListener">
34862 <webidl> void removeMessagePortListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
34865 Removes the message port listener.
34870 <Code> var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34871 var watchId = localMsgPort.addMessagePortListener(onreceived);
34872 // Communication routines of your app...
34873 localMsgPort.removeMessagePortListener(watchId);
34876 <Type type="void"/>
34878 <Argument name="watchId">
34881 ID to identify the listener.
34884 <Type type="long"/>
34888 <RaiseException name="WebAPIException">
34891 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
34894 with error type InvalidValuesError, if the input parameter contains an invalid value.
34897 with error type NotFoundError, if the watch ID has not been found.
34900 with error type UnknownError, if any other error occurs.
34907 <Interface name="RemoteMessagePort" id="::MessagePort::RemoteMessagePort">
34908 <webidl> [NoInterfaceObject] interface RemoteMessagePort {
34910 readonly attribute DOMString messagePortName;
34912 readonly attribute <ref>ApplicationId</ref> appId;
34914 readonly attribute boolean isTrusted;
34916 void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);
34920 The <em>RemoteMessagePort</em> interface provides methods to send messages.
34926 <ExtendedAttributeList>
34927 <ExtendedAttribute name="NoInterfaceObject">
34928 <webidl>NoInterfaceObject</webidl>
34929 </ExtendedAttribute>
34930 </ExtendedAttributeList>
34931 <Attribute readonly="readonly" name="messagePortName" id="::MessagePort::RemoteMessagePort::messagePortName">
34932 <webidl> readonly attribute DOMString messagePortName;</webidl>
34935 An attribute to store the message port name.
34941 <Type type="DOMString"/>
34943 <Attribute readonly="readonly" name="appId" id="::MessagePort::RemoteMessagePort::appId">
34944 <webidl> readonly attribute <ref>ApplicationId</ref> appId;</webidl>
34947 An attribute that store the application ID to connect with.
34953 <Type name="ApplicationId"/>
34955 <Attribute readonly="readonly" name="isTrusted" id="::MessagePort::RemoteMessagePort::isTrusted">
34956 <webidl> readonly attribute boolean isTrusted;</webidl>
34959 An attribute that determines whether the message port is trusted or not.
34965 <Type type="boolean"/>
34967 <Operation name="sendMessage" id="::MessagePort::RemoteMessagePort::sendMessage">
34968 <webidl> void sendMessage(<ref>MessagePortDataItem</ref>[] data, optional <ref>LocalMessagePort</ref>? localMessagePort) raises(<ref>WebAPIException</ref>);</webidl>
34971 Sends messages to the specified application.
34975 The sent messages will be ignored without any notice, unless the target application added one or more listeners to the target local message port.
34981 <Code> // Sends message
34982 var localMsgPort = tizen.messageport.requestLocalMessagePort('MessagePortA');
34983 var remoteMsgPort = tizen.messageport.requestRemoteMessagePort('6xaeuflskd.App1', 'MessagePortB');
34984 localMsgPort.addMessagePortListener(function(items, remoteport) {
34986 if(remoteport !== null) {
34987 remoteport.sendMessage([{key:'RESULT', value:'OK'}]);
34990 remoteMsgPort.sendMessage(
34992 { key:'CMD', value:'openWindow' },
34993 { key:'OPTION', value:'bx' }
34998 <Type type="void"/>
35000 <Argument name="data">
35003 Data array of data to send.
35006 <Type type="array">
35007 <Type name="MessagePortDataItem"/>
35010 <Argument optional="optional" name="localMessagePort">
35013 <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.
35014 </em></em> </p></description>
35016 <Type name="LocalMessagePort" nullable="nullable"/>
35020 <RaiseException name="WebAPIException">
35023 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
35026 with error type InvalidValuesError, if an input parameter contains an invalid value.
35029 with error type QuotaExceededError, if the size of message has exceeded the maximum limit.
35032 with error type UnknownError, if any other error occurs.
35039 <Dictionary name="MessagePortDataItem" id="::MessagePort::MessagePortDataItem">
35040 <webidl> dictionary MessagePortDataItem {
35046 A dictionary for specifying the data item that is transferred.
35052 <DictionaryMember name="key" id="::MessagePort::MessagePortDataItem::key">
35053 <webidl> DOMString key;</webidl>
35054 <Type type="DOMString"/>
35055 </DictionaryMember>
35056 <DictionaryMember name="value" id="::MessagePort::MessagePortDataItem::value">
35057 <webidl> DOMString value;</webidl>
35058 <Type type="DOMString"/>
35059 </DictionaryMember>
35061 <Interface name="MessagePortCallback" id="::MessagePort::MessagePortCallback">
35062 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessagePortCallback {
35063 void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);
35067 This interface defines notification callbacks for receiving data from other applications.
35073 <ExtendedAttributeList>
35074 <ExtendedAttribute name="Callback" value="FunctionOnly">
35075 <webidl>Callback</webidl>
35076 </ExtendedAttribute>
35077 <ExtendedAttribute name="NoInterfaceObject">
35078 <webidl> NoInterfaceObject</webidl>
35079 </ExtendedAttribute>
35080 </ExtendedAttributeList>
35081 <Operation name="onreceived" id="::MessagePort::MessagePortCallback::onreceived">
35082 <webidl> void onreceived(<ref>MessagePortDataItem</ref>[] data, <ref>RemoteMessagePort</ref>? remoteMessagePort);</webidl>
35085 Called when data is received from other applications via the specified message port name.
35091 <Type type="void"/>
35093 <Argument name="data">
35096 An array of data received from another application.
35099 <Type type="array">
35100 <Type name="MessagePortDataItem"/>
35103 <Argument name="remoteMessagePort">
35106 The RemoteMessagePort port that can be used to reply for the received message.
35109 <Type name="RemoteMessagePort" nullable="nullable"/>
35115 <Module name="Messaging" id="::Messaging">
35116 <webidl>module Messaging {
35118 [NoInterfaceObject] interface MessageManagerObject {
35119 readonly attribute <ref>Messaging</ref> messaging;
35121 <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;
35123 enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };
35125 typedef DOMString MessageId;
35127 typedef DOMString MessageAttachmentId;
35129 typedef DOMString MessageConvId;
35131 typedef DOMString MessageFolderId;
35133 [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35134 interface Message {
35136 readonly attribute <ref>MessageId</ref>? id;
35138 readonly attribute <ref>MessageConvId</ref>? conversationId;
35140 readonly attribute <ref>MessageFolderId</ref>? folderId;
35142 readonly attribute <ref>MessageServiceTag</ref> type;
35144 readonly attribute Date? timestamp;
35146 readonly attribute DOMString? from;
35148 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35150 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35152 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35154 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35156 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35158 readonly attribute boolean hasAttachment;
35160 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35162 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35164 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35166 readonly attribute DOMString messageStatus;
35168 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35170 dictionary MessageInit
35181 DOMString plainBody;
35183 DOMString htmlBody;
35185 boolean isHighPriority;
35188 [NoInterfaceObject] interface MessageBody {
35190 readonly attribute <ref>MessageId</ref> messageId;
35192 readonly attribute boolean loaded;
35194 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
35196 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
35198 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
35201 [Constructor(DOMString filePath, optional DOMString? mimeType)]
35202 interface MessageAttachment {
35204 readonly attribute <ref>MessageAttachmentId</ref>? id;
35206 readonly attribute <ref>MessageId</ref>? messageId;
35208 readonly attribute DOMString? mimeType;
35210 readonly attribute DOMString? filePath;
35213 [NoInterfaceObject] interface Messaging {
35215 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
35216 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
35217 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35220 [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
35222 void onsuccess(<ref>MessageService</ref>[] services);
35227 [NoInterfaceObject] interface MessageService {
35229 readonly attribute DOMString id;
35231 readonly attribute <ref>MessageServiceTag</ref> type;
35233 readonly attribute DOMString name;
35235 void sendMessage(<ref>Message</ref> message,
35236 optional <ref>MessageRecipientsCallback</ref>? successCallback,
35237 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35239 void loadMessageBody(<ref>Message</ref> message,
35240 <ref>MessageBodySuccessCallback</ref> successCallback,
35241 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35243 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
35244 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
35245 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35247 long sync(optional <ref>SuccessCallback</ref>? successCallback,
35248 optional <ref>ErrorCallback</ref>? errorCallback,
35249 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35251 long syncFolder(<ref>MessageFolder</ref> folder,
35252 optional <ref>SuccessCallback</ref>? successCallback,
35253 optional <ref>ErrorCallback</ref>? errorCallback,
35254 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
35256 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
35258 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
35261 [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
35263 void onsuccess(DOMString[] recipients);
35267 [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
35269 void onsuccess(<ref>Message</ref> message);
35272 [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
35274 void onsuccess(<ref>MessageAttachment</ref> attachment);
35277 [NoInterfaceObject] interface MessageStorage {
35279 void addDraftMessage(<ref>Message</ref> message,
35280 optional <ref>SuccessCallback</ref>? successCallback,
35281 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35283 void findMessages(<ref>AbstractFilter</ref> filter,
35284 <ref>MessageArraySuccessCallback</ref> successCallback,
35285 optional <ref>ErrorCallback</ref>? errorCallback,
35286 optional <ref>SortMode</ref>? sort,
35287 optional unsigned long? limit,
35288 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35290 void removeMessages(<ref>Message</ref>[] messages,
35291 optional <ref>SuccessCallback</ref>? successCallback,
35292 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35294 void updateMessages(<ref>Message</ref>[] messages,
35295 optional <ref>SuccessCallback</ref>? successCallback,
35296 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35298 void findConversations(<ref>AbstractFilter</ref> filter,
35299 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
35300 optional <ref>ErrorCallback</ref>? errorCallback,
35301 optional <ref>SortMode</ref>? sort,
35302 optional unsigned long? limit,
35303 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
35305 void removeConversations(<ref>MessageConversation</ref>[] conversations,
35306 optional <ref>SuccessCallback</ref>? successCallback,
35307 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35310 void findFolders(<ref>AbstractFilter</ref> filter,
35311 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
35312 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
35314 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
35315 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35317 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
35318 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35320 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
35321 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
35323 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
35326 [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
35328 void onsuccess(<ref>Message</ref>[] messages);
35331 [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
35333 void onsuccess(<ref>MessageConversation</ref>[] conversations);
35336 [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
35338 void onsuccess(<ref>MessageFolder</ref>[] folders);
35341 [Callback, NoInterfaceObject] interface MessagesChangeCallback {
35343 void messagesadded(<ref>Message</ref>[] addedMessages);
35345 void messagesupdated(<ref>Message</ref>[] updatedMessages);
35347 void messagesremoved(<ref>Message</ref>[] removedMessages);
35350 [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
35352 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
35354 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
35356 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
35359 [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
35361 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
35363 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
35365 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
35368 [NoInterfaceObject] interface MessageConversation {
35370 readonly attribute <ref>MessageConvId</ref> id;
35372 readonly attribute <ref>MessageServiceTag</ref> type;
35374 readonly attribute Date timestamp;
35376 readonly attribute unsigned long messageCount;
35378 readonly attribute unsigned long unreadMessages;
35380 readonly attribute DOMString preview;
35382 readonly attribute DOMString subject;
35384 readonly attribute boolean isRead;
35386 readonly attribute DOMString from;
35388 readonly attribute DOMString[] to;
35390 readonly attribute DOMString[] cc;
35392 readonly attribute DOMString[] bcc;
35394 readonly attribute <ref>MessageId</ref> lastMessageId;
35397 [NoInterfaceObject] interface MessageFolder {
35399 readonly attribute <ref>MessageFolderId</ref> id;
35401 readonly attribute <ref>MessageFolderId</ref> parentId;
35403 readonly attribute DOMString serviceId;
35405 readonly attribute <ref>MessageServiceTag</ref> contentType;
35407 attribute DOMString name setraises(<ref>WebAPIException</ref>);
35409 readonly attribute DOMString path;
35411 readonly attribute DOMString type;
35413 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
35419 This API provides interfaces and methods for managing SMS, MMS, and email messages.
35423 The Messaging API provides access to these capabilities:
35427 Sending messages through different technologies: SMS, MMS, and email messages. </li>
35429 Retrieving available message services. </li>
35431 Searching for messages. </li>
35433 Managing messages: update, delete, and add. </li>
35435 Subscribing to receive notifications of message storage modifications. </li>
35437 Fetching conversations and subscribing to conversation updates. </li>
35440 For more information on the Messaging features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/messaging.htm">Messaging Guide</a>.
35446 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
35450 To guarantee this application running on a device with SMS feature, define below in the config file:
35455 <def-api-feature identifier="http://tizen.org/feature/network.telephony.mms">
35459 To guarantee this application running on a device with MMS feature, define below in the config file:
35465 <Interface name="MessageManagerObject" id="::Messaging::MessageManagerObject">
35466 <webidl> [NoInterfaceObject] interface MessageManagerObject {
35467 readonly attribute <ref>Messaging</ref> messaging;
35471 This interface defines what is instantiated by the Tizen object.
35475 There is a <em>tizen.messaging </em>object that allows access to the Messaging API.
35482 <ExtendedAttributeList>
35483 <ExtendedAttribute name="NoInterfaceObject">
35484 <webidl>NoInterfaceObject</webidl>
35485 </ExtendedAttribute>
35486 </ExtendedAttributeList>
35487 <Attribute readonly="readonly" name="messaging" id="::Messaging::MessageManagerObject::messaging">
35488 <webidl> readonly attribute <ref>Messaging</ref> messaging;</webidl>
35489 <Type name="Messaging"/>
35492 <Implements name1="Tizen" name2="MessageManagerObject">
35493 <webidl> <ref>Tizen</ref> implements <ref>MessageManagerObject</ref>;</webidl>
35495 <Enum name="MessageServiceTag" id="::Messaging::MessageServiceTag">
35496 <webidl> enum MessageServiceTag {"messaging.sms", "messaging.mms", "messaging.email" };</webidl>
35499 The supported Messaging service tags.
35500 The following values are supported in this release:
35505 messaging.sms, for SMS services </li>
35507 messaging.mms, for MMS services </li>
35509 messaging.email, for email services </li>
35516 <EnumValue stringvalue="messaging.sms">
35517 <webidl>"messaging.sms</webidl>
35519 <EnumValue stringvalue="messaging.mms">
35520 <webidl> "messaging.mms</webidl>
35522 <EnumValue stringvalue="messaging.email">
35523 <webidl> "messaging.email</webidl>
35526 <Typedef name="MessageId" id="::Messaging::MessageId">
35527 <webidl> typedef DOMString MessageId;</webidl>
35530 The Message identifier.
35536 <Type type="DOMString"/>
35538 <Typedef name="MessageAttachmentId" id="::Messaging::MessageAttachmentId">
35539 <webidl> typedef DOMString MessageAttachmentId;</webidl>
35542 The MessageAttachment identifier within a message.
35548 <Type type="DOMString"/>
35550 <Typedef name="MessageConvId" id="::Messaging::MessageConvId">
35551 <webidl> typedef DOMString MessageConvId;</webidl>
35554 The MessageConversation identifier.
35560 <Type type="DOMString"/>
35562 <Typedef name="MessageFolderId" id="::Messaging::MessageFolderId">
35563 <webidl> typedef DOMString MessageFolderId;</webidl>
35566 The identifier of an email folder .
35572 <Type type="DOMString"/>
35574 <Interface name="Message" id="::Messaging::Message">
35575 <webidl> [Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)]
35576 interface Message {
35578 readonly attribute <ref>MessageId</ref>? id;
35580 readonly attribute <ref>MessageConvId</ref>? conversationId;
35582 readonly attribute <ref>MessageFolderId</ref>? folderId;
35584 readonly attribute <ref>MessageServiceTag</ref> type;
35586 readonly attribute Date? timestamp;
35588 readonly attribute DOMString? from;
35590 attribute DOMString[] to setraises(<ref>WebAPIException</ref>);
35592 attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);
35594 attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);
35596 attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);
35598 attribute boolean isRead setraises(<ref>WebAPIException</ref>);
35600 readonly attribute boolean hasAttachment;
35602 attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);
35604 attribute DOMString subject setraises(<ref>WebAPIException</ref>);
35606 readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);
35608 readonly attribute DOMString messageStatus;
35610 attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);
35614 Defines the content and attributes of a message.
35618 This interface allows a web application to define the set of properties
35619 linked to a message.
35622 It also allows an application to retrieve the content of a
35623 message through <em>MessageStorage </em>methods. In these
35624 cases, the implementation can return, in some situations, only the meta-information
35625 of a message without the loaded body. In such situations, the method <em>MessageService.loadMessageBody() </em>should be used.
35631 <Code> // Define the success callback.
35632 var messageSentCallback = function(recipients) {
35633 console.log("Message sent successfully to " + recipients.length + " recipients.");
35636 // Define the error callback.
35637 function errorCallback(err) {
35638 console.log(err.name + " error: " + err.message);
35641 function serviceListCB(services) {
35642 if (services.length > 0) {
35643 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen first SMS message."});
35644 services[0].sendMessage(msg, messageSentCallback, errorCallback);
35648 tizen.messaging.getMessageServices("messaging.sms",
35653 <ExtendedAttributeList>
35654 <ExtendedAttribute name="Constructor">
35655 <webidl>Constructor(<ref>MessageServiceTag</ref> type, optional <ref>MessageInit</ref>? messageInitDict)</webidl>
35657 <Argument name="type">
35658 <Type name="MessageServiceTag"/>
35660 <Argument optional="optional" name="messageInitDict">
35661 <Type name="MessageInit" nullable="nullable"/>
35664 </ExtendedAttribute>
35665 </ExtendedAttributeList>
35666 <Attribute readonly="readonly" name="id" id="::Messaging::Message::id">
35667 <webidl> readonly attribute <ref>MessageId</ref>? id;</webidl>
35670 The message identifier.
35674 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
35675 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>.
35678 By default, this attribute is set to <var>null</var>.
35685 <Type name="MessageId" nullable="nullable"/>
35687 <Attribute readonly="readonly" name="conversationId" id="::Messaging::Message::conversationId">
35688 <webidl> readonly attribute <ref>MessageConvId</ref>? conversationId;</webidl>
35691 The identifier of the conversation to which the message belongs.
35695 By default, this attribute is set to <var>null</var>.
35702 <Type name="MessageConvId" nullable="nullable"/>
35704 <Attribute readonly="readonly" name="folderId" id="::Messaging::Message::folderId">
35705 <webidl> readonly attribute <ref>MessageFolderId</ref>? folderId;</webidl>
35708 The identifier of the folder to which the message belongs.
35712 By default, this attribute is set to null.
35715 For SMS and MMS, <em>folderId </em>can be one of these values:
35732 <Type name="MessageFolderId" nullable="nullable"/>
35734 <Attribute readonly="readonly" name="type" id="::Messaging::Message::type">
35735 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
35738 The type of a given message.
35744 <Type name="MessageServiceTag"/>
35746 <Attribute readonly="readonly" name="timestamp" id="::Messaging::Message::timestamp">
35747 <webidl> readonly attribute Date? timestamp;</webidl>
35750 The timestamp of a message.
35754 For a received message, the timestamps indicates the time at which a message is received.
35755 For a sent message, the timestamp indicates the time at which a message is sent.
35756 For a draft message, the timestamp indicates the time at which a message is added.
35757 By default, this attribute is set to <var>null</var>.
35764 <Type type="Date" nullable="nullable"/>
35766 <Attribute readonly="readonly" name="from" id="::Messaging::Message::from">
35767 <webidl> readonly attribute DOMString? from;</webidl>
35770 The source address (or source phone number) of a message.
35774 This property is set up by the device or the web runtime environment.
35775 By default, this attribute is set to null.
35782 <Type type="DOMString" nullable="nullable"/>
35784 <Attribute name="to" id="::Messaging::Message::to">
35785 <webidl> attribute DOMString[] to setraises(<ref>WebAPIException</ref>);</webidl>
35788 The destination of a message.
35794 <Type type="array">
35795 <Type type="DOMString"/>
35798 <RaiseException name="WebAPIException"/>
35801 <Attribute name="cc" id="::Messaging::Message::cc">
35802 <webidl> attribute DOMString[] cc setraises(<ref>WebAPIException</ref>);</webidl>
35805 The carbon copy address of a message.
35809 This property is used only for email messages.
35816 <Type type="array">
35817 <Type type="DOMString"/>
35820 <RaiseException name="WebAPIException"/>
35823 <Attribute name="bcc" id="::Messaging::Message::bcc">
35824 <webidl> attribute DOMString[] bcc setraises(<ref>WebAPIException</ref>);</webidl>
35827 The blind carbon copy (bcc) address of a message.
35831 This property is used only with email messages.
35838 <Type type="array">
35839 <Type type="DOMString"/>
35842 <RaiseException name="WebAPIException"/>
35845 <Attribute name="body" id="::Messaging::Message::body">
35846 <webidl> attribute <ref>MessageBody</ref> body setraises(<ref>WebAPIException</ref>);</webidl>
35849 An attribute to store the body of a message.
35855 <Type name="MessageBody"/>
35857 <RaiseException name="WebAPIException"/>
35860 <Attribute name="isRead" id="::Messaging::Message::isRead">
35861 <webidl> attribute boolean isRead setraises(<ref>WebAPIException</ref>);</webidl>
35864 An attribute to indicate the read state for a message.
35868 This property is set to <var>true</var> if the message has been read. Else it is set to <var>false</var>.
35875 <Type type="boolean"/>
35877 <RaiseException name="WebAPIException"/>
35880 <Attribute readonly="readonly" name="hasAttachment" id="::Messaging::Message::hasAttachment">
35881 <webidl> readonly attribute boolean hasAttachment;</webidl>
35884 An attribute to indicate whether an attachment(s) exists or not.
35888 It is set to <var>true</var> if a message has one or more attachments.
35891 This property is used only with email and MMS messages.(It is valid when body is loaded)
35898 <Type type="boolean"/>
35900 <Attribute name="isHighPriority" id="::Messaging::Message::isHighPriority">
35901 <webidl> attribute boolean isHighPriority setraises(<ref>WebAPIException</ref>);</webidl>
35904 An attribute to indicate the priority of a message.
35908 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.
35911 This property is used only with email messages.
35918 <Type type="boolean"/>
35920 <RaiseException name="WebAPIException"/>
35923 <Attribute name="subject" id="::Messaging::Message::subject">
35924 <webidl> attribute DOMString subject setraises(<ref>WebAPIException</ref>);</webidl>
35927 An attribute to store the subject of a message.
35931 This property is used only with email and MMS messages.
35938 <Type type="DOMString"/>
35940 <RaiseException name="WebAPIException"/>
35943 <Attribute readonly="readonly" name="inResponseTo" id="::Messaging::Message::inResponseTo">
35944 <webidl> readonly attribute <ref>MessageId</ref>? inResponseTo setraises(<ref>WebAPIException</ref>);</webidl>
35947 The identifier of the original message.
35951 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>.
35958 <Type name="MessageId" nullable="nullable"/>
35960 <RaiseException name="WebAPIException"/>
35963 <Attribute readonly="readonly" name="messageStatus" id="::Messaging::Message::messageStatus">
35964 <webidl> readonly attribute DOMString messageStatus;</webidl>
35967 The status of a given message.
35971 It can be one of these values:
35984 If the status of the current message does not correspond to any item from
35985 the list, an empty value is returned.
35992 <Type type="DOMString"/>
35994 <Attribute name="attachments" id="::Messaging::Message::attachments">
35995 <webidl> attribute <ref>MessageAttachment</ref>[] attachments setraises(<ref>WebAPIException</ref>);</webidl>
35998 The list of the message attachments.
36002 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).
36008 <Code> // Define the success callback.
36009 function serviceListCB(services) {
36010 if (services.length > 0) {
36011 var msg = new tizen.Message("messaging.email");
36012 msg.attachments = [new tizen.MessageAttachment("images/myimage.png", "image/png"),
36013 new tizen.MessageAttachment("documents/mydoc.pdf", "text/pdf")];
36017 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36022 <Type type="array">
36023 <Type name="MessageAttachment"/>
36026 <RaiseException name="WebAPIException"/>
36030 <Dictionary name="MessageInit" id="::Messaging::MessageInit">
36031 <webidl> dictionary MessageInit
36042 DOMString plainBody;
36044 DOMString htmlBody;
36046 boolean isHighPriority;
36050 Provides specific message attributes upon message creation.
36054 This interface is used to input parameters when messages are created using
36055 the Message constructor.
36058 All the attributes are optional and are <var>undefined </var>by default, unless otherwise stated in the parameter description.
36065 <DictionaryMember name="subject" id="::Messaging::MessageInit::subject">
36066 <webidl> DOMString subject;</webidl>
36069 The subject of a message.
36073 This property is used only with email and MMS messages.
36080 <Type type="DOMString"/>
36081 </DictionaryMember>
36082 <DictionaryMember name="to" id="::Messaging::MessageInit::to">
36083 <webidl> DOMString[] to;</webidl>
36086 The destination addresses (or phone numbers) of a message.
36092 <Type type="array">
36093 <Type type="DOMString"/>
36095 </DictionaryMember>
36096 <DictionaryMember name="cc" id="::Messaging::MessageInit::cc">
36097 <webidl> DOMString[] cc;</webidl>
36100 The carbon copy addresses of a message.
36104 This property is used only with email messages.
36111 <Type type="array">
36112 <Type type="DOMString"/>
36114 </DictionaryMember>
36115 <DictionaryMember name="bcc" id="::Messaging::MessageInit::bcc">
36116 <webidl> DOMString[] bcc;</webidl>
36119 The blind carbon copy addresses of a message.
36123 This property is used only with email messages.
36130 <Type type="array">
36131 <Type type="DOMString"/>
36133 </DictionaryMember>
36134 <DictionaryMember name="plainBody" id="::Messaging::MessageInit::plainBody">
36135 <webidl> DOMString plainBody;</webidl>
36138 The plain text representation of a message body.
36144 <Type type="DOMString"/>
36145 </DictionaryMember>
36146 <DictionaryMember name="htmlBody" id="::Messaging::MessageInit::htmlBody">
36147 <webidl> DOMString htmlBody;</webidl>
36150 The HTML representation of a message body.
36154 This property is used only with email messages.
36161 <Type type="DOMString"/>
36162 </DictionaryMember>
36163 <DictionaryMember name="isHighPriority" id="::Messaging::MessageInit::isHighPriority">
36164 <webidl> boolean isHighPriority;</webidl>
36167 The priority of a message.
36171 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.
36174 This property is used only with email messages.
36181 <Type type="boolean"/>
36182 </DictionaryMember>
36184 <Interface name="MessageBody" id="::Messaging::MessageBody">
36185 <webidl> [NoInterfaceObject] interface MessageBody {
36187 readonly attribute <ref>MessageId</ref> messageId;
36189 readonly attribute boolean loaded;
36191 attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);
36193 attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);
36195 attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);
36199 This interface describes a message body.
36203 Message body is comprised of a plain text, an HTML, and inline attachments.
36210 <ExtendedAttributeList>
36211 <ExtendedAttribute name="NoInterfaceObject">
36212 <webidl>NoInterfaceObject</webidl>
36213 </ExtendedAttribute>
36214 </ExtendedAttributeList>
36215 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageBody::messageId">
36216 <webidl> readonly attribute <ref>MessageId</ref> messageId;</webidl>
36219 The ID of a parent message.
36223 It holds the ID of the message containing this body.
36230 <Type name="MessageId"/>
36232 <Attribute readonly="readonly" name="loaded" id="::Messaging::MessageBody::loaded">
36233 <webidl> readonly attribute boolean loaded;</webidl>
36236 An attribute to indicate whether the message body has been loaded or not.
36240 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.
36241 The default value is <var>false</var>.
36248 <Type type="boolean"/>
36250 <Attribute name="plainBody" id="::Messaging::MessageBody::plainBody">
36251 <webidl> attribute DOMString plainBody setraises(<ref>WebAPIException</ref>);</webidl>
36254 The plain text representation of a message body.
36260 <Type type="DOMString"/>
36262 <RaiseException name="WebAPIException"/>
36265 <Attribute name="htmlBody" id="::Messaging::MessageBody::htmlBody">
36266 <webidl> attribute DOMString htmlBody setraises(<ref>WebAPIException</ref>);</webidl>
36269 The HTML representation of a message body.
36273 This attribute holds an empty string if the message does not have any HTML body content.
36274 This property is used only with email messages.
36281 <Type type="DOMString"/>
36283 <RaiseException name="WebAPIException"/>
36286 <Attribute name="inlineAttachments" id="::Messaging::MessageBody::inlineAttachments">
36287 <webidl> attribute <ref>MessageAttachment</ref>[] inlineAttachments setraises(<ref>WebAPIException</ref>);</webidl>
36290 The list of the inline attachments.
36294 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).
36297 To indicate where to show an inline attachment within the HTML body, a link of the following format should be provided:
36298 "<img src="The file name of a inline attachment">"
36299 This property is used only with email messages.
36305 <Code> // Define the success callback.
36306 function serviceListCB(services) {
36307 if (services.length > 0) {
36308 var msg = new tizen.Message("messaging.email");
36309 msg.body.htmlBody = "<html><body><img src='myimage.png'></body></html>";
36310 msg.body.inlineAttachments = [new tizen.MessageAttachment("images/myimage.png")];
36314 tizen.messaging.getMessageServices("messaging.email", serviceListCB);
36318 <Type type="array">
36319 <Type name="MessageAttachment"/>
36322 <RaiseException name="WebAPIException"/>
36326 <Interface name="MessageAttachment" id="::Messaging::MessageAttachment">
36327 <webidl> [Constructor(DOMString filePath, optional DOMString? mimeType)]
36328 interface MessageAttachment {
36330 readonly attribute <ref>MessageAttachmentId</ref>? id;
36332 readonly attribute <ref>MessageId</ref>? messageId;
36334 readonly attribute DOMString? mimeType;
36336 readonly attribute DOMString? filePath;
36340 This interface defines the content and attributes of a message attachment.
36346 <ExtendedAttributeList>
36347 <ExtendedAttribute name="Constructor">
36348 <webidl>Constructor(DOMString filePath, optional DOMString? mimeType)</webidl>
36350 <Argument name="filePath">
36351 <Type type="DOMString"/>
36353 <Argument optional="optional" name="mimeType">
36354 <Type type="DOMString" nullable="nullable"/>
36357 </ExtendedAttribute>
36358 </ExtendedAttributeList>
36359 <Attribute readonly="readonly" name="id" id="::Messaging::MessageAttachment::id">
36360 <webidl> readonly attribute <ref>MessageAttachmentId</ref>? id;</webidl>
36363 The ID of an attachment.
36367 It holds the identifier of the attachment within its parent message.
36370 By default, this attribute is set to <var>null</var>.
36377 <Type name="MessageAttachmentId" nullable="nullable"/>
36379 <Attribute readonly="readonly" name="messageId" id="::Messaging::MessageAttachment::messageId">
36380 <webidl> readonly attribute <ref>MessageId</ref>? messageId;</webidl>
36383 The ID of a parent message.
36387 By default, this attribute is set to <var>null</var>.
36394 <Type name="MessageId" nullable="nullable"/>
36396 <Attribute readonly="readonly" name="mimeType" id="::Messaging::MessageAttachment::mimeType">
36397 <webidl> readonly attribute DOMString? mimeType;</webidl>
36400 The attachment MIME type.
36404 It describes the MIME type of an attachment, for example; "text/html".
36407 By default, this attribute is set to <var>null</var>.
36414 <Type type="DOMString" nullable="nullable"/>
36416 <Attribute readonly="readonly" name="filePath" id="::Messaging::MessageAttachment::filePath">
36417 <webidl> readonly attribute DOMString? filePath;</webidl>
36420 The location path to a loaded attachment file.
36424 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.
36431 <Type type="DOMString" nullable="nullable"/>
36434 <Interface name="Messaging" id="::Messaging::Messaging">
36435 <webidl> [NoInterfaceObject] interface Messaging {
36437 void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36438 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36439 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36443 This interface retrieves messaging services.
36447 Fetches all existing messaging services by type or a messaging service of a given type
36448 for concrete account.
36454 <Code> // Define the success callback.
36455 function serviceListCB(services) {
36456 if (services.length > 0) {
36457 var msg = new tizen.Message("messaging.sms");
36461 // Define error callback.
36462 function errorCallback(error) {
36463 console.log("Cannot get messaging service " + error.message);
36466 tizen.messaging.getMessageServices("messaging.sms", serviceListCB,
36470 <ExtendedAttributeList>
36471 <ExtendedAttribute name="NoInterfaceObject">
36472 <webidl>NoInterfaceObject</webidl>
36473 </ExtendedAttribute>
36474 </ExtendedAttributeList>
36475 <Operation name="getMessageServices" id="::Messaging::Messaging::getMessageServices">
36476 <webidl> void getMessageServices(<ref>MessageServiceTag</ref> messageServiceType,
36477 <ref>MessageServiceArraySuccessCallback</ref> successCallback,
36478 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36481 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.
36485 The errorCallback is launched with these error types:
36489 InvalidValuesError - If any of the input parameters contain an invalid value, the encoding is not valid or onsuccess is null.
36490 Please note that to allow developers to ignore errors, errorCallback accepts null as a valid value. </li>
36492 UnknownError - In any other error case. </li>
36498 <Code> // Define the error callback.
36499 function errorCallback(error) {
36500 console.log("Cannot get messaging service " + error.message);
36503 // Define the success callback.
36504 function serviceListCB(services) {
36505 console.log("Found " + services.length + "email services");
36508 tizen.messaging.getMessageServices("messaging.email", serviceListCB,
36512 <Type type="void"/>
36514 <Argument name="messageServiceType">
36517 Type of the services to be retrieved.
36520 <Type name="MessageServiceTag"/>
36522 <Argument name="successCallback">
36525 The method invoked when the services are successfully retrieved.
36528 <Type name="MessageServiceArraySuccessCallback"/>
36530 <Argument optional="optional" name="errorCallback">
36533 The method invoked when an error occurs.
36536 <Type name="ErrorCallback" nullable="nullable"/>
36540 <RaiseException name="WebAPIException">
36543 with error type TypeMismatchError, if any input parameter
36544 is not compatible with the expected type for that parameter.
36547 with error type NotSupportedError, if this feature is not supported.
36554 <Interface name="MessageServiceArraySuccessCallback" id="::Messaging::MessageServiceArraySuccessCallback">
36555 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageServiceArraySuccessCallback {
36557 void onsuccess(<ref>MessageService</ref>[] services);
36562 Defines callback(s) for retrieving message services.
36568 <ExtendedAttributeList>
36569 <ExtendedAttribute name="Callback" value="FunctionOnly">
36570 <webidl>Callback</webidl>
36571 </ExtendedAttribute>
36572 <ExtendedAttribute name="NoInterfaceObject">
36573 <webidl> NoInterfaceObject</webidl>
36574 </ExtendedAttribute>
36575 </ExtendedAttributeList>
36576 <Operation name="onsuccess" id="::Messaging::MessageServiceArraySuccessCallback::onsuccess">
36577 <webidl> void onsuccess(<ref>MessageService</ref>[] services);</webidl>
36580 Called when finding message services is successful.
36586 <Type type="void"/>
36588 <Argument name="services">
36591 Array of available <em>MessageService</em> objects on the device.
36594 <Type type="array">
36595 <Type name="MessageService"/>
36601 <Interface name="MessageService" id="::Messaging::MessageService">
36602 <webidl> [NoInterfaceObject] interface MessageService {
36604 readonly attribute DOMString id;
36606 readonly attribute <ref>MessageServiceTag</ref> type;
36608 readonly attribute DOMString name;
36610 void sendMessage(<ref>Message</ref> message,
36611 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36612 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36614 void loadMessageBody(<ref>Message</ref> message,
36615 <ref>MessageBodySuccessCallback</ref> successCallback,
36616 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36618 void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36619 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36620 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
36622 long sync(optional <ref>SuccessCallback</ref>? successCallback,
36623 optional <ref>ErrorCallback</ref>? errorCallback,
36624 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36626 long syncFolder(<ref>MessageFolder</ref> folder,
36627 optional <ref>SuccessCallback</ref>? successCallback,
36628 optional <ref>ErrorCallback</ref>? errorCallback,
36629 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);
36631 void stopSync(long opId) raises(<ref>WebAPIException</ref>);
36633 readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);
36637 This interface allows a web application to manipulate and send messages and supports the message creating, sending, and fetching capabilities.
36641 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.
36644 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.
36647 The interface allows fetching of the message body for a given message using loadMessageBody() method.
36653 <Code> // Define the success callback.
36654 function messageSent(recipients) {
36655 console.log("The SMS has been sent");
36658 // Define the error callback.
36659 function messageFailed(error) {
36660 console.log("The SMS could not be sent " + error.message);
36663 // Define service error callback.
36664 function serviceErrorCB(error) {
36665 console.log("Cannot get messaging service " + error.message);
36668 // Define the success callback.
36669 function serviceListCB(services) {
36670 if (services.length > 0) {
36671 // SMS sending example
36672 var msg = new tizen.Message("messaging.sms", {plainBody:"I will arrive in 10 minutes.",
36673 to:["+34666666666"]});
36675 services[0].sendMessage(msg, messageSent, messageFailed);
36679 tizen.messaging.getMessageServices("messaging.sms",
36684 <ExtendedAttributeList>
36685 <ExtendedAttribute name="NoInterfaceObject">
36686 <webidl>NoInterfaceObject</webidl>
36687 </ExtendedAttribute>
36688 </ExtendedAttributeList>
36689 <Attribute readonly="readonly" name="id" id="::Messaging::MessageService::id">
36690 <webidl> readonly attribute DOMString id;</webidl>
36693 The unique identifier of this Messaging service.
36699 <Type type="DOMString"/>
36701 <Attribute readonly="readonly" name="type" id="::Messaging::MessageService::type">
36702 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
36705 The tag supported by this messaging service.
36711 <Type name="MessageServiceTag"/>
36713 <Attribute readonly="readonly" name="name" id="::Messaging::MessageService::name">
36714 <webidl> readonly attribute DOMString name;</webidl>
36717 The messaging service name taken from the messaging service
36723 <Type type="DOMString"/>
36725 <Operation name="sendMessage" id="::Messaging::MessageService::sendMessage">
36726 <webidl> void sendMessage(<ref>Message</ref> message,
36727 optional <ref>MessageRecipientsCallback</ref>? successCallback,
36728 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36731 Sends a specified message.
36735 For messaging technologies in which the message is sent individually to every recipient(such as SMS), individual notification must be supported as follows:
36738 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.
36739 These error types may be passed, depending on the error conditions:
36743 NetworkError - If the network connection is not accessible. </li>
36745 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36747 UnknownError - If any other error occurs. </li>
36750 The error message contains the name of the recipient who has failed to receive the sent message.
36753 When the operation is fully completed (that is, the implementation has the
36754 result of the send operation for all recipients), the onsuccess()
36755 method of the successCallback will be invoked with an array of recipients who received
36756 the sent message, as input parameter.
36766 http://tizen.org/privilege/messaging.write
36768 <Code> // Define the success callback
36769 function messageSent(recipients) {
36770 for (var i = 0; i < recipients.length; i++) {
36771 console.log("The SMS has been sent to " + recipients[i]);
36775 // Define the error callback.
36776 function messageFailed(error) {
36777 console.log("The SMS could not be sent " + error.message);
36780 // Define the success callback.
36781 function serviceListCB(services) {
36782 if (services.length > 0) {
36783 // SMS sending example
36784 var msg = new tizen.Message("messaging.sms", {plainBody: "I will arrive in 10 minutes.",
36785 to: ["+34666666666", "+34888888888"]});
36787 services[0].sendMessage(msg, messageSent, messageFailed);
36790 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
36793 <Type type="void"/>
36795 <Argument name="message">
36798 The message to be sent.
36801 <Type name="Message"/>
36803 <Argument optional="optional" name="successCallback">
36806 The method to be invoked when the message is successfully sent.
36809 <Type name="MessageRecipientsCallback" nullable="nullable"/>
36811 <Argument optional="optional" name="errorCallback">
36814 The method to be invoked when the sending request has failed.
36817 <Type name="ErrorCallback" nullable="nullable"/>
36821 <RaiseException name="WebAPIException">
36824 with error type TypeMismatchError, if any input parameter
36825 is not compatible with the expected type for that parameter.
36828 with error type SecurityError, if the application does not have the privilege to call this method.
36831 with error type NotSupportedError, if this feature is not supported.
36837 <Operation name="loadMessageBody" id="::Messaging::MessageService::loadMessageBody">
36838 <webidl> void loadMessageBody(<ref>Message</ref> message,
36839 <ref>MessageBodySuccessCallback</ref> successCallback,
36840 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36843 Loads the body for a specified message.
36847 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.
36848 If the message body is already loaded, the onsuccess() method of the successCallback will be invoked immediately.
36851 The errorCallback is launched with these error types:
36855 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36857 UnknownError - If any other error occurs. </li>
36867 http://tizen.org/privilege/messaging.write
36869 <Code> // Assume messaging service is initialized.
36871 // Define the success body loaded callback.
36872 function successCallback(message) {
36873 console.log ("body for message: " + message.subject + "from: " + message.from + "loaded.");
36875 // Define error callback.
36876 function errorCallback(error) {
36877 console.log("Cannot load message body" + error.message);
36880 function messageQueryCallback(messages) {
36881 for (var i = 0; i < messages.length; i++) {
36882 var message = messages[i];
36883 if (!message.body.loaded) {
36884 service.loadMessageBody(message, successCallback, errorCallback);
36889 service.messageStorage.findMessages(new tizen.AttributeFilter("type", "EXACTLY", "messaging.email"), messageQueryCallback);
36892 <Type type="void"/>
36894 <Argument name="message">
36897 Message with the body to be loaded.
36900 <Type name="Message"/>
36902 <Argument name="successCallback">
36905 The method to be invoked when the message body is successfully loaded.
36908 <Type name="MessageBodySuccessCallback"/>
36910 <Argument optional="optional" name="errorCallback">
36913 The method to be invoked when the loading request fails.
36916 <Type name="ErrorCallback" nullable="nullable"/>
36920 <RaiseException name="WebAPIException">
36923 with error type TypeMismatchError, if any input parameter
36924 is not compatible with the expected type for that parameter.
36927 with error type SecurityError, if the application does not have the privilege to call this method.
36930 with error type NotSupportedError, if this feature is not supported.
36936 <Operation name="loadMessageAttachment" id="::Messaging::MessageService::loadMessageAttachment">
36937 <webidl> void loadMessageAttachment(<ref>MessageAttachment</ref> attachment,
36938 <ref>MessageAttachmentSuccessCallback</ref> successCallback,
36939 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
36942 Loads a specified message attachment.
36946 This method is used only for email services. If the message attachment is already loaded, the onsuccess() method of the successCallback is invoked immediately.
36949 The errorCallback is launched with these error types:
36953 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
36955 UnknownError - If any other error occurs. </li>
36965 http://tizen.org/privilege/messaging.write
36967 <Code> // Assume messaging service is initialized.
36969 // Define success body loaded callback
36970 function successCallback(attachment) {
36971 console.log("attachment" + attachment.id + "is loaded to:" + attachment.filePath);
36973 // Define error callback
36974 function errorCallback(error) {
36975 console.log("Cannot load message attachment" + error.message);
36978 function messagesFoundCB(messages) {
36979 for (var i = 0; i < messages.length; i++) {
36980 var message = messages[i];
36981 if (!message.attachments[0].loaded) {
36982 service.loadMessageAttachment(message.attachments[0], successCallback, errorCallback);
36987 service.messageStorage.findMessages(new tizen.AttributeFilter("hasAttachment", "EXACTLY", true), messagesFoundCB);
36990 <Type type="void"/>
36992 <Argument name="attachment">
36995 Message attachment to be loaded.
36998 <Type name="MessageAttachment"/>
37000 <Argument name="successCallback">
37003 The method to be invoked when the message attachment is successfully loaded.
37006 <Type name="MessageAttachmentSuccessCallback"/>
37008 <Argument optional="optional" name="errorCallback">
37011 The method to be invoked when the loading request fails.
37014 <Type name="ErrorCallback" nullable="nullable"/>
37018 <RaiseException name="WebAPIException">
37021 with error type TypeMismatchError, if any input parameter
37022 is not compatible with the expected type for that parameter.
37025 with error type SecurityError, if the application does not have the privilege to call this method.
37028 with error type NotSupportedError, if this feature is not supported.
37034 <Operation name="sync" id="::Messaging::MessageService::sync">
37035 <webidl> long sync(optional <ref>SuccessCallback</ref>? successCallback,
37036 optional <ref>ErrorCallback</ref>? errorCallback,
37037 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37040 Synchronizes the service content with an external mail server.
37044 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.
37047 The errorCallback is launched with these error types:
37051 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37053 AbortError - If the operation has been stopped. </li>
37055 UnknownError - If any other error occurs. </li>
37065 http://tizen.org/privilege/messaging.write
37067 <Code> // Define the success callback.
37068 function serviceSynced() {
37069 console.log("New messages are fetched!");
37072 // Define the success callback.
37073 function servicesListSuccessCB(services) {
37074 services[0].sync(serviceSynced, null, 30);
37075 // Subscribe to MessageStorage notification
37077 tizen.messaging.getMessageServices("messaging.email", servicesListSuccessCB);
37083 long The identifier which can be used to stop this service operation.
37088 <Argument optional="optional" name="successCallback">
37091 The method to be invoked when all the actions are completed successfully.
37094 <Type name="SuccessCallback" nullable="nullable"/>
37096 <Argument optional="optional" name="errorCallback">
37099 The method to be invoked when the request fails.
37102 <Type name="ErrorCallback" nullable="nullable"/>
37104 <Argument optional="optional" name="limit">
37107 The maximum amount of messages retrieved within each folder.
37110 <Type type="unsigned long" nullable="nullable"/>
37114 <RaiseException name="WebAPIException">
37117 with error type TypeMismatchError, if any input parameter
37118 is not compatible with the expected type for that parameter.
37121 with error type SecurityError, if the application does not have the privilege to call this method.
37124 with error type NotSupportedError, if this feature is not supported.
37130 <Operation name="syncFolder" id="::Messaging::MessageService::syncFolder">
37131 <webidl> long syncFolder(<ref>MessageFolder</ref> folder,
37132 optional <ref>SuccessCallback</ref>? successCallback,
37133 optional <ref>ErrorCallback</ref>? errorCallback,
37134 optional unsigned long? limit) raises(<ref>WebAPIException</ref>);</webidl>
37137 Synchronizes the folder content with an external mail server.
37141 This method is used only for email services. This method performs the following actions:
37145 Exports local changes within a given folder from device to server. </li>
37147 Retrieves the list of available messages from within the given folder. </li>
37150 Messages that are retrieved from a given folder, even if synchronizable flag for this folder is not set.
37151 The backend is responsible in deciding which data is retrieved for every message. It can be:
37155 Message header details </li>
37157 Whole message body </li>
37160 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.
37163 The errorCallback is launched with these error types:
37167 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37169 AbortError - If the operation is stopped. </li>
37171 UnknownError - If any other error occurs. </li>
37181 http://tizen.org/privilege/messaging.write
37183 <Code> var emailService; // Assume email service is initialized
37184 // Define the error callback.
37185 function errorCallback(err) {
37186 console.log(err.name + " error: " + err.message);
37188 function serviceCallback(services) {
37189 emailService = services[0];
37190 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", emailService.id);
37192 emailService.messageStorage.findFolders(filter, folderQueryCallback);
37195 // Define the success callback.
37196 function folderSynced() {
37197 console.log("New messages are fetched!");
37199 function folderQueryCallback(folders) {
37200 console.log(folders.length + " folders(s) found!");
37201 for (var i = 0; i < folders.length; i++) {
37202 emailService.syncFolder (folders[i], folderSynced, null, 30);
37206 tizen.messaging.getMessageServices("messaging.email", serviceCallback, errorCallback);
37212 long The identifier which can be used to stop this service operation.
37217 <Argument name="folder">
37220 The folder to be synchronized.
37223 <Type name="MessageFolder"/>
37225 <Argument optional="optional" name="successCallback">
37228 The method to be invoked when all actions are completed successfully.
37231 <Type name="SuccessCallback" nullable="nullable"/>
37233 <Argument optional="optional" name="errorCallback">
37236 The method to be invoked when the request fails.
37239 <Type name="ErrorCallback" nullable="nullable"/>
37241 <Argument optional="optional" name="limit">
37244 The maximum amount of messages retrieved within a given folder.
37247 <Type type="unsigned long" nullable="nullable"/>
37251 <RaiseException name="WebAPIException">
37254 with error type TypeMismatchError, if any input parameter
37255 is not compatible with the expected type for that parameter.
37258 with error type SecurityError, if the application does not have the privilege to call this method.
37261 with error type NotSupportedError, if this feature is not supported.
37267 <Operation name="stopSync" id="::Messaging::MessageService::stopSync">
37268 <webidl> void stopSync(long opId) raises(<ref>WebAPIException</ref>);</webidl>
37271 Stops sync() and syncFoler() operation.
37275 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.
37278 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.
37285 <Type type="void"/>
37287 <Argument name="opId">
37290 A service operation identifier.
37293 <Type type="long"/>
37297 <RaiseException name="WebAPIException">
37300 with error type TypeMismatchError, if any input parameter
37301 is not compatible with the expected type for that parameter.
37304 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
37310 <Attribute readonly="readonly" name="messageStorage" id="::Messaging::MessageService::messageStorage">
37311 <webidl> readonly attribute <ref>MessageStorage</ref> messageStorage getraises(<ref>WebAPIException</ref>);</webidl>
37314 An attribute to access <em>MessageStorage </em>for this messaging service.
37318 If the backend does not support <em>MessageStorage </em>for this messaging service, a WebAPIException is raised with error type NotSupportedError.
37325 <Type name="MessageStorage"/>
37327 <RaiseException name="WebAPIException"/>
37331 <Interface name="MessageRecipientsCallback" id="::Messaging::MessageRecipientsCallback">
37332 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageRecipientsCallback {
37334 void onsuccess(DOMString[] recipients);
37339 This interface specifies the methods to be called for the sendMessage() operation.
37345 <ExtendedAttributeList>
37346 <ExtendedAttribute name="Callback" value="FunctionOnly">
37347 <webidl>Callback</webidl>
37348 </ExtendedAttribute>
37349 <ExtendedAttribute name="NoInterfaceObject">
37350 <webidl> NoInterfaceObject</webidl>
37351 </ExtendedAttribute>
37352 </ExtendedAttributeList>
37353 <Operation name="onsuccess" id="::Messaging::MessageRecipientsCallback::onsuccess">
37354 <webidl> void onsuccess(DOMString[] recipients);</webidl>
37357 Called when the message sending is finished.
37363 <Type type="void"/>
37365 <Argument name="recipients">
37368 The recipients of the message.
37371 <Type type="array">
37372 <Type type="DOMString"/>
37378 <Interface name="MessageBodySuccessCallback" id="::Messaging::MessageBodySuccessCallback">
37379 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageBodySuccessCallback {
37381 void onsuccess(<ref>Message</ref> message);
37385 This interface specifies a success callback function that takes a message as the input argument.
37386 It is used in the loadMessageBody() asynchronous operation.
37392 <ExtendedAttributeList>
37393 <ExtendedAttribute name="Callback" value="FunctionOnly">
37394 <webidl>Callback</webidl>
37395 </ExtendedAttribute>
37396 <ExtendedAttribute name="NoInterfaceObject">
37397 <webidl> NoInterfaceObject</webidl>
37398 </ExtendedAttribute>
37399 </ExtendedAttributeList>
37400 <Operation name="onsuccess" id="::Messaging::MessageBodySuccessCallback::onsuccess">
37401 <webidl> void onsuccess(<ref>Message</ref> message);</webidl>
37404 Called when the asynchronous query completes successfully.
37410 <Type type="void"/>
37412 <Argument name="message">
37415 The message containing the loaded body.
37418 <Type name="Message"/>
37423 <Interface name="MessageAttachmentSuccessCallback" id="::Messaging::MessageAttachmentSuccessCallback">
37424 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageAttachmentSuccessCallback {
37426 void onsuccess(<ref>MessageAttachment</ref> attachment);
37430 This callback interface specifies a success callback function that takes the loaded attachment as the input argument.
37431 It is used in the loadMessageAttachment() asynchronous operation.
37437 <ExtendedAttributeList>
37438 <ExtendedAttribute name="Callback" value="FunctionOnly">
37439 <webidl>Callback</webidl>
37440 </ExtendedAttribute>
37441 <ExtendedAttribute name="NoInterfaceObject">
37442 <webidl> NoInterfaceObject</webidl>
37443 </ExtendedAttribute>
37444 </ExtendedAttributeList>
37445 <Operation name="onsuccess" id="::Messaging::MessageAttachmentSuccessCallback::onsuccess">
37446 <webidl> void onsuccess(<ref>MessageAttachment</ref> attachment);</webidl>
37449 Called when the asynchronous query completes successfully.
37455 <Type type="void"/>
37457 <Argument name="attachment">
37460 The loaded attachment.
37463 <Type name="MessageAttachment"/>
37468 <Interface name="MessageStorage" id="::Messaging::MessageStorage">
37469 <webidl> [NoInterfaceObject] interface MessageStorage {
37471 void addDraftMessage(<ref>Message</ref> message,
37472 optional <ref>SuccessCallback</ref>? successCallback,
37473 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37475 void findMessages(<ref>AbstractFilter</ref> filter,
37476 <ref>MessageArraySuccessCallback</ref> successCallback,
37477 optional <ref>ErrorCallback</ref>? errorCallback,
37478 optional <ref>SortMode</ref>? sort,
37479 optional unsigned long? limit,
37480 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37482 void removeMessages(<ref>Message</ref>[] messages,
37483 optional <ref>SuccessCallback</ref>? successCallback,
37484 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37486 void updateMessages(<ref>Message</ref>[] messages,
37487 optional <ref>SuccessCallback</ref>? successCallback,
37488 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37490 void findConversations(<ref>AbstractFilter</ref> filter,
37491 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37492 optional <ref>ErrorCallback</ref>? errorCallback,
37493 optional <ref>SortMode</ref>? sort,
37494 optional unsigned long? limit,
37495 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);
37497 void removeConversations(<ref>MessageConversation</ref>[] conversations,
37498 optional <ref>SuccessCallback</ref>? successCallback,
37499 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37502 void findFolders(<ref>AbstractFilter</ref> filter,
37503 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
37504 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
37506 long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
37507 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37509 long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
37510 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37512 long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
37513 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);
37515 void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);
37519 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.
37523 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.
37530 <ExtendedAttributeList>
37531 <ExtendedAttribute name="NoInterfaceObject">
37532 <webidl>NoInterfaceObject</webidl>
37533 </ExtendedAttribute>
37534 </ExtendedAttributeList>
37535 <Operation name="addDraftMessage" id="::Messaging::MessageStorage::addDraftMessage">
37536 <webidl> void addDraftMessage(<ref>Message</ref> message,
37537 optional <ref>SuccessCallback</ref>? successCallback,
37538 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37541 Adds a draft message to <em>MessageStorage</em> and these messages are stored in the Drafts folder.
37545 The errorCallback is launched with these error types:
37549 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
37551 UnknownError - If any other error occurs. </li>
37561 http://tizen.org/privilege/messaging.write
37563 <Code> // Define success callback
37564 function successCallback() {
37565 console.log("Draft message added");
37568 // Define error callback
37569 function errorCallback(error) {
37570 console.log("Cannot add draft message " + error.message);
37573 // Define service query success callback.
37574 function serviceListCB(services) {
37575 if (services.length > 0) {
37576 var msg = new tizen.Message("messaging.sms", {plainBody: "Tizen draft SMS message."});
37577 services[0].messageStorage.addDraftMessage(msg,
37582 tizen.messaging.getMessageServices("messaging.sms", serviceListCB);
37585 <Type type="void"/>
37587 <Argument name="message">
37590 The draft message to add to the storage.
37593 <Type name="Message"/>
37595 <Argument optional="optional" name="successCallback">
37598 The method called when draft messages successfully added.
37601 <Type name="SuccessCallback" nullable="nullable"/>
37603 <Argument optional="optional" name="errorCallback">
37606 The method called when an error occurs.
37609 <Type name="ErrorCallback" nullable="nullable"/>
37613 <RaiseException name="WebAPIException">
37616 with error type TypeMismatchError, if any input parameter
37617 is not compatible with the expected type for that parameter or if the method is invoked for an incoming message.
37620 with error type SecurityError, if the application does not have the privilege to call this method.
37623 with error type NotSupportedError, if this feature is not supported.
37629 <Operation name="findMessages" id="::Messaging::MessageStorage::findMessages">
37630 <webidl> void findMessages(<ref>AbstractFilter</ref> filter,
37631 <ref>MessageArraySuccessCallback</ref> successCallback,
37632 optional <ref>ErrorCallback</ref>? errorCallback,
37633 optional <ref>SortMode</ref>? sort,
37634 optional unsigned long? limit,
37635 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37638 Finds messages from <em>MessageStorage</em>.
37642 The errorCallback is launched with these error types:
37646 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37648 UnknownError - If any other error occurs. </li>
37658 http://tizen.org/privilege/messaging.read
37660 <Code> var service; // Assume messaging service is initialized
37661 var messageStorage = service.messageStorage;
37662 function messageArrayCB(messages) {
37663 console.log(messages.length + " message(s) fetched!");
37664 for (var i = 0; i < messages.length; i++) {
37665 console.log(i + ". message from " + messages[i].from);
37669 // Define error callback
37670 function errorCallback(error) {
37671 console.log("Cannot query messages" + error.message);
37674 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37675 messageStorage.findMessages(filter, messageArrayCB, errorCallback);
37678 <Type type="void"/>
37680 <Argument name="filter">
37683 The criteria to be used when filtering.
37686 <Type name="AbstractFilter"/>
37688 <Argument name="successCallback">
37691 The method called when the invocation ends successfully.
37694 <Type name="MessageArraySuccessCallback"/>
37696 <Argument optional="optional" name="errorCallback">
37699 The method called when an error occurs.
37702 <Type name="ErrorCallback" nullable="nullable"/>
37704 <Argument optional="optional" name="sort">
37707 The sorting mode for the query.
37710 <Type name="SortMode" nullable="nullable"/>
37712 <Argument optional="optional" name="limit">
37715 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
37716 If <var>0</var>, there is no limit set.
37719 <Type type="unsigned long" nullable="nullable"/>
37721 <Argument optional="optional" name="offset">
37724 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.
37727 <Type type="unsigned long" nullable="nullable"/>
37731 <RaiseException name="WebAPIException">
37734 with error type TypeMismatchError, if any input parameter
37735 is not compatible with the expected type for that parameter.
37738 with error type SecurityError, if the application does not have the privilege to call this method.
37741 with error type NotSupportedError, if this feature is not supported.
37747 <Operation name="removeMessages" id="::Messaging::MessageStorage::removeMessages">
37748 <webidl> void removeMessages(<ref>Message</ref>[] messages,
37749 optional <ref>SuccessCallback</ref>? successCallback,
37750 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37753 Removes messages from <em>MessageStorage</em>.
37757 The errorCallback is launched with these error types:
37761 InvalidValuesError - If any of the input parameters contain an invalid value </li>
37763 UnknownError - If any other error occurs. </li>
37773 http://tizen.org/privilege/messaging.write
37775 <Code> // Define success callback
37776 var service; // Assume messaging service is initialized
37777 var messageStorage = service.messageStorage;
37778 function successCallback() {
37779 console.log("Messages were deleted");
37782 // Define error callback
37783 function errorCallback(error) {
37784 console.log("Cannot delete messages " + error.message);
37787 function messageArrayCB(messages) {
37788 if (messages.length > 0) {
37789 messageStorage.removeMessages(messages, successCallback, errorCallback);
37791 console.log("No messages found");
37795 var filter = new tizen.AttributeFilter("from", "CONTAINS", "2593");
37796 messageStorage.findMessages(filter, messageArrayCB);
37799 <Type type="void"/>
37801 <Argument name="messages">
37804 An array of messages to delete.
37807 <Type type="array">
37808 <Type name="Message"/>
37811 <Argument optional="optional" name="successCallback">
37814 The method called when messages are successfully deleted.
37817 <Type name="SuccessCallback" nullable="nullable"/>
37819 <Argument optional="optional" name="errorCallback">
37822 The method called when an error occurs.
37825 <Type name="ErrorCallback" nullable="nullable"/>
37829 <RaiseException name="WebAPIException">
37832 with error type TypeMismatchError, if any input parameter
37833 is not compatible with the expected type for that parameter.
37836 with error type SecurityError, if the application does not have the privilege to call this method.
37839 with error type NotSupportedError, if this feature is not supported.
37845 <Operation name="updateMessages" id="::Messaging::MessageStorage::updateMessages">
37846 <webidl> void updateMessages(<ref>Message</ref>[] messages,
37847 optional <ref>SuccessCallback</ref>? successCallback,
37848 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
37851 Updates messages in <em>MessageStorage</em>.
37855 The backend must check whether the required updates can be applied and invoke the errorCallback method, if they cannot be checked.
37856 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.
37859 The errorCallback is launched with these error types:
37863 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37865 UnknownError - If any other error occurs. </li>
37875 http://tizen.org/privilege/messaging.write
37877 <Code> var service; // Assume messaging service is initialized
37878 var messageStorage = service.messageStorage;
37880 // Define success callback
37881 function successCallback() {
37882 console.log("Messages were updated");
37885 // Define error callback
37886 function errorCallback(error) {
37887 console.log("Cannot update messages " + error.message);
37890 function messageArrayCB(messages) {
37891 if (messages.length > 0) {
37892 messages[0].isRead = true;
37893 messageStorage.updateMessages([messages[0]], successCallback, errorCallback);
37895 console.log("No messages found");
37899 var filter = new tizen.AttributeFilter('isRead', 'EXACTLY', false);
37900 messageStorage.findMessages(filter, messageArrayCB);
37904 <Type type="void"/>
37906 <Argument name="messages">
37912 <Type type="array">
37913 <Type name="Message"/>
37916 <Argument optional="optional" name="successCallback">
37919 The method called when messages are successfully updated.
37922 <Type name="SuccessCallback" nullable="nullable"/>
37924 <Argument optional="optional" name="errorCallback">
37927 The method called when an error occurs.
37930 <Type name="ErrorCallback" nullable="nullable"/>
37934 <RaiseException name="WebAPIException">
37937 with error type TypeMismatchError, if any input parameter
37938 is not compatible with the expected type for that parameter.
37941 with error type SecurityError, if the application does not have the privilege to call this method.
37944 with error type NotSupportedError, if this feature is not supported.
37950 <Operation name="findConversations" id="::Messaging::MessageStorage::findConversations">
37951 <webidl> void findConversations(<ref>AbstractFilter</ref> filter,
37952 <ref>MessageConversationArraySuccessCallback</ref> successCallback,
37953 optional <ref>ErrorCallback</ref>? errorCallback,
37954 optional <ref>SortMode</ref>? sort,
37955 optional unsigned long? limit,
37956 optional unsigned long? offset) raises(<ref>WebAPIException</ref>);</webidl>
37959 Finds conversations from <em>MessageStorage</em>.
37963 The errorCallback is launched with these error types:
37967 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
37969 UnknownError - If any other error occurs. </li>
37979 http://tizen.org/privilege/messaging.read
37981 <Code> var service; // Assume messaging service is initialized
37982 var messageStorage = service.messageStorage;
37983 function conversationsArrayCB(conversations) {
37984 console.log(conversations.length + " conversation(s) found!");
37985 for (var i = 0; i < conversations.length; i++) {
37986 console.log(i + ". conversation preview " + conversations[i].preview);
37990 // Define error callback.
37991 function errorCallback(error) {
37992 console.log("Cannot query conversations" + error.message);
37995 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
37996 messageStorage.findConversations(filter, conversationsArrayCB, errorCallback);
37999 <Type type="void"/>
38001 <Argument name="filter">
38004 The criteria to be used when filtering.
38007 <Type name="AbstractFilter"/>
38009 <Argument name="successCallback">
38012 The method called when the invocation ends successfully.
38015 <Type name="MessageConversationArraySuccessCallback"/>
38017 <Argument optional="optional" name="errorCallback">
38020 The method called when an error occurs.
38023 <Type name="ErrorCallback" nullable="nullable"/>
38025 <Argument optional="optional" name="sort">
38028 The sorting rules for the query.
38031 <Type name="SortMode" nullable="nullable"/>
38033 <Argument optional="optional" name="limit">
38036 The maximum limit the query result is set to as specified by the parameter (It is the same meaning as SQL LIMIT).
38037 If set to <var>0</var>, there is no limit set.
38040 <Type type="unsigned long" nullable="nullable"/>
38042 <Argument optional="optional" name="offset">
38045 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.
38048 <Type type="unsigned long" nullable="nullable"/>
38052 <RaiseException name="WebAPIException">
38055 with error type TypeMismatchError, if any input parameter
38056 is not compatible with the expected type for that parameter.
38059 with error type SecurityError, if the application does not have the privilege to call this method.
38062 with error type NotSupportedError, if this feature is not supported.
38068 <Operation name="removeConversations" id="::Messaging::MessageStorage::removeConversations">
38069 <webidl> void removeConversations(<ref>MessageConversation</ref>[] conversations,
38070 optional <ref>SuccessCallback</ref>? successCallback,
38071 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38074 Removes conversations from <em>MessageStorage</em>.
38078 The errorCallback is launched with these error types:
38082 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38084 UnknownError - If any other error occurs. </li>
38094 http://tizen.org/privilege/messaging.write
38096 <Code> var service; // Assume messaging service is initialized
38097 var messageStorage = service.messageStorage;
38098 // Define success callback.
38099 function successCallback() {
38100 console.log("Conversations deleted");
38103 // Define error callback.
38104 function errorCallback(error) {
38105 console.log("Cannot delete conversations " + error.message);
38108 function conversationsArrayCB(conversations) {
38109 if (conversations.length > 0) {
38110 messageStorage.removeConversations(conversations, successCallback,
38113 console.log("No conversations found");
38115 console.log("Deleted " + conversations.length + " conversation(s)");
38118 // Define error callback.
38119 function queryErrorCB(error) {
38120 console.log("Cannot query conversations" + error.message);
38123 var filter = new tizen.AttributeFilter('from', 'CONTAINS', '2593');
38124 messageStorage.findConversations(filter, conversationsArrayCB,
38128 <Type type="void"/>
38130 <Argument name="conversations">
38133 An array of conversations to delete.
38136 <Type type="array">
38137 <Type name="MessageConversation"/>
38140 <Argument optional="optional" name="successCallback">
38143 The method called when conversations are successfully deleted.
38146 <Type name="SuccessCallback" nullable="nullable"/>
38148 <Argument optional="optional" name="errorCallback">
38151 The method called when an error occurs.
38154 <Type name="ErrorCallback" nullable="nullable"/>
38158 <RaiseException name="WebAPIException">
38161 with error type TypeMismatchError, if any input parameter
38162 is not compatible with the expected type for that parameter.
38165 with error type SecurityError, if the application does not have the privilege to call this method.
38168 with error type NotSupportedError, if this feature is not supported.
38174 <Operation name="findFolders" id="::Messaging::MessageStorage::findFolders">
38175 <webidl> void findFolders(<ref>AbstractFilter</ref> filter,
38176 <ref>MessageFolderArraySuccessCallback</ref> successCallback,
38177 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
38180 Queries folders from MessageStorage.
38184 The errorCallback is launched with these error types:
38188 InvalidValuesError: If any of the input parameters contains an invalid value. </li>
38190 UnknownError: In any other error case. </li>
38200 http://tizen.org/privilege/messaging.read
38202 <Code> var service; // Assume messaging service is initialized
38203 var messageStorage = service.messageStorage;
38204 function folderArrayCB(folders) {
38205 console.log(folders.length + " folders(s) found!");
38206 for (var i = 0; i < folders.length; i++) {
38207 console.log(i + ", folder: " + folders[i].name);
38210 var filter = new tizen.AttributeFilter("serviceId", "EXACTLY", service.id);
38211 messageStorage.findFolders(filter, folderArrayCB);
38214 <Type type="void"/>
38216 <Argument name="filter">
38219 The criteria used when filtering.
38222 <Type name="AbstractFilter"/>
38224 <Argument name="successCallback">
38227 The method called when the invocation ends successfully.
38230 <Type name="MessageFolderArraySuccessCallback"/>
38232 <Argument optional="optional" name="errorCallback">
38235 The method called when an error occurs.
38238 <Type name="ErrorCallback" nullable="nullable"/>
38242 <RaiseException name="WebAPIException">
38245 with error type TypeMismatchError, if any input parameter
38246 is not compatible with the expected type for that parameter.
38249 with error type SecurityError, if the application does not have the privilege to call this method.
38252 with error type NotSupportedError, if this feature is not supported.
38258 <Operation name="addMessagesChangeListener" id="::Messaging::MessageStorage::addMessagesChangeListener">
38259 <webidl> long addMessagesChangeListener(<ref>MessagesChangeCallback</ref> messagesChangeCallback,
38260 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38263 Adds a listener to subscribe to notification for MessageStorage changes.
38267 The errorCallback is launched with these error types:
38271 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38273 UnknownError - If any other error occurs. </li>
38283 http://tizen.org/privilege/messaging.read
38285 <Code> var service; // Assume messaging service is initialized
38286 var messageStorage = service.messageStorage;
38287 var messageChangeCallback = {
38288 messagesupdated: function(messages) {
38289 console.log(messages.length + " message(s) updated");},
38290 messagesadded: function(messages) {
38291 console.log(messages.length + " message(s) added");},
38292 messagesremoved: function(messages) {
38293 console.log(messages.length + " message(s) removed");}
38296 messageStorage.addMessagesChangeListener(messageChangeCallback);
38302 long The subscription identifier.
38307 <Argument name="messagesChangeCallback">
38310 Callback that is called when the MessageStorage is changed.
38313 <Type name="MessagesChangeCallback"/>
38315 <Argument optional="optional" name="filter">
38318 The criteria to be used when filtering.
38321 <Type name="AbstractFilter" nullable="nullable"/>
38325 <RaiseException name="WebAPIException">
38328 with error type TypeMismatchError, if any input parameter
38329 is not compatible with the expected type for that parameter.
38332 with error type SecurityError, if the application does not have the privilege to call this method.
38335 with error type NotSupportedError, if this feature is not supported.
38341 <Operation name="addConversationsChangeListener" id="::Messaging::MessageStorage::addConversationsChangeListener">
38342 <webidl> long addConversationsChangeListener(<ref>MessageConversationsChangeCallback</ref> conversationsChangeCallback,
38343 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38346 Adds a listener to subscribe to notifications for MessageConversation changes.
38350 The errorCallback is launched with these error types:
38354 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38356 UnknownError - If any other error occurs. </li>
38366 http://tizen.org/privilege/messaging.read
38368 <Code> var service; // Assume messaging service is initialized
38369 var messageStorage = service.messageStorage;
38370 var conversationChangeCB = {
38371 conversationsupdated: function(conversations) {
38372 console.log(conversations.length + " conversations(s) updated");},
38373 conversationsadded: function(conversations) {
38374 console.log(conversations.length + " conversations(s) added");},
38375 conversationsremoved: function(conversations) {
38376 console.log(conversations.length + " conversations(s) removed");}
38379 messageStorage.addConversationsChangeListener(conversationChangeCB);
38385 long The subscription identifier.
38390 <Argument name="conversationsChangeCallback">
38393 Callback that is called when the MessageStorage is changed.
38396 <Type name="MessageConversationsChangeCallback"/>
38398 <Argument optional="optional" name="filter">
38401 The criteria to be used when filtering.
38404 <Type name="AbstractFilter" nullable="nullable"/>
38408 <RaiseException name="WebAPIException">
38411 with error type TypeMismatchError, if any input parameter
38412 is not compatible with the expected type for that parameter.
38415 with error type SecurityError, if the application does not have the privilege to call this method.
38418 with error type NotSupportedError, if this feature is not supported.
38424 <Operation name="addFoldersChangeListener" id="::Messaging::MessageStorage::addFoldersChangeListener">
38425 <webidl> long addFoldersChangeListener(<ref>MessageFoldersChangeCallback</ref> foldersChangeCallback,
38426 optional <ref>AbstractFilter</ref>? filter) raises(<ref>WebAPIException</ref>);</webidl>
38429 Adds a listener to subscribe to notifications for MessageFolder changes.
38433 The errorCallback is launched with these error types:
38437 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38439 UnknownError - If any other error occurs. </li>
38449 http://tizen.org/privilege/messaging.read
38451 <Code> var service; // Assume messaging service is initialized
38452 var messageStorage = service.messageStorage;
38453 var folderChangeCB = {
38454 foldersupdated: function(folders) {
38455 console.log(folders.length + " folders(s) updated");},
38456 foldersadded: function(folders) {
38457 console.log(folders.length + " folders(s) added");},
38458 foldersremoved: function(folders) {
38459 console.log(folders.length + " folders(s) removed");}
38462 messageStorage.addFoldersChangeListener(folderChangeCB);
38468 long The subscription identifier.
38473 <Argument name="foldersChangeCallback">
38476 Callback that is called when the MessageStorage is changed.
38479 <Type name="MessageFoldersChangeCallback"/>
38481 <Argument optional="optional" name="filter">
38484 The criteria to be used when filtering.
38487 <Type name="AbstractFilter" nullable="nullable"/>
38491 <RaiseException name="WebAPIException">
38494 with error type TypeMismatchError, if any input parameter
38495 is not compatible with the expected type for that parameter.
38498 with error type SecurityError, if the application does not have the privilege to call this method.
38501 with error type NotSupportedError, if this feature is not supported.
38507 <Operation name="removeChangeListener" id="::Messaging::MessageStorage::removeChangeListener">
38508 <webidl> void removeChangeListener(long watchId) raises(<ref>WebAPIException</ref>);</webidl>
38511 Removes a listener to unsubscribe from receiving message notifications.
38515 The errorCallback is launched with these error types:
38519 InvalidValuesError - If any of the input parameters contains an invalid value. </li>
38521 UnknownError - If any other error occurs. </li>
38524 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.
38525 If the <em>subscriptionId argument does not correspond to a valid subscription, the method will return without any further action.
38535 http://tizen.org/privilege/messaging.read
38537 <Code> var watchId;
38538 var service; // Assume messaging service is initialized
38539 var messageStorage = service.messageStorage;
38540 var folderChangeCB = {
38541 foldersupdated: function(folders) {
38542 console.log(folders.length + " folders(s) updated. Cancel watching.");
38543 messageStorage.removeChangeListener(watchId); },
38544 foldersadded: function(folders) {
38545 console.log(folders.length + " folders(s) added. Cancel watching.");
38546 messageStorage.removeChangeListener(watchId); },
38547 foldersremoved: function(folders) {
38548 console.log(folders.length + " folders(s) removed. Cancel watching.");
38549 messageStorage.removeChangeListener(watchId);}
38552 watchId = messageStorage.addFoldersChangeListener(folderChangeCB);
38556 <Type type="void"/>
38558 <Argument name="watchId">
38561 An identifier of the subscription returned by addMessagesChangeListener, addConversationsChangeListener or
38562 addFoldersChangeListener methods.
38565 <Type type="long"/>
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.
38586 <Interface name="MessageArraySuccessCallback" id="::Messaging::MessageArraySuccessCallback">
38587 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageArraySuccessCallback {
38589 void onsuccess(<ref>Message</ref>[] messages);
38593 findMessages specific success callback.
38597 This callback interface specifies a success callback function,
38598 taking a list of messages that satisfy the filtering criteria as the input argument.
38599 It is used in the findMessages asynchronous operation.
38606 <ExtendedAttributeList>
38607 <ExtendedAttribute name="Callback" value="FunctionOnly">
38608 <webidl>Callback</webidl>
38609 </ExtendedAttribute>
38610 <ExtendedAttribute name="NoInterfaceObject">
38611 <webidl> NoInterfaceObject</webidl>
38612 </ExtendedAttribute>
38613 </ExtendedAttributeList>
38614 <Operation name="onsuccess" id="::Messaging::MessageArraySuccessCallback::onsuccess">
38615 <webidl> void onsuccess(<ref>Message</ref>[] messages);</webidl>
38618 Method invoked when an asynchronous query completes successfully.
38624 <Type type="void"/>
38626 <Argument name="messages">
38629 Array of messages that satisfy the query.
38632 <Type type="array">
38633 <Type name="Message"/>
38639 <Interface name="MessageConversationArraySuccessCallback" id="::Messaging::MessageConversationArraySuccessCallback">
38640 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageConversationArraySuccessCallback {
38642 void onsuccess(<ref>MessageConversation</ref>[] conversations);
38646 findConversations specific success callback.
38650 This callback interface specifies a success callback function,
38651 taking a list of conversations that satisfy the filtering criteria as the input argument.
38652 It is used in the findConversations asynchronous operation.
38659 <ExtendedAttributeList>
38660 <ExtendedAttribute name="Callback" value="FunctionOnly">
38661 <webidl>Callback</webidl>
38662 </ExtendedAttribute>
38663 <ExtendedAttribute name="NoInterfaceObject">
38664 <webidl> NoInterfaceObject</webidl>
38665 </ExtendedAttribute>
38666 </ExtendedAttributeList>
38667 <Operation name="onsuccess" id="::Messaging::MessageConversationArraySuccessCallback::onsuccess">
38668 <webidl> void onsuccess(<ref>MessageConversation</ref>[] conversations);</webidl>
38671 Method invoked when an asynchronous query completes successfully.
38677 <Type type="void"/>
38679 <Argument name="conversations">
38682 Array of conversations that satisfy the query.
38685 <Type type="array">
38686 <Type name="MessageConversation"/>
38692 <Interface name="MessageFolderArraySuccessCallback" id="::Messaging::MessageFolderArraySuccessCallback">
38693 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface MessageFolderArraySuccessCallback {
38695 void onsuccess(<ref>MessageFolder</ref>[] folders);
38699 findFolders specific success callback.
38703 This callback interface specifies a success callback function,
38704 taking a list of folders that satisfy the filtering criteria as the input argument.
38705 It is used in the findFolders asynchronous operation.
38712 <ExtendedAttributeList>
38713 <ExtendedAttribute name="Callback" value="FunctionOnly">
38714 <webidl>Callback</webidl>
38715 </ExtendedAttribute>
38716 <ExtendedAttribute name="NoInterfaceObject">
38717 <webidl> NoInterfaceObject</webidl>
38718 </ExtendedAttribute>
38719 </ExtendedAttributeList>
38720 <Operation name="onsuccess" id="::Messaging::MessageFolderArraySuccessCallback::onsuccess">
38721 <webidl> void onsuccess(<ref>MessageFolder</ref>[] folders);</webidl>
38724 Method invoked when an asynchronous query completes successfully.
38730 <Type type="void"/>
38732 <Argument name="folders">
38735 Array of folders that satisfy the query.
38738 <Type type="array">
38739 <Type name="MessageFolder"/>
38745 <Interface name="MessagesChangeCallback" id="::Messaging::MessagesChangeCallback">
38746 <webidl> [Callback, NoInterfaceObject] interface MessagesChangeCallback {
38748 void messagesadded(<ref>Message</ref>[] addedMessages);
38750 void messagesupdated(<ref>Message</ref>[] updatedMessages);
38752 void messagesremoved(<ref>Message</ref>[] removedMessages);
38756 watchMessagesChanges callback.
38760 This callback interface specifies a callback as a set of functions that will be
38761 invoked when messages from MessageStorage change. Each function takes a list of messages as the input argument.
38768 <ExtendedAttributeList>
38769 <ExtendedAttribute name="Callback">
38770 <webidl>Callback</webidl>
38771 </ExtendedAttribute>
38772 <ExtendedAttribute name="NoInterfaceObject">
38773 <webidl> NoInterfaceObject</webidl>
38774 </ExtendedAttribute>
38775 </ExtendedAttributeList>
38776 <Operation name="messagesadded" id="::Messaging::MessagesChangeCallback::messagesadded">
38777 <webidl> void messagesadded(<ref>Message</ref>[] addedMessages);</webidl>
38780 Method invoked when messages are added to the MessageStorage.
38786 <Type type="void"/>
38788 <Argument name="addedMessages">
38791 Array of added messages.
38794 <Type type="array">
38795 <Type name="Message"/>
38800 <Operation name="messagesupdated" id="::Messaging::MessagesChangeCallback::messagesupdated">
38801 <webidl> void messagesupdated(<ref>Message</ref>[] updatedMessages);</webidl>
38804 Method invoked when messages are updated in MessageStorage.
38810 <Type type="void"/>
38812 <Argument name="updatedMessages">
38815 Array of updated messages.
38818 <Type type="array">
38819 <Type name="Message"/>
38824 <Operation name="messagesremoved" id="::Messaging::MessagesChangeCallback::messagesremoved">
38825 <webidl> void messagesremoved(<ref>Message</ref>[] removedMessages);</webidl>
38828 Method invoked when messages are removed from MessageStorage.
38834 <Type type="void"/>
38836 <Argument name="removedMessages">
38839 Array of removed messages. It contains only MessageId attribute.
38842 <Type type="array">
38843 <Type name="Message"/>
38849 <Interface name="MessageConversationsChangeCallback" id="::Messaging::MessageConversationsChangeCallback">
38850 <webidl> [Callback, NoInterfaceObject] interface MessageConversationsChangeCallback {
38852 void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);
38854 void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);
38856 void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);
38860 watchConversationsChanges callback.
38864 This callback interface specifies a callback as a set of functions that will be
38865 invoked when conversations from MessageStorage change. Each function takes a list of conversations as the input argument.
38872 <ExtendedAttributeList>
38873 <ExtendedAttribute name="Callback">
38874 <webidl>Callback</webidl>
38875 </ExtendedAttribute>
38876 <ExtendedAttribute name="NoInterfaceObject">
38877 <webidl> NoInterfaceObject</webidl>
38878 </ExtendedAttribute>
38879 </ExtendedAttributeList>
38880 <Operation name="conversationsadded" id="::Messaging::MessageConversationsChangeCallback::conversationsadded">
38881 <webidl> void conversationsadded(<ref>MessageConversation</ref>[] addedConversations);</webidl>
38884 Method invoked when conversations are added to MessageStorage.
38890 <Type type="void"/>
38892 <Argument name="addedConversations">
38895 Array of added conversations.
38898 <Type type="array">
38899 <Type name="MessageConversation"/>
38904 <Operation name="conversationsupdated" id="::Messaging::MessageConversationsChangeCallback::conversationsupdated">
38905 <webidl> void conversationsupdated(<ref>MessageConversation</ref>[] updatedConversations);</webidl>
38908 Method invoked when conversations are updated in MessageStorage.
38914 <Type type="void"/>
38916 <Argument name="updatedConversations">
38919 Array of updated conversations.
38922 <Type type="array">
38923 <Type name="MessageConversation"/>
38928 <Operation name="conversationsremoved" id="::Messaging::MessageConversationsChangeCallback::conversationsremoved">
38929 <webidl> void conversationsremoved(<ref>MessageConversation</ref>[] removedConversations);</webidl>
38932 Method invoked when conversations are removed from MessageStorage.
38938 <Type type="void"/>
38940 <Argument name="removedConversations">
38943 Array of removed conversations. It contains only MessageConvId attribute.
38946 <Type type="array">
38947 <Type name="MessageConversation"/>
38953 <Interface name="MessageFoldersChangeCallback" id="::Messaging::MessageFoldersChangeCallback">
38954 <webidl> [Callback, NoInterfaceObject] interface MessageFoldersChangeCallback {
38956 void foldersadded(<ref>MessageFolder</ref>[] addedFolders);
38958 void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);
38960 void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);
38964 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.
38970 <ExtendedAttributeList>
38971 <ExtendedAttribute name="Callback">
38972 <webidl>Callback</webidl>
38973 </ExtendedAttribute>
38974 <ExtendedAttribute name="NoInterfaceObject">
38975 <webidl> NoInterfaceObject</webidl>
38976 </ExtendedAttribute>
38977 </ExtendedAttributeList>
38978 <Operation name="foldersadded" id="::Messaging::MessageFoldersChangeCallback::foldersadded">
38979 <webidl> void foldersadded(<ref>MessageFolder</ref>[] addedFolders);</webidl>
38982 Called when folders are added to <em>MessageStorage</em>.
38988 <Type type="void"/>
38990 <Argument name="addedFolders">
38993 An array of added folders.
38996 <Type type="array">
38997 <Type name="MessageFolder"/>
39002 <Operation name="foldersupdated" id="::Messaging::MessageFoldersChangeCallback::foldersupdated">
39003 <webidl> void foldersupdated(<ref>MessageFolder</ref>[] updatedFolders);</webidl>
39006 Called when folders are updated in <em>MessageStorage</em>.
39012 <Type type="void"/>
39014 <Argument name="updatedFolders">
39017 An array of updated folders.
39020 <Type type="array">
39021 <Type name="MessageFolder"/>
39026 <Operation name="foldersremoved" id="::Messaging::MessageFoldersChangeCallback::foldersremoved">
39027 <webidl> void foldersremoved(<ref>MessageFolder</ref>[] removedFolders);</webidl>
39030 Called when folders are removed from <em>MessageStorage</em>.
39036 <Type type="void"/>
39038 <Argument name="removedFolders">
39041 Array of removed folders. It contains only MessageFolderId attribute.
39044 <Type type="array">
39045 <Type name="MessageFolder"/>
39051 <Interface name="MessageConversation" id="::Messaging::MessageConversation">
39052 <webidl> [NoInterfaceObject] interface MessageConversation {
39054 readonly attribute <ref>MessageConvId</ref> id;
39056 readonly attribute <ref>MessageServiceTag</ref> type;
39058 readonly attribute Date timestamp;
39060 readonly attribute unsigned long messageCount;
39062 readonly attribute unsigned long unreadMessages;
39064 readonly attribute DOMString preview;
39066 readonly attribute DOMString subject;
39068 readonly attribute boolean isRead;
39070 readonly attribute DOMString from;
39072 readonly attribute DOMString[] to;
39074 readonly attribute DOMString[] cc;
39076 readonly attribute DOMString[] bcc;
39078 readonly attribute <ref>MessageId</ref> lastMessageId;
39082 This interface defines the message conversation (also known as the thread of messages).
39086 This interface allows a web application to get the set of properties linked to a conversation.
39087 This interface provides only read-only attributes.
39094 <ExtendedAttributeList>
39095 <ExtendedAttribute name="NoInterfaceObject">
39096 <webidl>NoInterfaceObject</webidl>
39097 </ExtendedAttribute>
39098 </ExtendedAttributeList>
39099 <Attribute readonly="readonly" name="id" id="::Messaging::MessageConversation::id">
39100 <webidl> readonly attribute <ref>MessageConvId</ref> id;</webidl>
39103 The conversation identifier.
39107 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39114 <Type name="MessageConvId"/>
39116 <Attribute readonly="readonly" name="type" id="::Messaging::MessageConversation::type">
39117 <webidl> readonly attribute <ref>MessageServiceTag</ref> type;</webidl>
39120 The type of a given conversation.
39126 <Type name="MessageServiceTag"/>
39128 <Attribute readonly="readonly" name="timestamp" id="::Messaging::MessageConversation::timestamp">
39129 <webidl> readonly attribute Date timestamp;</webidl>
39132 The timestamp of the latest message in a conversation.
39136 This property is set up by the device or the Web runtime environment.
39143 <Type type="Date"/>
39145 <Attribute readonly="readonly" name="messageCount" id="::Messaging::MessageConversation::messageCount">
39146 <webidl> readonly attribute unsigned long messageCount;</webidl>
39149 The count of messages in a conversation.
39155 <Type type="unsigned long"/>
39157 <Attribute readonly="readonly" name="unreadMessages" id="::Messaging::MessageConversation::unreadMessages">
39158 <webidl> readonly attribute unsigned long unreadMessages;</webidl>
39161 The count of unread messages in a conversation.
39167 <Type type="unsigned long"/>
39169 <Attribute readonly="readonly" name="preview" id="::Messaging::MessageConversation::preview">
39170 <webidl> readonly attribute DOMString preview;</webidl>
39173 A preview of the latest message in a conversation.
39179 <Type type="DOMString"/>
39181 <Attribute readonly="readonly" name="subject" id="::Messaging::MessageConversation::subject">
39182 <webidl> readonly attribute DOMString subject;</webidl>
39185 The subject of a conversation (applicable for group chats, MMS, email).
39191 <Type type="DOMString"/>
39193 <Attribute readonly="readonly" name="isRead" id="::Messaging::MessageConversation::isRead">
39194 <webidl> readonly attribute boolean isRead;</webidl>
39197 An attribute to indicate whether the latest message in a conversation has been read or not.
39201 This property is set to <var>true</var> if the message has been read, else it is set to <var>false</var>.
39208 <Type type="boolean"/>
39210 <Attribute readonly="readonly" name="from" id="::Messaging::MessageConversation::from">
39211 <webidl> readonly attribute DOMString from;</webidl>
39214 The source address (or source phone number) of the latest message in the conversation.
39218 This property is set up by the device or the Web runtime environment.
39225 <Type type="DOMString"/>
39227 <Attribute readonly="readonly" name="to" id="::Messaging::MessageConversation::to">
39228 <webidl> readonly attribute DOMString[] to;</webidl>
39231 The destination of the latest message in a conversation.
39237 <Type type="array">
39238 <Type type="DOMString"/>
39241 <Attribute readonly="readonly" name="cc" id="::Messaging::MessageConversation::cc">
39242 <webidl> readonly attribute DOMString[] cc;</webidl>
39245 The carbon copy (cc) address of the latest message in a conversation.
39249 This property is used only for email.
39256 <Type type="array">
39257 <Type type="DOMString"/>
39260 <Attribute readonly="readonly" name="bcc" id="::Messaging::MessageConversation::bcc">
39261 <webidl> readonly attribute DOMString[] bcc;</webidl>
39264 The blind carbon copy (bcc) address of the latest message in a conversation.
39268 This property is used only for email.
39275 <Type type="array">
39276 <Type type="DOMString"/>
39279 <Attribute readonly="readonly" name="lastMessageId" id="::Messaging::MessageConversation::lastMessageId">
39280 <webidl> readonly attribute <ref>MessageId</ref> lastMessageId;</webidl>
39283 The identifier of a latest message in a conversation.
39287 This property is set up by the device or the Web runtime environment.
39294 <Type name="MessageId"/>
39297 <Interface name="MessageFolder" id="::Messaging::MessageFolder">
39298 <webidl> [NoInterfaceObject] interface MessageFolder {
39300 readonly attribute <ref>MessageFolderId</ref> id;
39302 readonly attribute <ref>MessageFolderId</ref> parentId;
39304 readonly attribute DOMString serviceId;
39306 readonly attribute <ref>MessageServiceTag</ref> contentType;
39308 attribute DOMString name setraises(<ref>WebAPIException</ref>);
39310 readonly attribute DOMString path;
39312 readonly attribute DOMString type;
39314 attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);
39318 This interface defines the email folder.
39322 This interface allows a web application to get the set of properties that are linked to an email folder.
39325 The concept of folders is present in several email protocols, such as IMAP, Mail For Exchange.
39328 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.
39335 <ExtendedAttributeList>
39336 <ExtendedAttribute name="NoInterfaceObject">
39337 <webidl>NoInterfaceObject</webidl>
39338 </ExtendedAttribute>
39339 </ExtendedAttributeList>
39340 <Attribute readonly="readonly" name="id" id="::Messaging::MessageFolder::id">
39341 <webidl> readonly attribute <ref>MessageFolderId</ref> id;</webidl>
39344 The folder identifier.
39345 The ID is locally unique and persistent property, assigned by the device or the Web runtime (WRT).
39351 <Type name="MessageFolderId"/>
39353 <Attribute readonly="readonly" name="parentId" id="::Messaging::MessageFolder::parentId">
39354 <webidl> readonly attribute <ref>MessageFolderId</ref> parentId;</webidl>
39357 The identifier for the parent folder of a specified folder.
39361 If this folder is a root folder, the parent folder ID is <var>null</var>.
39368 <Type name="MessageFolderId"/>
39370 <Attribute readonly="readonly" name="serviceId" id="::Messaging::MessageFolder::serviceId">
39371 <webidl> readonly attribute DOMString serviceId;</webidl>
39374 The identifier of the service to which a specified folder belongs.
39380 <Type type="DOMString"/>
39382 <Attribute readonly="readonly" name="contentType" id="::Messaging::MessageFolder::contentType">
39383 <webidl> readonly attribute <ref>MessageServiceTag</ref> contentType;</webidl>
39386 The type of the messages contained within a folder.
39392 <Type name="MessageServiceTag"/>
39394 <Attribute name="name" id="::Messaging::MessageFolder::name">
39395 <webidl> attribute DOMString name setraises(<ref>WebAPIException</ref>);</webidl>
39398 The visible name of a folder.
39402 Can be modified. By default, it contains the folder name from the server.
39405 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.
39412 <Type type="DOMString"/>
39414 <RaiseException name="WebAPIException"/>
39417 <Attribute readonly="readonly" name="path" id="::Messaging::MessageFolder::path">
39418 <webidl> readonly attribute DOMString path;</webidl>
39421 The whole path of a remote folder on the server.
39425 If the current Messaging service does not support remote folders on the server,
39426 this attribute will be empty.
39433 <Type type="DOMString"/>
39435 <Attribute readonly="readonly" name="type" id="::Messaging::MessageFolder::type">
39436 <webidl> readonly attribute DOMString type;</webidl>
39439 The standard type of a folder.
39443 It can be one of the following values:
39456 If this folder is not a standard folder, an empty value must be returned.
39459 This property is unique for each type within one Messaging service.
39466 <Type type="DOMString"/>
39468 <Attribute name="synchronizable" id="::Messaging::MessageFolder::synchronizable">
39469 <webidl> attribute boolean synchronizable setraises(<ref>WebAPIException</ref>);</webidl>
39472 An attribute to show whether this folder should be synchronized or not.
39476 This attribute affects the behavior of the MessageService.sync() method.
39483 <Type type="boolean"/>
39485 <RaiseException name="WebAPIException"/>
39490 <Module name="NetworkBearerSelection" id="::NetworkBearerSelection">
39491 <webidl>module NetworkBearerSelection {
39493 enum NetworkType { "CELLULAR", "UNKNOWN" };
39495 [NoInterfaceObject] interface NetworkBearerSelectionObject {
39496 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39498 <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;
39500 [NoInterfaceObject] interface NetworkBearerSelection {
39502 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39503 DOMString domainName,
39504 <ref>NetworkSuccessCallback</ref> successCallback,
39505 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39507 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39508 DOMString domainName,
39509 <ref>SuccessCallback</ref> successCallback,
39510 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39513 [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39516 void ondisconnected();
39521 This specification defines interfaces and methods providing Web applications to access the devices.
39525 This API provides interfaces and methods for users to set network bearer selection.
39531 <def-api-feature identifier="http://tizen.org/feature/network.telephony">
39536 To guarantee this application running on a device with telephony feature, define below in the config file:
39542 <Enum name="NetworkType" id="::NetworkBearerSelection::NetworkType">
39543 <webidl> enum NetworkType { "CELLULAR", "UNKNOWN" };</webidl>
39546 An enumerator that defines the type of a network.
39552 <EnumValue stringvalue="CELLULAR">
39553 <webidl> "CELLULAR</webidl>
39555 <EnumValue stringvalue="UNKNOWN">
39556 <webidl> "UNKNOWN</webidl>
39559 <Interface name="NetworkBearerSelectionObject" id="::NetworkBearerSelection::NetworkBearerSelectionObject">
39560 <webidl> [NoInterfaceObject] interface NetworkBearerSelectionObject {
39561 readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;
39565 Defines what is instantiated the Tizen object from the Tizen Platform.
39569 There is a <em>tizen.networkbearerselection </em>object that allows accessing the functionality of the Networkbearerselection API.
39576 <ExtendedAttributeList>
39577 <ExtendedAttribute name="NoInterfaceObject">
39578 <webidl>NoInterfaceObject</webidl>
39579 </ExtendedAttribute>
39580 </ExtendedAttributeList>
39581 <Attribute readonly="readonly" name="networkbearerselection" id="::NetworkBearerSelection::NetworkBearerSelectionObject::networkbearerselection">
39582 <webidl> readonly attribute <ref>NetworkBearerSelection</ref> networkbearerselection;</webidl>
39583 <Type name="NetworkBearerSelection"/>
39586 <Implements name1="Tizen" name2="NetworkBearerSelectionObject">
39587 <webidl> <ref>Tizen</ref> implements <ref>NetworkBearerSelectionObject</ref>;</webidl>
39589 <Interface name="NetworkBearerSelection" id="::NetworkBearerSelection::NetworkBearerSelection">
39590 <webidl> [NoInterfaceObject] interface NetworkBearerSelection {
39592 void requestRouteToHost(<ref>NetworkType</ref> networkType,
39593 DOMString domainName,
39594 <ref>NetworkSuccessCallback</ref> successCallback,
39595 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39597 void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39598 DOMString domainName,
39599 <ref>SuccessCallback</ref> successCallback,
39600 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39604 This entry interface provides methods to query the network bearer selection.
39608 This API offers methods for network bearer selection.
39615 <ExtendedAttributeList>
39616 <ExtendedAttribute name="NoInterfaceObject">
39617 <webidl>NoInterfaceObject</webidl>
39618 </ExtendedAttribute>
39619 </ExtendedAttributeList>
39620 <Operation name="requestRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::requestRouteToHost">
39621 <webidl> void requestRouteToHost(<ref>NetworkType</ref> networkType,
39622 DOMString domainName,
39623 <ref>NetworkSuccessCallback</ref> successCallback,
39624 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39627 Requests a specific network connection.
39631 The function must asynchronously acquire success or fail.
39634 When called, it starts a request process defined with these set of steps:
39638 1. Open "networkType" network connection. </li>
39640 2. Resolve "domainName" to IP. </li>
39642 3. Change the routing path bound to domainName's IP to use the specific network type. </li>
39644 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>
39650 <Code> var statuscb = {
39651 onsuccess: function() { console.log("onsuccess func is called"); },
39652 ondisconnected: function() { console.log("ondisconnected func is called"); }
39654 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39655 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.tizen.org", statuscb, ecb);
39662 http://tizen.org/privilege/networkbearerselection
39665 <Type type="void"/>
39667 <Argument name="networkType">
39673 <Type name="NetworkType"/>
39675 <Argument name="domainName">
39681 <Type type="DOMString"/>
39683 <Argument name="successCallback">
39686 To be invoked if data network connection is connected or not.
39689 <Type name="NetworkSuccessCallback"/>
39691 <Argument optional="optional" name="errorCallback">
39694 To be invoked if the request is failed.
39697 <Type name="ErrorCallback" nullable="nullable"/>
39701 <RaiseException name="WebAPIException">
39704 with error type NotSupportedError, if this feature is not supported.
39707 with error type SecurityError, if the application does not have the privilege to call this method.
39710 with error type UnknownError, if any other error occurs.
39716 <Operation name="releaseRouteToHost" id="::NetworkBearerSelection::NetworkBearerSelection::releaseRouteToHost">
39717 <webidl> void releaseRouteToHost(<ref>NetworkType</ref> networkType,
39718 DOMString domainName,
39719 <ref>SuccessCallback</ref> successCallback,
39720 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
39723 Releases a specific network connection.
39727 The function must asynchronously acquire success or fail.
39730 When called, it closes a network connection.
39736 <Code> function scb() { console.log("success callback is called"); }
39737 function ecb(e) { console.log("error callback is called : " + e.message + " : " + e.code); }
39739 onsuccess: function() {
39740 console.log("onsuccess func is called");
39741 tizen.networkbearerselection.releaseRouteToHost("CELLULAR", "www.google.com", scb, ecb);
39743 ondisconnected: function() { console.log("ondisconnected func is called"); }
39745 tizen.networkbearerselection.requestRouteToHost("CELLULAR", "www.google.com", statuscb, ecb);
39752 http://tizen.org/privilege/networkbearerselection
39755 <Type type="void"/>
39757 <Argument name="networkType">
39763 <Type name="NetworkType"/>
39765 <Argument name="domainName">
39771 <Type type="DOMString"/>
39773 <Argument name="successCallback">
39776 To be invoked if data network connection is released.
39779 <Type name="SuccessCallback"/>
39781 <Argument optional="optional" name="errorCallback">
39784 To be invoked if the release is failed.
39787 <Type name="ErrorCallback" nullable="nullable"/>
39791 <RaiseException name="WebAPIException">
39794 with error type NotSupportedError, if this feature is not supported.
39797 with error type SecurityError, if the application does not have the privilege to call this method.
39800 with error type UnknownError, if any other error occurs.
39807 <Interface name="NetworkSuccessCallback" id="::NetworkBearerSelection::NetworkSuccessCallback">
39808 <webidl> [Callback, NoInterfaceObject] interface NetworkSuccessCallback {
39811 void ondisconnected();
39815 This interface provides a success callback specific to NetworkBearerSelection.
39819 It is used in asynchronous operations with requestRouteToHost().
39826 <ExtendedAttributeList>
39827 <ExtendedAttribute name="Callback">
39828 <webidl>Callback</webidl>
39829 </ExtendedAttribute>
39830 <ExtendedAttribute name="NoInterfaceObject">
39831 <webidl> NoInterfaceObject</webidl>
39832 </ExtendedAttribute>
39833 </ExtendedAttributeList>
39834 <Operation name="onsuccess" id="::NetworkBearerSelection::NetworkSuccessCallback::onsuccess">
39835 <webidl> void onsuccess();</webidl>
39838 Called when a network is connected successfully.
39844 <Type type="void"/>
39847 <Operation name="ondisconnected" id="::NetworkBearerSelection::NetworkSuccessCallback::ondisconnected">
39848 <webidl> void ondisconnected();</webidl>
39851 Called when a network is disconnected.
39857 <Type type="void"/>
39862 <Module name="NFC" id="::NFC">
39863 <webidl>module NFC {
39864 enum NDEFRecordTextEncoding { "UTF8", "UTF16" };
39866 enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
39867 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
39868 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
39869 "UNKNOWN_TARGET" };
39871 [NoInterfaceObject] interface NFCManagerObject {
39872 readonly attribute <ref>NFCManager</ref> nfc;
39874 <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;
39876 [NoInterfaceObject] interface NFCManager {
39877 const short NFC_RECORD_TNF_EMPTY = 0;
39878 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
39879 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
39880 const short NFC_RECORD_TNF_URI = 3;
39881 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
39882 const short NFC_RECORD_TNF_UNKNOWN = 5;
39883 const short NFC_RECORD_TNF_UNCHANGED = 6;
39885 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
39887 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
39891 [NoInterfaceObject] interface NFCAdapter {
39892 readonly attribute boolean powered ;
39895 void setPowered(boolean state,
39896 optional <ref>SuccessCallback</ref>? successCallback,
39897 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39900 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
39901 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
39903 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
39905 void unsetTagListener() raises(<ref>WebAPIException</ref>);
39907 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
39909 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
39914 [NoInterfaceObject] interface NFCTag {
39915 readonly attribute <ref>NFCTagType</ref> type;
39917 readonly attribute boolean isSupportedNDEF;
39919 readonly attribute long ndefSize;
39921 readonly attribute object properties;
39923 readonly attribute boolean isConnected;
39926 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
39927 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39929 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
39930 optional <ref>SuccessCallback</ref>? successCallback,
39931 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39933 void transceive(byte[] data,
39934 <ref>ByteArraySuccessCallback</ref> dataCallback,
39935 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39939 [NoInterfaceObject] interface NFCPeer {
39940 readonly attribute boolean isConnected;
39942 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
39944 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
39946 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
39947 optional <ref>SuccessCallback</ref>? successCallback,
39948 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
39953 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
39954 Constructor(byte[] rawData)]
39955 interface NDEFMessage {
39956 readonly attribute long recordCount;
39958 attribute <ref>NDEFRecord</ref>[] records;
39960 byte[] toByte() raises(<ref>WebAPIException</ref>);
39963 [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
39964 Constructor(byte[] raw_data)]
39965 interface NDEFRecord {
39966 readonly attribute short tnf;
39968 readonly attribute byte[] type;
39970 readonly attribute byte[] id;
39972 readonly attribute byte[] payload;
39975 [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
39976 interface NDEFRecordText : <ref>NDEFRecord</ref> {
39977 readonly attribute DOMString text;
39979 readonly attribute DOMString languageCode;
39981 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
39984 [Constructor(DOMString uri)]
39985 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
39986 readonly attribute DOMString uri;
39988 [Constructor(DOMString mimeType, byte[] data)]
39989 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
39990 readonly attribute DOMString mimeType;
39994 [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
39995 void onattach(<ref>NFCTag</ref> nfcTag);
39999 [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
40000 void onattach(<ref>NFCPeer</ref> nfcPeer);
40004 [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
40005 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
40008 [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
40009 void onsuccess(byte[] data);
40015 This interface specifies a protocol for simple wireless interconnection of
40016 closely coupled devices operating at 13.56 MHz using Near Field Communication (NFC),
40017 which is an international standard (ISO/IEC 18092).
40018 To know more, see <a href="http://www.nfc-forum.org/specs/spec_list/">Technical Specifications</a>.
40022 There are three groups of application scenarios for NFC:
40026 Exchanging some digital information or data by holding a device close to a wireless tag. </li>
40028 Exchanging some information or data between two devices by holding them close to each other. </li>
40030 Making payments by holding mobile phones close to point of sales terminals instead of swiping smart cards. </li>
40033 For more information on the NFC features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/nfc.htm">NFC Guide</a>.
40039 <def-api-feature identifier="http://tizen.org/feature/network.nfc">
40043 To guarantee this application running on a device with NFC feature, define below in the config file:
40049 <Enum name="NDEFRecordTextEncoding" id="::NFC::NDEFRecordTextEncoding">
40050 <webidl> enum NDEFRecordTextEncoding { "UTF8", "UTF16" };</webidl>
40053 An enumerator that defines an encoding format for an NDEF record text.
40059 <EnumValue stringvalue="UTF8">
40060 <webidl> "UTF8</webidl>
40062 <EnumValue stringvalue="UTF16">
40063 <webidl> "UTF16</webidl>
40066 <Enum name="NFCTagType" id="::NFC::NFCTagType">
40067 <webidl> enum NFCTagType { "GENERIC_TARGET", "ISO14443_A", "ISO14443_4A", "ISO14443_3A",
40068 "MIFARE_MINI", "MIFARE_1K", "MIFARE_4K", "MIFARE_ULTRA", "MIFARE_DESFIRE",
40069 "ISO14443_B", "ISO14443_4B", "ISO14443_BPRIME", "FELICA", "JEWEL", "ISO15693",
40070 "UNKNOWN_TARGET" };</webidl>
40073 An enumerator that defines the type of NFC tag.
40077 The following values are supported:
40081 GENERIC_TARGET </li>
40097 MIFARE_DESFIRE </li>
40103 ISO14443_BPRIME </li>
40111 UNKNOWN_TARGET </li>
40118 <EnumValue stringvalue="GENERIC_TARGET">
40119 <webidl> "GENERIC_TARGET</webidl>
40121 <EnumValue stringvalue="ISO14443_A">
40122 <webidl> "ISO14443_A</webidl>
40124 <EnumValue stringvalue="ISO14443_4A">
40125 <webidl> "ISO14443_4A</webidl>
40127 <EnumValue stringvalue="ISO14443_3A">
40128 <webidl> "ISO14443_3A</webidl>
40130 <EnumValue stringvalue="MIFARE_MINI">
40131 <webidl> "MIFARE_MINI</webidl>
40133 <EnumValue stringvalue="MIFARE_1K">
40134 <webidl> "MIFARE_1K</webidl>
40136 <EnumValue stringvalue="MIFARE_4K">
40137 <webidl> "MIFARE_4K</webidl>
40139 <EnumValue stringvalue="MIFARE_ULTRA">
40140 <webidl> "MIFARE_ULTRA</webidl>
40142 <EnumValue stringvalue="MIFARE_DESFIRE">
40143 <webidl> "MIFARE_DESFIRE</webidl>
40145 <EnumValue stringvalue="ISO14443_B">
40146 <webidl> "ISO14443_B</webidl>
40148 <EnumValue stringvalue="ISO14443_4B">
40149 <webidl> "ISO14443_4B</webidl>
40151 <EnumValue stringvalue="ISO14443_BPRIME">
40152 <webidl> "ISO14443_BPRIME</webidl>
40154 <EnumValue stringvalue="FELICA">
40155 <webidl> "FELICA</webidl>
40157 <EnumValue stringvalue="JEWEL">
40158 <webidl> "JEWEL</webidl>
40160 <EnumValue stringvalue="ISO15693">
40161 <webidl> "ISO15693</webidl>
40163 <EnumValue stringvalue="UNKNOWN_TARGET">
40164 <webidl> "UNKNOWN_TARGET</webidl>
40167 <Interface name="NFCManagerObject" id="::NFC::NFCManagerObject">
40168 <webidl> [NoInterfaceObject] interface NFCManagerObject {
40169 readonly attribute <ref>NFCManager</ref> nfc;
40173 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
40174 There will be a <em>tizen.nfc </em>object that allows access to the functionality of the NFC API.
40180 <ExtendedAttributeList>
40181 <ExtendedAttribute name="NoInterfaceObject">
40182 <webidl>NoInterfaceObject</webidl>
40183 </ExtendedAttribute>
40184 </ExtendedAttributeList>
40185 <Attribute readonly="readonly" name="nfc" id="::NFC::NFCManagerObject::nfc">
40186 <webidl> readonly attribute <ref>NFCManager</ref> nfc;</webidl>
40187 <Type name="NFCManager"/>
40190 <Implements name1="Tizen" name2="NFCManagerObject">
40191 <webidl> <ref>Tizen</ref> implements <ref>NFCManagerObject</ref>;</webidl>
40193 <Interface name="NFCManager" id="::NFC::NFCManager">
40194 <webidl> [NoInterfaceObject] interface NFCManager {
40195 const short NFC_RECORD_TNF_EMPTY = 0;
40196 const short NFC_RECORD_TNF_WELL_KNOWN = 1;
40197 const short NFC_RECORD_TNF_MIME_MEDIA = 2;
40198 const short NFC_RECORD_TNF_URI = 3;
40199 const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;
40200 const short NFC_RECORD_TNF_UNKNOWN = 5;
40201 const short NFC_RECORD_TNF_UNCHANGED = 6;
40203 <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);
40205 void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);
40209 Accesses to the NFC tag/target.
40213 It provides access to the API functionalities through the tizen.nfc interface.
40220 <ExtendedAttributeList>
40221 <ExtendedAttribute name="NoInterfaceObject">
40222 <webidl>NoInterfaceObject</webidl>
40223 </ExtendedAttribute>
40224 </ExtendedAttributeList>
40225 <Const name="NFC_RECORD_TNF_EMPTY" value="0" id="::NFC::NFCManager::NFC_RECORD_TNF_EMPTY">
40226 <webidl> const short NFC_RECORD_TNF_EMPTY = 0;</webidl>
40229 A constant to indicate empty format of NDEF record's type field.
40235 <Type type="short"/>
40237 <Const name="NFC_RECORD_TNF_WELL_KNOWN" value="1" id="::NFC::NFCManager::NFC_RECORD_TNF_WELL_KNOWN">
40238 <webidl> const short NFC_RECORD_TNF_WELL_KNOWN = 1;</webidl>
40241 A constant to indicate Record Type Definition (RTD) format of NDEF record's type field.
40247 <Type type="short"/>
40249 <Const name="NFC_RECORD_TNF_MIME_MEDIA" value="2" id="::NFC::NFCManager::NFC_RECORD_TNF_MIME_MEDIA">
40250 <webidl> const short NFC_RECORD_TNF_MIME_MEDIA = 2;</webidl>
40253 A constant to indicate MIME media types format in RFC 2046 [RFC 2046] of NDEF record's type field.
40259 <Type type="short"/>
40261 <Const name="NFC_RECORD_TNF_URI" value="3" id="::NFC::NFCManager::NFC_RECORD_TNF_URI">
40262 <webidl> const short NFC_RECORD_TNF_URI = 3;</webidl>
40265 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.
40271 <Type type="short"/>
40273 <Const name="NFC_RECORD_TNF_EXTERNAL_RTD" value="4" id="::NFC::NFCManager::NFC_RECORD_TNF_EXTERNAL_RTD">
40274 <webidl> const short NFC_RECORD_TNF_EXTERNAL_RTD = 4;</webidl>
40277 A constant to indicate NFC forum external type [NFC RTD] format in RFC 2046 [RFC 2046] of NDEF record's type field.
40283 <Type type="short"/>
40285 <Const name="NFC_RECORD_TNF_UNKNOWN" value="5" id="::NFC::NFCManager::NFC_RECORD_TNF_UNKNOWN">
40286 <webidl> const short NFC_RECORD_TNF_UNKNOWN = 5;</webidl>
40289 A constant to indicate unknown type format in RFC 2046 [RFC 2046] of NDEF record's type field.
40295 <Type type="short"/>
40297 <Const name="NFC_RECORD_TNF_UNCHANGED" value="6" id="::NFC::NFCManager::NFC_RECORD_TNF_UNCHANGED">
40298 <webidl> const short NFC_RECORD_TNF_UNCHANGED = 6;</webidl>
40301 A constant to indicate whether the payload is an intermediate or final chunk of a chunked NDEF record.
40307 <Type type="short"/>
40309 <Operation name="getDefaultAdapter" id="::NFC::NFCManager::getDefaultAdapter">
40310 <webidl> <ref>NFCAdapter</ref> getDefaultAdapter() raises(<ref>WebAPIException</ref>);</webidl>
40313 Gets the default NFC adapter of the device.
40319 http://tizen.org/privilege/nfc.common
40325 var adapter = tizen.nfc.getDefaultAdapter() ;
40327 console.log (err.name +": " + err.message);
40331 <Type name="NFCAdapter">
40334 NFCAdapter The default NFCAdapter object.
40340 <RaiseException name="WebAPIException">
40343 with error type SecurityError, if the application does not have the privilege to call this method.
40346 with error type UnknownError in any other error case.
40352 <Operation name="setExclusiveMode" id="::NFC::NFCManager::setExclusiveMode">
40353 <webidl> void setExclusiveMode(boolean mode) raises(<ref>WebAPIException</ref>);</webidl>
40356 Gives priority to the current application for NFC operations over other applications when it is in the foreground.
40360 If the current application has the priority and is on the foreground, the system stops sending
40361 application control requests that are used to pick an application to handle a request about NFC.
40362 Such a request is usually sent, for example, when detecting an NFC tag or receiving an NDEF message
40363 from a connected NFC peer-to-peer target.
40366 When the current application moves to the background, it loses the priority.
40369 The exclusive mode can only be set when NFC is on. If NFC is off, the mode is ignored.
40376 http://tizen.org/privilege/nfc.common
40382 tizen.nfc.setExclusiveMode(true) ;
40384 console.log (err.name + ": " + err.message);
40388 <Type type="void"/>
40390 <Argument name="mode">
40393 The value of exclusive mode.
40396 <Type type="boolean"/>
40400 <RaiseException name="WebAPIException">
40403 with error type SecurityError, if the application does not have the privilege to call this method.
40406 with error type UnknownError in any other error case.
40413 <Interface name="NFCAdapter" id="::NFC::NFCAdapter">
40414 <webidl> [NoInterfaceObject] interface NFCAdapter {
40415 readonly attribute boolean powered ;
40418 void setPowered(boolean state,
40419 optional <ref>SuccessCallback</ref>? successCallback,
40420 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40423 void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40424 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);
40426 void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);
40428 void unsetTagListener() raises(<ref>WebAPIException</ref>);
40430 void unsetPeerListener() raises(<ref>WebAPIException</ref>);
40432 <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);
40437 This interface provides access to control the adapter by offering methods to control local NFC behaviors, such as turning on/off an adapter.
40443 <ExtendedAttributeList>
40444 <ExtendedAttribute name="NoInterfaceObject">
40445 <webidl>NoInterfaceObject</webidl>
40446 </ExtendedAttribute>
40447 </ExtendedAttributeList>
40448 <Attribute readonly="readonly" name="powered" id="::NFC::NFCAdapter::powered">
40449 <webidl> readonly attribute boolean powered ;</webidl>
40452 The state of the NFC adapter.
40458 <Type type="boolean"/>
40460 <Operation name="setPowered" id="::NFC::NFCAdapter::setPowered">
40461 <webidl> void setPowered(boolean state,
40462 optional <ref>SuccessCallback</ref>? successCallback,
40463 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40466 Sets the power of an NFC adapter to either a on state or a off state.
40470 The ErrorCallback is launched with these error types:
40474 ServiceNotAvailableError - If the NFC device is busy. </li>
40476 UnknownError - If any other error occurs. </li>
40483 http://tizen.org/privilege/nfc.admin
40488 <Code> var gNfcAdapter;
40489 var onPowerOn = function(){ // Called when NFC adapter is powered on
40491 console.log("Power on succeed");
40492 // Implement NFC communication routines ...
40493 gNfcAdapter.setPowered(
40494 false, // Disable NFC adapter
40495 function () {console.log("Power off succeed"); }, // Handle success
40496 function () {console.log("Power off failed"); }); // Handle failure
40498 console.log (err.name + ": " + err.message);
40502 gNfcAdapter = tizen.nfc.getDefaultAdapter();
40503 if (!gNfcAdapter.powered) {
40504 gNfcAdapter.setPowered(
40505 true, // Enable NFC adapter
40506 onPowerOn, // Handle succes
40507 function () {console.log("Power on failed")}); // Handle failure
40512 console.log (err.name + ": " + err.message);
40516 <Type type="void"/>
40518 <Argument name="state">
40521 The state of NFC adapter, <var>true</var> means on, <var>false</var> means off
40524 <Type type="boolean"/>
40526 <Argument optional="optional" name="successCallback">
40529 The method to call when NFC adapter is
40530 enabled or disabled successfully.
40533 <Type name="SuccessCallback" nullable="nullable"/>
40535 <Argument optional="optional" name="errorCallback">
40538 The method to call when an error occurs.
40541 <Type name="ErrorCallback" nullable="nullable"/>
40545 <RaiseException name="WebAPIException">
40548 with error type TypeMismatchError, if the input parameter
40549 is not compatible with the expected type for that parameter.
40552 with error type SecurityError, if this functionality is not allowed
40558 <Operation name="setTagListener" id="::NFC::NFCAdapter::setTagListener">
40559 <webidl> void setTagListener(<ref>NFCTagDetectCallback</ref> detectCallback,
40560 optional <ref>NFCTagType</ref>[]? tagFilter) raises(<ref>WebAPIException</ref>);</webidl>
40563 Registers a callback function to invoke when an NFC tag is detected.
40567 If the registration completes successfully, the detectCallback must be
40568 invoked when NFC tag is detected.
40571 If no tagFilter is passed, it shall consider the default tagFilter, that is to set all tag types.
40578 http://tizen.org/privilege/nfc.tag
40583 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40584 var onSuccessCB = {onattach : function(nfcTag) {
40585 console.log("NFC Tag's type is " + nfcTag.type);
40586 }, ondetach : function() {
40587 console.log("NFC Tag is detached");
40589 adapter.setTagListener(onSuccessCB);
40592 <Type type="void"/>
40594 <Argument name="detectCallback">
40597 The method to invoke when a NFC tag is successfully detected.
40600 <Type name="NFCTagDetectCallback"/>
40602 <Argument optional="optional" name="tagFilter">
40605 A filter to be used when specific NFC tag is detected.
40608 <Type type="array" nullable="nullable">
40609 <Type name="NFCTagType"/>
40614 <RaiseException name="WebAPIException">
40617 with error type TypeMismatchError, if the input parameter
40618 is not compatible with the expected type for that parameter.
40621 with error type SecurityError, if the application does not have the privilege to call this method.
40624 with error type ServiceNotAvailableError, if the NFC service is not available.
40627 with error type UnknownError in any other error case.
40633 <Operation name="setPeerListener" id="::NFC::NFCAdapter::setPeerListener">
40634 <webidl> void setPeerListener(<ref>NFCPeerDetectCallback</ref> detectCallback) raises(<ref>WebAPIException</ref>);</webidl>
40637 Registers a callback function to be invoked when NFC peer-to-peer target is detected.
40641 If the registration completes successfully, the detectCallback must be
40642 invoked when NFC peer-to-peer target is detected.
40649 http://tizen.org/privilege/nfc.p2p
40654 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40655 var onSuccessCB = {onattach : function(nfcPeer) {
40656 console.log("NFC Target is detected");
40657 }, ondetach : function() {
40658 console.log("NFC Target is detached");
40660 adapter.setPeerListener(onSuccessCB);
40663 <Type type="void"/>
40665 <Argument name="detectCallback">
40668 The method to invoke when a NFC peer-to-peer target is successfully detected.
40671 <Type name="NFCPeerDetectCallback"/>
40675 <RaiseException name="WebAPIException">
40678 with error type TypeMismatchError, if the input parameter
40679 is not compatible with the expected type for that parameter.
40682 with error type SecurityError, if the application does not have the privilege to call this method.
40685 with error type ServiceNotAvailableError, if the NFC service is not available.
40688 with error type UnknownError in any other error case.
40694 <Operation name="unsetTagListener" id="::NFC::NFCAdapter::unsetTagListener">
40695 <webidl> void unsetTagListener() raises(<ref>WebAPIException</ref>);</webidl>
40698 Unregisters the listener for detecting an NFC tag.
40704 http://tizen.org/privilege/nfc.tag
40709 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40712 var onSuccessCB = {onattach : function(nfcTag) {
40713 console.log("NFC Tag's type is " + nfcTag.type);
40714 }, ondetach : function() {
40715 console.log("NFC Tag is detached");
40718 // Unregister the listener
40719 function unsetListen() {
40720 adapter.unsetTagListener();
40723 // Registers to be notified when NFC tag is detected.
40724 adapter.setTagListener(onSuccessCB)
40727 <Type type="void"/>
40730 <RaiseException name="WebAPIException">
40733 with error type SecurityError, if the application does not have the privilege to call this method.
40736 with error type ServiceNotAvailableError, if the NFC service is not available.
40739 with error type UnknownError in any other error case.
40745 <Operation name="unsetPeerListener" id="::NFC::NFCAdapter::unsetPeerListener">
40746 <webidl> void unsetPeerListener() raises(<ref>WebAPIException</ref>);</webidl>
40749 Unregisters the listener for detecting an NFC peer-to-peer target.
40755 http://tizen.org/privilege/nfc.p2p
40760 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40762 // Receives an NFC peer.
40763 var onSuccessCB = {onattach : function(nfcPeer) {
40764 console.log("NFC Target is detected");
40765 }, ondetach : function() {
40766 console.log("NFC Target is detached");
40769 // Unregisters the listener.
40770 function unsetListen() {
40771 adapter.unsetPeerListener();
40774 // Registers to be notified when NFC peer-to-peer target is detected.
40775 adapter.setPeerListener(onSuccessCB)
40778 <Type type="void"/>
40781 <RaiseException name="WebAPIException">
40784 with error type SecurityError, if the application does not have the privilege to call this method.
40787 with error type ServiceNotAvailableError, if the NFC service is not available.
40790 with error type UnknownError in any other error case.
40796 <Operation name="getCachedMessage" id="::NFC::NFCAdapter::getCachedMessage">
40797 <webidl> <ref>NDEFMessage</ref>? getCachedMessage() raises(<ref>WebAPIException</ref>);</webidl>
40800 Gets the NDEF message cached when the tag is detected.
40804 If the operation completes successfully, the NDEF Message that was last read
40805 should be returned.
40812 http://tizen.org/privilege/nfc.common
40817 <Code> // Gets the cached message
40818 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
40821 <Type name="NDEFMessage" nullable="nullable">
40824 The NDEF Message that was last read.
40830 <RaiseException name="WebAPIException">
40833 with error type SecurityError, if the application does not have the privilege to call this method.
40836 with error type UnknownError in any other error case.
40843 <Interface name="NFCTag" id="::NFC::NFCTag">
40844 <webidl> [NoInterfaceObject] interface NFCTag {
40845 readonly attribute <ref>NFCTagType</ref> type;
40847 readonly attribute boolean isSupportedNDEF;
40849 readonly attribute long ndefSize;
40851 readonly attribute object properties;
40853 readonly attribute boolean isConnected;
40856 void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40857 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40859 void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
40860 optional <ref>SuccessCallback</ref>? successCallback,
40861 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40863 void transceive(byte[] data,
40864 <ref>ByteArraySuccessCallback</ref> dataCallback,
40865 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
40869 This interface provides accesses to the NFC tag.
40875 <ExtendedAttributeList>
40876 <ExtendedAttribute name="NoInterfaceObject">
40877 <webidl>NoInterfaceObject</webidl>
40878 </ExtendedAttribute>
40879 </ExtendedAttributeList>
40880 <Attribute readonly="readonly" name="type" id="::NFC::NFCTag::type">
40881 <webidl> readonly attribute <ref>NFCTagType</ref> type;</webidl>
40884 The type of the NFC tag.
40890 <Type name="NFCTagType"/>
40892 <Attribute readonly="readonly" name="isSupportedNDEF" id="::NFC::NFCTag::isSupportedNDEF">
40893 <webidl> readonly attribute boolean isSupportedNDEF;</webidl>
40896 An attribute to check if the NFC Tag supports NDEF format.
40902 <Type type="boolean"/>
40904 <Attribute readonly="readonly" name="ndefSize" id="::NFC::NFCTag::ndefSize">
40905 <webidl> readonly attribute long ndefSize;</webidl>
40908 The size of NDEF message stored in the tag.
40914 <Type type="long"/>
40916 <Attribute readonly="readonly" name="properties" id="::NFC::NFCTag::properties">
40917 <webidl> readonly attribute object properties;</webidl>
40920 The value is all tag information.
40924 It is pairs of key and value.
40925 The array's index is the pair's key and value is its value.
40928 <Code> var adapter = tizen.nfc.getDefaultAdapter();
40929 var onSuccessCB = {onattach : function(nfcTag) {
40930 console.log("NFC Tag's type is " + nfcTag.type);
40931 for(var i in nfcTag.properties) {
40932 console.log("key:" + i + " value:" + nfcTag.properties[i]);
40934 }, ondetach : function() {
40935 console.log("NFC Tag is detached");
40937 adapter.setTagListener(onSuccessCB);
40944 <Type type="object"/>
40946 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCTag::isConnected">
40947 <webidl> readonly attribute boolean isConnected;</webidl>
40950 The value is necessary to check if this tag is connected.
40956 <Type type="boolean"/>
40958 <Operation name="readNDEF" id="::NFC::NFCTag::readNDEF">
40959 <webidl> void readNDEF(<ref>NDEFMessageReadCallback</ref> readCallback,
40960 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
40963 Reads the NDEF data from the NFC tag.
40967 The ErrorCallback is launched with these error types:
40971 ServiceNotAvailableError - If the NFC service is not available. </li>
40973 UnknownError - If any other error occurs. </li>
40980 http://tizen.org/privilege/nfc.tag
40986 <Type type="void"/>
40988 <Argument name="readCallback">
40991 The method invoked in case of successfully reading the NDEF Data.
40994 <Type name="NDEFMessageReadCallback"/>
40996 <Argument optional="optional" name="errorCallback">
40999 The method invoked in case of any error during reading the NDEF Data.
41002 <Type name="ErrorCallback" nullable="nullable"/>
41006 <RaiseException name="WebAPIException">
41009 with error type TypeMismatchError, if the input parameter
41010 is not compatible with the expected type for that parameter.
41013 with error type SecurityError, if the application does not have the privilege to call this method.
41016 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41022 <Operation name="writeNDEF" id="::NFC::NFCTag::writeNDEF">
41023 <webidl> void writeNDEF(<ref>NDEFMessage</ref> ndefMessage,
41024 optional <ref>SuccessCallback</ref>? successCallback,
41025 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41028 Writes the NDEF data to the NFC tag.
41032 The ErrorCallback is launched with these error types:
41036 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41038 ServiceNotAvailableError: If the NFC service is not available. </li>
41040 UnknownError: In any other error case. </li>
41047 http://tizen.org/privilege/nfc.tag
41053 <Type type="void"/>
41055 <Argument name="ndefMessage">
41058 The NDEF message to write to NFC tag.
41061 <Type name="NDEFMessage"/>
41063 <Argument optional="optional" name="successCallback">
41066 The method invoked in case of successfully writing the NDEF Data.
41069 <Type name="SuccessCallback" nullable="nullable"/>
41071 <Argument optional="optional" name="errorCallback">
41074 The method invoked in case of any error during writing the NDEF Data.
41077 <Type name="ErrorCallback" nullable="nullable"/>
41081 <RaiseException name="WebAPIException">
41084 with error type TypeMismatchError, if the input parameter
41085 is not compatible with the expected type for that parameter.
41088 with error type SecurityError, if the application does not have the privilege to call this method.
41091 with error type NotSupportedError, if current Tag doesn't support NDEF format.
41097 <Operation name="transceive" id="::NFC::NFCTag::transceive">
41098 <webidl> void transceive(byte[] data,
41099 <ref>ByteArraySuccessCallback</ref> dataCallback,
41100 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41103 Access the raw format card. The transceive function is the only way to access the raw format card (not formatted).
41104 Each tag type requires its own command to access tags.
41105 This API provides low level access of tag operation. (Note that you must know each tag technology.)
41109 The ErrorCallback is launched with these error types:
41113 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
41115 ServiceNotAvailableError - If the NFC service is not available. </li>
41117 UnknownError - If any other error occurs. </li>
41124 http://tizen.org/privilege/nfc.tag
41130 <Type type="void"/>
41132 <Argument name="data">
41135 The raw data to transceive with the NFC tag.
41138 <Type type="array">
41139 <Type type="byte"/>
41142 <Argument name="dataCallback">
41145 Invoked in case of successfully transceiving the raw data.
41148 <Type name="ByteArraySuccessCallback"/>
41150 <Argument optional="optional" name="errorCallback">
41153 Invoked in case of any error during transceiving the NDEF Data.
41156 <Type name="ErrorCallback" nullable="nullable"/>
41160 <RaiseException name="WebAPIException">
41163 with error type TypeMismatchError, if the input parameter
41164 is not compatible with the expected type for that parameter.
41167 with error type SecurityError, if the application does not have the privilege to call this method.
41174 <Interface name="NFCPeer" id="::NFC::NFCPeer">
41175 <webidl> [NoInterfaceObject] interface NFCPeer {
41176 readonly attribute boolean isConnected;
41178 void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);
41180 void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);
41182 void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41183 optional <ref>SuccessCallback</ref>? successCallback,
41184 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
41189 An interface that provides access to the NFC peer-to-peer target.
41195 <ExtendedAttributeList>
41196 <ExtendedAttribute name="NoInterfaceObject">
41197 <webidl>NoInterfaceObject</webidl>
41198 </ExtendedAttribute>
41199 </ExtendedAttributeList>
41200 <Attribute readonly="readonly" name="isConnected" id="::NFC::NFCPeer::isConnected">
41201 <webidl> readonly attribute boolean isConnected;</webidl>
41204 The value is necessary to check if this NFC peer-to-peer target is connected.
41210 <Type type="boolean"/>
41212 <Operation name="setReceiveNDEFListener" id="::NFC::NFCPeer::setReceiveNDEFListener">
41213 <webidl> void setReceiveNDEFListener(<ref>NDEFMessageReadCallback</ref> successCallback) raises(<ref>WebAPIException</ref>);</webidl>
41216 Registers a callback function to be invoked when an NDEF message is received from the connected NFC peer-to-peer target.
41222 http://tizen.org/privilege/nfc.p2p
41227 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41229 // Receives NFCPeer
41230 var onSuccessCB = {onattach : function(nfcPeer) {
41231 console.log("NFC Target is detected");
41232 nfcPeer.setReceiveNDEFListener(
41234 console.log("Receive message");
41236 }, ondetach : function() {
41237 console.log("NFC Target is detached");
41240 adapter.setPeerListener(onSuccessCB);
41243 <Type type="void"/>
41245 <Argument name="successCallback">
41248 Invoked in case of successful receiving the message.
41251 <Type name="NDEFMessageReadCallback"/>
41255 <RaiseException name="WebAPIException">
41258 with error type TypeMismatchError, if the input parameter
41259 is not compatible with the expected type for that parameter.
41262 with error type SecurityError, if the application does not have the privilege to call this method.
41265 with error type ServiceNotAvailableError, if the NFC service is not available.
41268 with error type UnknownError in any other error case.
41274 <Operation name="unsetReceiveNDEFListener" id="::NFC::NFCPeer::unsetReceiveNDEFListener">
41275 <webidl> void unsetReceiveNDEFListener() raises(<ref>WebAPIException</ref>);</webidl>
41278 Unregisters the listener for receiving NDEF messages from the NFC peer-to-peer target connected.
41284 http://tizen.org/privilege/nfc.p2p
41289 <Code> var adapter = tizen.nfc.getDefaultAdapter();
41290 var onSuccessCB = {onattach : function(nfcPeer) {
41291 console.log("NFC Target is detected");
41292 nfcPeer.setReceiveNDEFListener(
41294 console.log("Receive message");
41295 nfcPeer.unsetReceiveNDEFListener();
41297 }, ondetach : function() {
41298 console.log("NFC Target is detached");
41302 adapter.setPeerListener(onSuccessCB);
41305 <Type type="void"/>
41308 <RaiseException name="WebAPIException">
41311 with error type SecurityError, if the application does not have the privilege to call this method.
41314 with error type ServiceNotAvailableError, if the NFC service is not available.
41317 with error type UnknownError in any other error case.
41323 <Operation name="sendNDEF" id="::NFC::NFCPeer::sendNDEF">
41324 <webidl> void sendNDEF(<ref>NDEFMessage</ref> ndefMessage,
41325 optional <ref>SuccessCallback</ref>? successCallback,
41326 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
41329 Sends data to the NFC peer-to-peer target.
41333 The ErrorCallback is launched with these error types:
41337 InvalidValuesError: If any of the input parameters contain an invalid value. </li>
41339 ServiceNotAvailableError: If the NFC service is not available. </li>
41341 UnknownError: In any other error case. </li>
41348 http://tizen.org/privilege/nfc.p2p
41354 <Type type="void"/>
41356 <Argument name="ndefMessage">
41359 The NDEF message to send to NFC peer-to-peer target.
41362 <Type name="NDEFMessage"/>
41364 <Argument optional="optional" name="successCallback">
41367 Invoked in case of successfully sending data to NFC peer-to-peer target.
41370 <Type name="SuccessCallback" nullable="nullable"/>
41372 <Argument optional="optional" name="errorCallback">
41375 Invoked in case of any error during sending.
41378 <Type name="ErrorCallback" nullable="nullable"/>
41382 <RaiseException name="WebAPIException">
41385 with error type TypeMismatchError, if the input parameter
41386 is not compatible with the expected type for that parameter.
41389 with error type SecurityError, if the application does not have the privilege to call this method.
41396 <Interface name="NDEFMessage" id="::NFC::NDEFMessage">
41397 <webidl> [Constructor(),
41398 Constructor(<ref>NDEFRecord</ref>[] ndefRecords),
41399 Constructor(byte[] rawData)]
41400 interface NDEFMessage {
41401 readonly attribute long recordCount;
41403 attribute <ref>NDEFRecord</ref>[] records;
41405 byte[] toByte() raises(<ref>WebAPIException</ref>);
41409 The NDEFMessage interface. An NDEFmessage is composed of multiple NDEFRecords.
41410 The NDEFMessage must have at least one NDEFRecord.
41416 <ExtendedAttributeList>
41417 <ExtendedAttribute name="Constructor">
41418 <webidl>Constructor()</webidl>
41420 </ExtendedAttribute>
41421 <ExtendedAttribute name="Constructor">
41422 <webidl> Constructor(<ref>NDEFRecord</ref>[] ndefRecords)</webidl>
41424 <Argument name="ndefRecords">
41425 <Type type="array">
41426 <Type name="NDEFRecord"/>
41430 </ExtendedAttribute>
41431 <ExtendedAttribute name="Constructor">
41432 <webidl> Constructor(byte[] rawData)</webidl>
41434 <Argument name="rawData">
41435 <Type type="array">
41436 <Type type="byte"/>
41440 </ExtendedAttribute>
41441 </ExtendedAttributeList>
41442 <Attribute readonly="readonly" name="recordCount" id="::NFC::NDEFMessage::recordCount">
41443 <webidl> readonly attribute long recordCount;</webidl>
41446 The number of records in the NDEFMessage.
41452 <Type type="long"/>
41454 <Attribute name="records" id="::NFC::NDEFMessage::records">
41455 <webidl> attribute <ref>NDEFRecord</ref>[] records;</webidl>
41458 The array of NDEFRecord objects in the NDEFMessage.
41464 <Type type="array">
41465 <Type name="NDEFRecord"/>
41468 <Operation name="toByte" id="::NFC::NDEFMessage::toByte">
41469 <webidl> byte[] toByte() raises(<ref>WebAPIException</ref>);</webidl>
41472 Gets the serial byte array of the NDEF message.
41476 If the operation completes successfully, it returns the serial byte array of the NDEF message.
41482 <Code> // Gets the cached message.
41483 var cachedMessage = tizen.nfc.getDefaultAdapter().getCachedMessage();
41484 var raw = cachedMessage.toByte();
41487 <Type type="array">
41490 byte[] The raw data in the NDEFMessage.
41493 <Type type="byte"/>
41497 <RaiseException name="WebAPIException">
41500 with error type TypeMismatchError, if the records whose type is not NDEFRecord are included in the NDEFMessage.
41503 with error type UnknownError in any other error case.
41510 <Interface name="NDEFRecord" id="::NFC::NDEFRecord">
41511 <webidl> [Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id),
41512 Constructor(byte[] raw_data)]
41513 interface NDEFRecord {
41514 readonly attribute short tnf;
41516 readonly attribute byte[] type;
41518 readonly attribute byte[] id;
41520 readonly attribute byte[] payload;
41524 The NDEFRecord interface.
41530 <ExtendedAttributeList>
41531 <ExtendedAttribute name="Constructor">
41532 <webidl>Constructor(short tnf, byte[] type, byte[] payload, optional byte[]? id)</webidl>
41534 <Argument name="tnf">
41535 <Type type="short"/>
41537 <Argument name="type">
41538 <Type type="array">
41539 <Type type="byte"/>
41542 <Argument name="payload">
41543 <Type type="array">
41544 <Type type="byte"/>
41547 <Argument optional="optional" name="id">
41548 <Type type="array" nullable="nullable">
41549 <Type type="byte"/>
41553 </ExtendedAttribute>
41554 <ExtendedAttribute name="Constructor">
41555 <webidl> Constructor(byte[] raw_data)</webidl>
41557 <Argument name="raw_data">
41558 <Type type="array">
41559 <Type type="byte"/>
41563 </ExtendedAttribute>
41564 </ExtendedAttributeList>
41565 <Attribute readonly="readonly" name="tnf" id="::NFC::NDEFRecord::tnf">
41566 <webidl> readonly attribute short tnf;</webidl>
41569 The value of the record type (TNF value).
41573 At least the following values must be supported:
41577 NFC_RECORD_TNF_EMPTY - The record type is empty </li>
41579 NFC_RECORD_TNF_WELL_KNOWN - Record Type Definition (RTD) format [NFC RTD] </li>
41581 NFC_RECORD_TNF_MIME_MEDIA - MIME media types in RFC 2046 [RFC 2046] </li>
41583 NFC_RECORD_TNF_URI - Absolute URI as defined in RFC 3986 [RFC 3986] </li>
41585 NFC_RECORD_TNF_EXTERNAL_RTD - NFC forum external type [NFC RTD] </li>
41587 NFC_RECORD_TNF_UNKNOWN - The payload type is unknown </li>
41589 NFC_RECORD_TNF_UNCHANGED - It means the payload is an intermediate or final chunk of a chunked NDEF record </li>
41596 <Type type="short"/>
41598 <Attribute readonly="readonly" name="type" id="::NFC::NDEFRecord::type">
41599 <webidl> readonly attribute byte[] type;</webidl>
41602 The specified type in byte array.
41606 The byte array contains <var>0</var> to <var>255</var> bytes.
41613 <Type type="array">
41614 <Type type="byte"/>
41617 <Attribute readonly="readonly" name="id" id="::NFC::NDEFRecord::id">
41618 <webidl> readonly attribute byte[] id;</webidl>
41625 The byte array contains <var>0</var> to <var>255</var> bytes.
41628 By default, this attribute is set to an empty array.
41635 <Type type="array">
41636 <Type type="byte"/>
41639 <Attribute readonly="readonly" name="payload" id="::NFC::NDEFRecord::payload">
41640 <webidl> readonly attribute byte[] payload;</webidl>
41643 The record payload.
41647 The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes.
41653 <Code> // Creates a new NDEF record.
41654 var newRecord = new tizen.NDEFRecordURI("https://www.tizen.org/");
41655 var payload = newRecord.payload;
41658 <Type type="array">
41659 <Type type="byte"/>
41663 <Interface name="NDEFRecordText" id="::NFC::NDEFRecordText">
41664 <webidl> [Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)]
41665 interface NDEFRecordText : <ref>NDEFRecord</ref> {
41666 readonly attribute DOMString text;
41668 readonly attribute DOMString languageCode;
41670 readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;
41674 The NDEFRecord that has the text type payload.
41680 <ExtendedAttributeList>
41681 <ExtendedAttribute name="Constructor">
41682 <webidl>Constructor(DOMString text, DOMString languageCode, optional DOMString? encoding)</webidl>
41684 <Argument name="text">
41685 <Type type="DOMString"/>
41687 <Argument name="languageCode">
41688 <Type type="DOMString"/>
41690 <Argument optional="optional" name="encoding">
41691 <Type type="DOMString" nullable="nullable"/>
41694 </ExtendedAttribute>
41695 </ExtendedAttributeList>
41696 <InterfaceInheritance>
41697 <Name name="NDEFRecord"/>
41698 </InterfaceInheritance>
41699 <Attribute readonly="readonly" name="text" id="::NFC::NDEFRecordText::text">
41700 <webidl> readonly attribute DOMString text;</webidl>
41709 <Type type="DOMString"/>
41711 <Attribute readonly="readonly" name="languageCode" id="::NFC::NDEFRecordText::languageCode">
41712 <webidl> readonly attribute DOMString languageCode;</webidl>
41715 The language code string value, followed by IANA[RFC 3066] (for example, en-US, ko-KR).
41721 <Type type="DOMString"/>
41723 <Attribute readonly="readonly" name="encoding" id="::NFC::NDEFRecordText::encoding">
41724 <webidl> readonly attribute <ref>NDEFRecordTextEncoding</ref> encoding;</webidl>
41727 The encoding type. By default, this attribute is set to UTF8.
41733 <Type name="NDEFRecordTextEncoding"/>
41736 <Interface name="NDEFRecordURI" id="::NFC::NDEFRecordURI">
41737 <webidl> [Constructor(DOMString uri)]
41738 interface NDEFRecordURI : <ref>NDEFRecord</ref> {
41739 readonly attribute DOMString uri;
41743 The NDEFRecord that has URI type payload.
41749 <ExtendedAttributeList>
41750 <ExtendedAttribute name="Constructor">
41751 <webidl>Constructor(DOMString uri)</webidl>
41753 <Argument name="uri">
41754 <Type type="DOMString"/>
41757 </ExtendedAttribute>
41758 </ExtendedAttributeList>
41759 <InterfaceInheritance>
41760 <Name name="NDEFRecord"/>
41761 </InterfaceInheritance>
41762 <Attribute readonly="readonly" name="uri" id="::NFC::NDEFRecordURI::uri">
41763 <webidl> readonly attribute DOMString uri;</webidl>
41766 The URI string that is stored in the payload.
41772 <Type type="DOMString"/>
41775 <Interface name="NDEFRecordMedia" id="::NFC::NDEFRecordMedia">
41776 <webidl> [Constructor(DOMString mimeType, byte[] data)]
41777 interface NDEFRecordMedia : <ref>NDEFRecord</ref> {
41778 readonly attribute DOMString mimeType;
41782 The NDEFRecord that has mime type payload.
41788 <ExtendedAttributeList>
41789 <ExtendedAttribute name="Constructor">
41790 <webidl>Constructor(DOMString mimeType, byte[] data)</webidl>
41795 <b>data</b> : Mime type payload. The byte array contains <var>0</var> to <var>(2 ** 32 - 1)</var> bytes. </li>
41800 <Argument name="mimeType">
41801 <Type type="DOMString"/>
41803 <Argument name="data">
41804 <Type type="array">
41805 <Type type="byte"/>
41809 </ExtendedAttribute>
41810 </ExtendedAttributeList>
41811 <InterfaceInheritance>
41812 <Name name="NDEFRecord"/>
41813 </InterfaceInheritance>
41814 <Attribute readonly="readonly" name="mimeType" id="::NFC::NDEFRecordMedia::mimeType">
41815 <webidl> readonly attribute DOMString mimeType;</webidl>
41818 The mime type [RFC 2046] (for example, text/plain, image/jpeg ).
41824 <Type type="DOMString"/>
41827 <Interface name="NFCTagDetectCallback" id="::NFC::NFCTagDetectCallback">
41828 <webidl> [Callback, NoInterfaceObject] interface NFCTagDetectCallback {
41829 void onattach(<ref>NFCTag</ref> nfcTag);
41834 The success callback to be invoked when an NFC tag is detected or lost.
41838 This callback interface specifies two methods:
41842 onattach: invoked when an NFC tag is detected </li>
41844 ondetach: invoked when the NFC tag is lost </li>
41847 It is used in NFCAdapter.setTagListener().
41854 <ExtendedAttributeList>
41855 <ExtendedAttribute name="Callback">
41856 <webidl>Callback</webidl>
41857 </ExtendedAttribute>
41858 <ExtendedAttribute name="NoInterfaceObject">
41859 <webidl> NoInterfaceObject</webidl>
41860 </ExtendedAttribute>
41861 </ExtendedAttributeList>
41862 <Operation name="onattach" id="::NFC::NFCTagDetectCallback::onattach">
41863 <webidl> void onattach(<ref>NFCTag</ref> nfcTag);</webidl>
41866 The method invoked when a tag is attached.
41872 <Type type="void"/>
41874 <Argument name="nfcTag">
41877 The attached NFC tag.
41880 <Type name="NFCTag"/>
41884 <Operation name="ondetach" id="::NFC::NFCTagDetectCallback::ondetach">
41885 <webidl> void ondetach();</webidl>
41888 The method invoked when the connected tag is detached.
41894 <Type type="void"/>
41898 <Interface name="NFCPeerDetectCallback" id="::NFC::NFCPeerDetectCallback">
41899 <webidl> [Callback, NoInterfaceObject] interface NFCPeerDetectCallback {
41900 void onattach(<ref>NFCPeer</ref> nfcPeer);
41905 The success callback to be invoked when an NFC peer-to-peer target is detected or lost.
41909 This callback interface specifies two methods:
41913 onattach: invoked when an NFC peer-to-peer target is detected </li>
41915 ondetach: invoked when the NFC peer-to-peer target is lost </li>
41918 It is used in NFCAdapter.setPeerListener().
41925 <ExtendedAttributeList>
41926 <ExtendedAttribute name="Callback">
41927 <webidl>Callback</webidl>
41928 </ExtendedAttribute>
41929 <ExtendedAttribute name="NoInterfaceObject">
41930 <webidl> NoInterfaceObject</webidl>
41931 </ExtendedAttribute>
41932 </ExtendedAttributeList>
41933 <Operation name="onattach" id="::NFC::NFCPeerDetectCallback::onattach">
41934 <webidl> void onattach(<ref>NFCPeer</ref> nfcPeer);</webidl>
41937 The method invoked when the NFC peer-to-peer target is attached.
41943 <Type type="void"/>
41945 <Argument name="nfcPeer">
41948 The attached NFC peer-to-peer target.
41951 <Type name="NFCPeer"/>
41955 <Operation name="ondetach" id="::NFC::NFCPeerDetectCallback::ondetach">
41956 <webidl> void ondetach();</webidl>
41959 The method invoked when the NFC peer-to-peer target connected is detached.
41965 <Type type="void"/>
41969 <Interface name="NDEFMessageReadCallback" id="::NFC::NDEFMessageReadCallback">
41970 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface NDEFMessageReadCallback {
41971 void onsuccess(<ref>NDEFMessage</ref> ndefMessage);
41975 The success callback to be invoked when data has been read successfully from the NFC tag or target.
41979 This callback interface specifies a success method with
41980 an NDEF message as an input parameter.
41981 It is used in asynchronous
41982 operations, such as NFCTag.readNDEF() or NFCPeer.setReceiveNDEFListener().
41989 <ExtendedAttributeList>
41990 <ExtendedAttribute name="Callback" value="FunctionOnly">
41991 <webidl>Callback</webidl>
41992 </ExtendedAttribute>
41993 <ExtendedAttribute name="NoInterfaceObject">
41994 <webidl> NoInterfaceObject</webidl>
41995 </ExtendedAttribute>
41996 </ExtendedAttributeList>
41997 <Operation name="onsuccess" id="::NFC::NDEFMessageReadCallback::onsuccess">
41998 <webidl> void onsuccess(<ref>NDEFMessage</ref> ndefMessage);</webidl>
42001 The method invoked when the asynchronous call completes successfully.
42007 <Type type="void"/>
42009 <Argument name="ndefMessage">
42012 NDEF message that is read from the NFC tag or target.
42015 <Type name="NDEFMessage"/>
42020 <Interface name="ByteArraySuccessCallback" id="::NFC::ByteArraySuccessCallback">
42021 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ByteArraySuccessCallback {
42022 void onsuccess(byte[] data);
42026 The success callback to be invoked when NFCTag.transceive() completes successfully.
42030 This callback interface specifies a success method, with
42031 a raw data as an input parameter. It is used in NFCTag.transceive().
42038 <ExtendedAttributeList>
42039 <ExtendedAttribute name="Callback" value="FunctionOnly">
42040 <webidl>Callback</webidl>
42041 </ExtendedAttribute>
42042 <ExtendedAttribute name="NoInterfaceObject">
42043 <webidl> NoInterfaceObject</webidl>
42044 </ExtendedAttribute>
42045 </ExtendedAttributeList>
42046 <Operation name="onsuccess" id="::NFC::ByteArraySuccessCallback::onsuccess">
42047 <webidl> void onsuccess(byte[] data);</webidl>
42050 The method invoked when the asynchronous call completes successfully.
42056 <Type type="void"/>
42058 <Argument name="data">
42061 The raw data that is read from NFC tag or response of transceive operation.
42064 <Type type="array">
42065 <Type type="byte"/>
42072 <Module name="Notification" id="::Notification">
42073 <webidl>module Notification {
42075 typedef DOMString NotificationId;
42077 enum NotificationType { "STATUS" };
42079 enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };
42081 enum NotificationProgressType { "PERCENTAGE", "BYTE" };
42084 [NoInterfaceObject] interface NotificationObject {
42085 readonly attribute <ref>NotificationManager</ref> notification;
42087 <ref>Tizen</ref> implements <ref>NotificationObject</ref>;
42089 [NoInterfaceObject] interface NotificationManager {
42091 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42093 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42095 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42097 void removeAll() raises(<ref>WebAPIException</ref>);
42099 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42101 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42106 [NoInterfaceObject] interface Notification {
42109 readonly attribute <ref>NotificationId</ref> id;
42111 readonly attribute <ref>NotificationType</ref> type;
42113 readonly attribute Date postedTime;
42115 attribute DOMString title;
42117 attribute DOMString? content;
42122 dictionary StatusNotificationInit {
42123 DOMString? content;
42124 DOMString? iconPath;
42125 DOMString? soundPath;
42126 boolean? vibration;
42127 <ref>ApplicationControl</ref>? appControl;
42128 <ref>ApplicationId</ref>? appId;
42129 <ref>NotificationProgressType</ref>? progressType;
42130 unsigned long? progressValue;
42132 DOMString? subIconPath;
42133 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42134 DOMString? ledColor;
42135 unsigned long ledOnPeriod;
42136 unsigned long ledOffPeriod;
42137 DOMString? backgroundImagePath;
42138 DOMString[]? thumbnails;
42141 [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42144 interface StatusNotification : <ref>Notification</ref> {
42146 readonly attribute <ref>StatusNotificationType</ref> statusType;
42148 attribute DOMString? iconPath;
42150 attribute DOMString? subIconPath;
42152 attribute long? number;
42154 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42156 attribute DOMString? ledColor;
42158 attribute unsigned long ledOnPeriod;
42160 attribute unsigned long ledOffPeriod;
42162 attribute DOMString? backgroundImagePath;
42164 attribute DOMString[]? thumbnails;
42166 attribute DOMString? soundPath;
42168 attribute boolean vibration;
42170 attribute <ref>ApplicationControl</ref>? appControl;
42172 attribute <ref>ApplicationId</ref>? appId;
42174 attribute <ref>NotificationProgressType</ref> progressType;
42176 attribute unsigned long? progressValue;
42180 [Constructor(DOMString mainText, optional DOMString? subText)]
42181 interface NotificationDetailInfo {
42182 attribute DOMString mainText;
42184 attribute DOMString? subText;
42190 The Notification API provides a way to notify users of events that happen in an application.
42194 For more information on the Notification features, see <a href="../../org.tizen.web.appprogramming/html/guide/ui_guide/notification.htm">Notification Guide</a>.
42201 <Typedef name="NotificationId" id="::Notification::NotificationId">
42202 <webidl> typedef DOMString NotificationId;</webidl>
42211 <Type type="DOMString"/>
42213 <Enum name="NotificationType" id="::Notification::NotificationType">
42214 <webidl> enum NotificationType { "STATUS" };</webidl>
42217 A notification type.
42221 The following notification type is supported:
42225 STATUS - The posted status notification is displayed in status bar and the notification tray.
42226 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>
42233 <EnumValue stringvalue="STATUS">
42234 <webidl> "STATUS</webidl>
42237 <Enum name="StatusNotificationType" id="::Notification::StatusNotificationType">
42238 <webidl> enum StatusNotificationType { "SIMPLE", "THUMBNAIL", "ONGOING", "PROGRESS" };</webidl>
42241 A status notification type.
42245 The following status notification types are supported:
42249 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>
42251 THUMBNAIL - The thumbnail status notification posts a thumbnail-format notification which includes several thumbnail image paths.
42252 The thumbnail status notification is also removed by a user selection.
42255 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>
42257 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>
42264 <EnumValue stringvalue="SIMPLE">
42265 <webidl> "SIMPLE</webidl>
42267 <EnumValue stringvalue="THUMBNAIL">
42268 <webidl> "THUMBNAIL</webidl>
42270 <EnumValue stringvalue="ONGOING">
42271 <webidl> "ONGOING</webidl>
42273 <EnumValue stringvalue="PROGRESS">
42274 <webidl> "PROGRESS</webidl>
42277 <Enum name="NotificationProgressType" id="::Notification::NotificationProgressType">
42278 <webidl> enum NotificationProgressType { "PERCENTAGE", "BYTE" };</webidl>
42281 A notification progress type.
42285 Supporting notification progress types are:
42289 "BYTE" - The progress is indicated in bytes. </li>
42291 "PERCENTAGE" -The progress is indicated in percentage. </li>
42298 <EnumValue stringvalue="PERCENTAGE">
42299 <webidl> "PERCENTAGE</webidl>
42301 <EnumValue stringvalue="BYTE">
42302 <webidl> "BYTE</webidl>
42305 <Interface name="NotificationObject" id="::Notification::NotificationObject">
42306 <webidl> [NoInterfaceObject] interface NotificationObject {
42307 readonly attribute <ref>NotificationManager</ref> notification;
42311 Defines what is instantiated by the <em>Tizen</em> object.
42315 There is a <em>tizen.notification</em> object that allows access to the
42323 <ExtendedAttributeList>
42324 <ExtendedAttribute name="NoInterfaceObject">
42325 <webidl>NoInterfaceObject</webidl>
42326 </ExtendedAttribute>
42327 </ExtendedAttributeList>
42328 <Attribute readonly="readonly" name="notification" id="::Notification::NotificationObject::notification">
42329 <webidl> readonly attribute <ref>NotificationManager</ref> notification;</webidl>
42330 <Type name="NotificationManager"/>
42333 <Implements name1="Tizen" name2="NotificationObject">
42334 <webidl> <ref>Tizen</ref> implements <ref>NotificationObject</ref>;</webidl>
42336 <Interface name="NotificationManager" id="::Notification::NotificationManager">
42337 <webidl> [NoInterfaceObject] interface NotificationManager {
42339 void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42341 void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);
42343 void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42345 void removeAll() raises(<ref>WebAPIException</ref>);
42347 <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);
42349 <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);
42354 Notification manager interface that provides access to the API.
42358 This interface provides access to the notification object.
42365 <ExtendedAttributeList>
42366 <ExtendedAttribute name="NoInterfaceObject">
42367 <webidl>NoInterfaceObject</webidl>
42368 </ExtendedAttribute>
42369 </ExtendedAttributeList>
42370 <Operation name="post" id="::Notification::NotificationManager::post">
42371 <webidl> void post(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42374 Posts a notification to display.
42383 http://tizen.org/privilege/notification
42386 var appControl = new tizen.ApplicationControl(
42387 "http://tizen.org/appcontrol/operation/create_content",
42389 "image/jpg",
42391 var notificationDict = {
42392 content : "This is a simple notification.",
42393 iconPath : "images/image1.jpg",
42394 soundPath : "music/Over the horizon.mp3",
42396 appControl : appControl};
42398 var notification = new tizen.StatusNotification("SIMPLE",
42399 "Simple notification", notificationDict);
42401 tizen.notification.post(notification);
42403 console.log (err.name + ": " + err.message);
42407 <Type type="void"/>
42409 <Argument name="notification">
42412 A notification to post.
42415 <Type name="Notification"/>
42419 <RaiseException name="WebAPIException">
42422 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42425 with error type InvalidValuesError, if any of the input
42426 parameters contain an invalid value.
42429 with error type SecurityError, if the application does not have the privilege to call this method.
42432 with error type UnknownError if any other error occurs.
42438 <Operation name="update" id="::Notification::NotificationManager::update">
42439 <webidl> void update(<ref>Notification</ref> notification) raises(<ref>WebAPIException</ref>);</webidl>
42442 Updates a previously posted notification.
42451 http://tizen.org/privilege/notification
42454 // Uses a variable for the previously posted notification.
42455 notification.content = "My notification";
42456 tizen.notification.update(notification);
42458 console.log (err.name + ": " + err.message);
42463 <Type type="void"/>
42465 <Argument name="notification">
42468 A notification to update.
42471 <Type name="Notification"/>
42475 <RaiseException name="WebAPIException">
42478 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42481 with error type InvalidValuesError, if any of the input
42482 parameters contain an invalid value.
42485 with error type SecurityError, if the application does not have the privilege to call this method.
42488 with error type UnknownError if any other error occurs.
42494 <Operation name="remove" id="::Notification::NotificationManager::remove">
42495 <webidl> void remove(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42498 Removes a previously posted notification.
42507 http://tizen.org/privilege/notification
42510 // Uses a variable for the previously posted notification.
42511 tizen.notification.remove(notification.id);
42513 console.log (err.name + ": " + err.message);
42518 <Type type="void"/>
42520 <Argument name="id">
42523 A previously posted notification ID to remove.
42526 <Type name="NotificationId"/>
42530 <RaiseException name="WebAPIException">
42533 with error type TypeMismatchError, if any of the input parameter is not compatible with the expected type for that parameter.
42536 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42539 with error type SecurityError, if the application does not have the privilege to call this method.
42542 with error type UnknownError if any other error occurs.
42548 <Operation name="removeAll" id="::Notification::NotificationManager::removeAll">
42549 <webidl> void removeAll() raises(<ref>WebAPIException</ref>);</webidl>
42552 Removes all notifications that have been posted by the current application.
42561 http://tizen.org/privilege/notification
42564 tizen.notification.removeAll();
42566 console.log (err.name + ": " + err.message);
42571 <Type type="void"/>
42574 <RaiseException name="WebAPIException">
42577 with error type SecurityError, if the application does not have the privilege to call this method.
42580 with error type UnknownError if any other error occurs.
42586 <Operation name="get" id="::Notification::NotificationManager::get">
42587 <webidl> <ref>Notification</ref> get(<ref>NotificationId</ref> id) raises(<ref>WebAPIException</ref>);</webidl>
42590 Gets a notification that has previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42595 // Uses a variable for the previously posted notification
42596 // Saves notification ID for future use
42597 var myId = notification.id;
42599 var myNotification = tizen.notification.get(myId);
42601 console.log (err.name + ": " + err.message);
42606 <Type name="Notification"/>
42608 <Argument name="id">
42611 A previously posted notification ID.
42614 <Type name="NotificationId"/>
42618 <RaiseException name="WebAPIException">
42621 with error type NotFoundError, if NotificationId is not found in the previously posted notifications.
42624 with error type UnknownError if any other error occurs.
42630 <Operation name="getAll" id="::Notification::NotificationManager::getAll">
42631 <webidl> <ref>Notification</ref>[] getAll() raises(<ref>WebAPIException</ref>);</webidl>
42634 Gets all notifications that have previously been posted by the current application. Note that the obtaining notification's progressType is <em>PERCENTAGE</em> </brief>
42639 var notifications = tizen.notification.getAll();
42642 for ( index = 0; notifications.length > index; index++ )
42644 console.log(notifications[index].id);
42645 console.log(notifications[index].title);
42646 console.log(notifications[index].statusType);
42647 console.log(notifications[index].type);
42648 console.log(notifications[index].content);
42649 console.log(notifications[index].postedTime);
42650 console.log(notifications[index].iconPath);
42651 console.log(notifications[index].soundPath);
42652 console.log(notifications[index].vibration);
42653 console.log(notifications[index].appControl);
42656 console.log (err.name + ": " + err.message);
42660 <Type type="array">
42661 <Type name="Notification"/>
42665 <RaiseException name="WebAPIException">
42668 with error type UnknownError, if any other error occurs.
42675 <Interface name="Notification" id="::Notification::Notification">
42676 <webidl> [NoInterfaceObject] interface Notification {
42679 readonly attribute <ref>NotificationId</ref> id;
42681 readonly attribute <ref>NotificationType</ref> type;
42683 readonly attribute Date postedTime;
42685 attribute DOMString title;
42687 attribute DOMString? content;
42692 This interface offers common attributes to represent <em>Notification</em> object.
42698 <ExtendedAttributeList>
42699 <ExtendedAttribute name="NoInterfaceObject">
42700 <webidl>NoInterfaceObject</webidl>
42701 </ExtendedAttribute>
42702 </ExtendedAttributeList>
42703 <Attribute readonly="readonly" name="id" id="::Notification::Notification::id">
42704 <webidl> readonly attribute <ref>NotificationId</ref> id;</webidl>
42707 The Notification identifier. Before the notification is posted, this value is undefined.
42713 <Type name="NotificationId"/>
42715 <Attribute readonly="readonly" name="type" id="::Notification::Notification::type">
42716 <webidl> readonly attribute <ref>NotificationType</ref> type;</webidl>
42719 The Notification type.
42725 <Type name="NotificationType"/>
42727 <Attribute readonly="readonly" name="postedTime" id="::Notification::Notification::postedTime">
42728 <webidl> readonly attribute Date postedTime;</webidl>
42731 The time that the notification is posted. Before the notification is posted, this value is undefined.
42737 <Type type="Date"/>
42739 <Attribute name="title" id="::Notification::Notification::title">
42740 <webidl> attribute DOMString title;</webidl>
42743 The title to display in a notification.
42749 <Type type="DOMString"/>
42751 <Attribute name="content" id="::Notification::Notification::content">
42752 <webidl> attribute DOMString? content;</webidl>
42755 The content to display in a notification.
42761 <Type type="DOMString" nullable="nullable"/>
42764 <Dictionary name="StatusNotificationInit" id="::Notification::StatusNotificationInit">
42765 <webidl> dictionary StatusNotificationInit {
42766 DOMString? content;
42767 DOMString? iconPath;
42768 DOMString? soundPath;
42769 boolean? vibration;
42770 <ref>ApplicationControl</ref>? appControl;
42771 <ref>ApplicationId</ref>? appId;
42772 <ref>NotificationProgressType</ref>? progressType;
42773 unsigned long? progressValue;
42775 DOMString? subIconPath;
42776 <ref>NotificationDetailInfo</ref>[]? detailInfo;
42777 DOMString? ledColor;
42778 unsigned long ledOnPeriod;
42779 unsigned long ledOffPeriod;
42780 DOMString? backgroundImagePath;
42781 DOMString[]? thumbnails;
42785 The properties of StatusNotification, to pass a constructor.
42791 <DictionaryMember name="content" id="::Notification::StatusNotificationInit::content">
42792 <webidl> DOMString? content;</webidl>
42793 <Type type="DOMString" nullable="nullable"/>
42794 </DictionaryMember>
42795 <DictionaryMember name="iconPath" id="::Notification::StatusNotificationInit::iconPath">
42796 <webidl> DOMString? iconPath;</webidl>
42797 <Type type="DOMString" nullable="nullable"/>
42798 </DictionaryMember>
42799 <DictionaryMember name="soundPath" id="::Notification::StatusNotificationInit::soundPath">
42800 <webidl> DOMString? soundPath;</webidl>
42801 <Type type="DOMString" nullable="nullable"/>
42802 </DictionaryMember>
42803 <DictionaryMember name="vibration" id="::Notification::StatusNotificationInit::vibration">
42804 <webidl> boolean? vibration;</webidl>
42805 <Type type="boolean" nullable="nullable"/>
42806 </DictionaryMember>
42807 <DictionaryMember name="appControl" id="::Notification::StatusNotificationInit::appControl">
42808 <webidl> <ref>ApplicationControl</ref>? appControl;</webidl>
42809 <Type name="ApplicationControl" nullable="nullable"/>
42810 </DictionaryMember>
42811 <DictionaryMember name="appId" id="::Notification::StatusNotificationInit::appId">
42812 <webidl> <ref>ApplicationId</ref>? appId;</webidl>
42813 <Type name="ApplicationId" nullable="nullable"/>
42814 </DictionaryMember>
42815 <DictionaryMember name="progressType" id="::Notification::StatusNotificationInit::progressType">
42816 <webidl> <ref>NotificationProgressType</ref>? progressType;</webidl>
42817 <Type name="NotificationProgressType" nullable="nullable"/>
42818 </DictionaryMember>
42819 <DictionaryMember name="progressValue" id="::Notification::StatusNotificationInit::progressValue">
42820 <webidl> unsigned long? progressValue;</webidl>
42821 <Type type="unsigned long" nullable="nullable"/>
42822 </DictionaryMember>
42823 <DictionaryMember name="number" id="::Notification::StatusNotificationInit::number">
42824 <webidl> long? number;</webidl>
42825 <Type type="long" nullable="nullable"/>
42826 </DictionaryMember>
42827 <DictionaryMember name="subIconPath" id="::Notification::StatusNotificationInit::subIconPath">
42828 <webidl> DOMString? subIconPath;</webidl>
42829 <Type type="DOMString" nullable="nullable"/>
42830 </DictionaryMember>
42831 <DictionaryMember name="detailInfo" id="::Notification::StatusNotificationInit::detailInfo">
42832 <webidl> <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
42833 <Type type="array" nullable="nullable">
42834 <Type name="NotificationDetailInfo"/>
42836 </DictionaryMember>
42837 <DictionaryMember name="ledColor" id="::Notification::StatusNotificationInit::ledColor">
42838 <webidl> DOMString? ledColor;</webidl>
42839 <Type type="DOMString" nullable="nullable"/>
42840 </DictionaryMember>
42841 <DictionaryMember name="ledOnPeriod" id="::Notification::StatusNotificationInit::ledOnPeriod">
42842 <webidl> unsigned long ledOnPeriod;</webidl>
42843 <Type type="unsigned long"/>
42844 </DictionaryMember>
42845 <DictionaryMember name="ledOffPeriod" id="::Notification::StatusNotificationInit::ledOffPeriod">
42846 <webidl> unsigned long ledOffPeriod;</webidl>
42847 <Type type="unsigned long"/>
42848 </DictionaryMember>
42849 <DictionaryMember name="backgroundImagePath" id="::Notification::StatusNotificationInit::backgroundImagePath">
42850 <webidl> DOMString? backgroundImagePath;</webidl>
42851 <Type type="DOMString" nullable="nullable"/>
42852 </DictionaryMember>
42853 <DictionaryMember name="thumbnails" id="::Notification::StatusNotificationInit::thumbnails">
42854 <webidl> DOMString[]? thumbnails;</webidl>
42855 <Type type="array" nullable="nullable">
42856 <Type type="DOMString"/>
42858 </DictionaryMember>
42860 <Interface name="StatusNotification" id="::Notification::StatusNotification">
42861 <webidl> [Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)]
42864 interface StatusNotification : <ref>Notification</ref> {
42866 readonly attribute <ref>StatusNotificationType</ref> statusType;
42868 attribute DOMString? iconPath;
42870 attribute DOMString? subIconPath;
42872 attribute long? number;
42874 attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;
42876 attribute DOMString? ledColor;
42878 attribute unsigned long ledOnPeriod;
42880 attribute unsigned long ledOffPeriod;
42882 attribute DOMString? backgroundImagePath;
42884 attribute DOMString[]? thumbnails;
42886 attribute DOMString? soundPath;
42888 attribute boolean vibration;
42890 attribute <ref>ApplicationControl</ref>? appControl;
42892 attribute <ref>ApplicationId</ref>? appId;
42894 attribute <ref>NotificationProgressType</ref> progressType;
42896 attribute unsigned long? progressValue;
42900 This interface represents status notification and offers additional attributes to represent notification displayed in notification tray.
42904 All notification must have a title attribute.
42911 <ExtendedAttributeList>
42912 <ExtendedAttribute name="Constructor">
42913 <webidl>Constructor(<ref>StatusNotificationType</ref> statusType, DOMString title, optional <ref>StatusNotificationInit</ref>? notificationInitDict)</webidl>
42915 <Argument name="statusType">
42916 <Type name="StatusNotificationType"/>
42918 <Argument name="title">
42919 <Type type="DOMString"/>
42921 <Argument optional="optional" name="notificationInitDict">
42922 <Type name="StatusNotificationInit" nullable="nullable"/>
42925 </ExtendedAttribute>
42926 </ExtendedAttributeList>
42927 <InterfaceInheritance>
42928 <Name name="Notification"/>
42929 </InterfaceInheritance>
42930 <Attribute readonly="readonly" name="statusType" id="::Notification::StatusNotification::statusType">
42931 <webidl> readonly attribute <ref>StatusNotificationType</ref> statusType;</webidl>
42934 The status notification type.
42940 <Type name="StatusNotificationType"/>
42942 <Attribute name="iconPath" id="::Notification::StatusNotification::iconPath">
42943 <webidl> attribute DOMString? iconPath;</webidl>
42946 The icon path to display in the notification.
42952 <Type type="DOMString" nullable="nullable"/>
42954 <Attribute name="subIconPath" id="::Notification::StatusNotification::subIconPath">
42955 <webidl> attribute DOMString? subIconPath;</webidl>
42958 The sub icon path to display in the notification.
42964 <Type type="DOMString" nullable="nullable"/>
42966 <Attribute name="number" id="::Notification::StatusNotification::number">
42967 <webidl> attribute long? number;</webidl>
42970 The number of events to display in the notification.
42976 <Type type="long" nullable="nullable"/>
42978 <Attribute name="detailInfo" id="::Notification::StatusNotification::detailInfo">
42979 <webidl> attribute <ref>NotificationDetailInfo</ref>[]? detailInfo;</webidl>
42982 Appends lines of the detail information to the notification.
42983 This attribute is available in simple status notification.
42984 By default, this attribute is initialized with an empty array.
42985 The maximum number of detail information elements in the array is 2.
42991 <Type type="array" nullable="nullable">
42992 <Type name="NotificationDetailInfo"/>
42995 <Attribute name="ledColor" id="::Notification::StatusNotification::ledColor">
42996 <webidl> attribute DOMString? ledColor;</webidl>
42999 Sets the notification LED indicator color property.
43000 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.
43001 The LED indicator color will show its a close approximation.
43002 LED will only light on when screen is off. To turn the LED off, set "#000000" or null to ledColor.
43003 This method has effects when the device has notification LED.
43006 var notificationDict = {
43007 content : "This is a simple notification.",
43008 iconPath : "images/image1.jpg",
43009 soundPath : "music/Over the horizon.mp3",
43011 ledColor : "#FFFF00",
43013 ledOffPeriod : 500 };
43015 var notification = new tizen.StatusNotification("SIMPLE",
43016 "Simple notification", notificationDict);
43018 tizen.notification.post(notification);
43020 console.log (err.name + ": " + err.message);
43027 <Type type="DOMString" nullable="nullable"/>
43029 <Attribute name="ledOnPeriod" id="::Notification::StatusNotification::ledOnPeriod">
43030 <webidl> attribute unsigned long ledOnPeriod;</webidl>
43033 The milliseconds for which the light is on
43034 The light continuously toggles on (ledOnPeriod) and off (ledOffPeriod).
43035 By default, this attribute is set to 0
43041 <Type type="unsigned long"/>
43043 <Attribute name="ledOffPeriod" id="::Notification::StatusNotification::ledOffPeriod">
43044 <webidl> attribute unsigned long ledOffPeriod;</webidl>
43047 The milliseconds for which the light is off
43048 By default, this attribute is set to 0
43054 <Type type="unsigned long"/>
43056 <Attribute name="backgroundImagePath" id="::Notification::StatusNotification::backgroundImagePath">
43057 <webidl> attribute DOMString? backgroundImagePath;</webidl>
43060 The image path to use as the background of the notification.
43061 This attribute is available on simple or thumbnail status notifications.
43067 <Type type="DOMString" nullable="nullable"/>
43069 <Attribute name="thumbnails" id="::Notification::StatusNotification::thumbnails">
43070 <webidl> attribute DOMString[]? thumbnails;</webidl>
43073 The image paths associated with the thumbnail status notification.
43074 By default, this attribute is initialized with an empty array.
43075 The maximum number of thumbnail path elements in the array is 4.
43081 <Type type="array" nullable="nullable">
43082 <Type type="DOMString"/>
43085 <Attribute name="soundPath" id="::Notification::StatusNotification::soundPath">
43086 <webidl> attribute DOMString? soundPath;</webidl>
43089 The path of a sound file to play when the notification is shown.
43095 <Type type="DOMString" nullable="nullable"/>
43097 <Attribute name="vibration" id="::Notification::StatusNotification::vibration">
43098 <webidl> attribute boolean vibration;</webidl>
43101 Holds whether to vibrate when the notification is shown. By default, this attribute is set to false.
43107 <Type type="boolean"/>
43109 <Attribute name="appControl" id="::Notification::StatusNotification::appControl">
43110 <webidl> attribute <ref>ApplicationControl</ref>? appControl;</webidl>
43113 Holds the application control to launch an application when the notification is selected from the notification tray.
43119 <Type name="ApplicationControl" nullable="nullable"/>
43121 <Attribute name="appId" id="::Notification::StatusNotification::appId">
43122 <webidl> attribute <ref>ApplicationId</ref>? appId;</webidl>
43125 Holds the application ID to launch when the notification is selected from the notification tray.
43132 // Gets a current application information with tizen.application.getAppInfo
43133 var myappInfo = tizen.application.getAppInfo();
43135 var notificationDict = {
43136 content : "This is a simple notification.",
43137 iconPath : "images/image1.jpg",
43138 soundPath : "music/Over the horizon.mp3",
43140 appId : myappInfo.id };
43142 var notification = new tizen.StatusNotification("SIMPLE",
43143 "Simple notification", notificationDict);
43145 tizen.notification.post(notification);
43147 console.log (err.name + ": " + err.message);
43151 <Type name="ApplicationId" nullable="nullable"/>
43153 <Attribute name="progressType" id="::Notification::StatusNotification::progressType">
43154 <webidl> attribute <ref>NotificationProgressType</ref> progressType;</webidl>
43157 Defines the type for an ongoing notification's progress.
43158 By default, this attribute is set to PERCENTAGE.
43164 <Type name="NotificationProgressType"/>
43166 <Attribute name="progressValue" id="::Notification::StatusNotification::progressValue">
43167 <webidl> attribute unsigned long? progressValue;</webidl>
43170 Defines the current notification progress value (<em>PERCENTAGE</em> or <em>BYTE</em>), depending on the <em>progressType</em> </brief>
43173 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
43174 If 0, the indeterminate progressbar will be shown.
43175 This attribute is only available for StatusNotifcation of type <em>PROGRESS</em>.
43178 Application should keep the progress value for its job because
43179 the saved value in the notification status tray would be different from
43180 exact progress value.
43183 Range of <em>progressValue</em>: percent (0 to 100).
43187 var appControl = new tizen.ApplicationControl(
43188 "http://tizen.org/appcontrol/operation/create_content",
43190 "image/jpg",
43193 var notificationDict = {
43194 content : "This is a progress notificaiton.",
43195 iconPath : "images/image2.jpg",
43196 soundPath : "music/Over the horizon.mp3",
43198 appControl : appControl,
43199 progressValue : 20};
43200 // Constructs the progress notification
43201 var notification = new tizen.StatusNotification("PROGRESS",
43202 "Progress notification", notificationDict);
43203 // Posts the notification
43204 tizen.notification.post(notification);
43206 // Updates the progress value of the notification
43207 notification.progressValue = 59;
43208 tizen.notification.update(notification);
43212 console.log (err.name + ": " + err.message);
43219 <Type type="unsigned long" nullable="nullable"/>
43222 <Interface name="NotificationDetailInfo" id="::Notification::NotificationDetailInfo">
43223 <webidl>[Constructor(DOMString mainText, optional DOMString? subText)]
43224 interface NotificationDetailInfo {
43225 attribute DOMString mainText;
43227 attribute DOMString? subText;
43231 The NotificationDetailInfo object that contains the detail information to the notification.
43236 <Code> var detailInfo1 = new tizen.NotificationDetailInfo('Missed Call from James', 'Feb 11 2013');
43237 notification.detailInfo = [detailInfo1];
43240 <ExtendedAttributeList>
43241 <ExtendedAttribute name="Constructor">
43242 <webidl>Constructor(DOMString mainText, optional DOMString? subText)</webidl>
43244 <Argument name="mainText">
43245 <Type type="DOMString"/>
43247 <Argument optional="optional" name="subText">
43248 <Type type="DOMString" nullable="nullable"/>
43251 </ExtendedAttribute>
43252 </ExtendedAttributeList>
43253 <Attribute name="mainText" id="::Notification::NotificationDetailInfo::mainText">
43254 <webidl> attribute DOMString mainText;</webidl>
43257 The main content of the detail information.
43258 This attribute is available on simple status notifications.
43264 <Type type="DOMString"/>
43266 <Attribute name="subText" id="::Notification::NotificationDetailInfo::subText">
43267 <webidl> attribute DOMString? subText;</webidl>
43270 The secondary content of the detail information.
43274 By default, this attribute is set to null.
43281 <Type type="DOMString" nullable="nullable"/>
43285 <Module name="Package" id="::Package">
43286 <webidl>module Package {
43289 typedef DOMString PackageId;
43292 [NoInterfaceObject] interface PackageManagerObject {
43293 readonly attribute <ref>PackageManager</ref> package;
43295 <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;
43298 [NoInterfaceObject] interface PackageManager {
43301 void install(DOMString path,
43302 <ref>PackageProgressCallback</ref> progressCallback,
43303 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43306 void uninstall(<ref>PackageId</ref> id,
43307 <ref>PackageProgressCallback</ref> progressCallback,
43308 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43313 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43314 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43317 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43320 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43323 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43328 [NoInterfaceObject] interface PackageInformation {
43330 readonly attribute <ref>PackageId</ref> id;
43333 readonly attribute DOMString name;
43336 readonly attribute DOMString iconPath;
43339 readonly attribute DOMString version;
43342 readonly attribute long totalSize;
43345 readonly attribute long dataSize;
43348 readonly attribute Date lastModified;
43351 readonly attribute DOMString author;
43354 readonly attribute DOMString description;
43357 readonly attribute <ref>ApplicationId</ref>[] appIds;
43362 [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
43365 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
43369 [Callback, NoInterfaceObject] interface PackageProgressCallback {
43372 void onprogress(<ref>PackageId</ref> id, short progress);
43375 void oncomplete(<ref>PackageId</ref> id);
43379 [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
43382 void oninstalled(<ref>PackageInformation</ref> info);
43385 void onupdated(<ref>PackageInformation</ref> info);
43388 void onuninstalled(<ref>PackageId</ref> id);
43394 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.
43395 For more information on the Package features, see <a href="../../org.tizen.web.appprogramming/html/guide/app_guide/package.htm">Package Guide</a>.
43401 <Typedef name="PackageId" id="::Package::PackageId">
43402 <webidl> typedef DOMString PackageId;</webidl>
43405 A unique ID for an installed package.
43411 <Type type="DOMString"/>
43413 <Interface name="PackageManagerObject" id="::Package::PackageManagerObject">
43414 <webidl> [NoInterfaceObject] interface PackageManagerObject {
43415 readonly attribute <ref>PackageManager</ref> package;
43419 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
43423 There is a <em>tizen.package </em>object that allows access to Package API functionality.
43430 <ExtendedAttributeList>
43431 <ExtendedAttribute name="NoInterfaceObject">
43432 <webidl>NoInterfaceObject</webidl>
43433 </ExtendedAttribute>
43434 </ExtendedAttributeList>
43435 <Attribute readonly="readonly" name="package" id="::Package::PackageManagerObject::package">
43436 <webidl> readonly attribute <ref>PackageManager</ref> package;</webidl>
43437 <Type name="PackageManager"/>
43440 <Implements name1="Tizen" name2="PackageManagerObject">
43441 <webidl> <ref>Tizen</ref> implements <ref>PackageManagerObject</ref>;</webidl>
43443 <Interface name="PackageManager" id="::Package::PackageManager">
43444 <webidl> [NoInterfaceObject] interface PackageManager {
43447 void install(DOMString path,
43448 <ref>PackageProgressCallback</ref> progressCallback,
43449 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43452 void uninstall(<ref>PackageId</ref> id,
43453 <ref>PackageProgressCallback</ref> progressCallback,
43454 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43459 void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43460 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
43463 <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);
43466 void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);
43469 void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);
43474 This interface defines the package manager.
43480 <ExtendedAttributeList>
43481 <ExtendedAttribute name="NoInterfaceObject">
43482 <webidl>NoInterfaceObject</webidl>
43483 </ExtendedAttribute>
43484 </ExtendedAttributeList>
43485 <Operation name="install" id="::Package::PackageManager::install">
43486 <webidl> void install(DOMString path,
43487 <ref>PackageProgressCallback</ref> progressCallback,
43488 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43491 Installs a package with a specified package path on a device.
43495 This API provides a way to notify the progress and completion of an installation request through PackageProgressCallback.
43498 The <em>ErrorCallback() </em>is launched with these error types:
43502 NotFoundError - If the package is not found in the specified path. </li>
43504 UnknownError - If it is not allowed to install the package by platform or any other platform error occurs. </li>
43514 http://tizen.org/privilege/packagemanager.install
43517 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.
43519 <Code> var onInstallation = {
43520 onprogress: function(packageId, percentage) {
43521 console.log("On installation(" + packageId + ") : progress(" + percentage + ")");
43523 oncomplete: function(packageId) {
43524 console.log("Installation(" + packageId + ") Complete");
43528 var onError = function (err) {
43529 console.log("Error occurred on installation : " + err.name);
43532 // Let's assume that "test.wgt" file is exist in the downloads directory
43533 tizen.filesystem.resolve("downloads/test.wgt",
43535 console.log("file path : " + file.path);
43536 tizen.package.install(file.toURI(), onInstallation, onError);
43539 console.log("Error occurred on resolve : " + err.name);
43545 <Type type="void"/>
43547 <Argument name="path">
43550 The package path to install
43553 <Type type="DOMString"/>
43555 <Argument name="progressCallback">
43558 The method to invoke when the installation is in progress or has been completed
43561 <Type name="PackageProgressCallback"/>
43563 <Argument optional="optional" name="errorCallback">
43566 The method to invoke when an error occurs
43569 <Type name="ErrorCallback" nullable="nullable"/>
43573 <RaiseException name="WebAPIException">
43576 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
43579 with error type SecurityError, if the application does not have the privilege to call this method.
43585 <Operation name="uninstall" id="::Package::PackageManager::uninstall">
43586 <webidl> void uninstall(<ref>PackageId</ref> id,
43587 <ref>PackageProgressCallback</ref> progressCallback,
43588 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43591 Uninstalls the package with a specified package ID.
43595 This API provides a way to notify about the progress and completion of an uninstallation request through PackageProgressCallback.
43598 The <em>ErrorCallback() </em>is launched with these error types:
43602 NotFoundError - If the package is not found with specified ID. </li>
43604 UnknownError - If it is not allowed to uninstall the package from the platform or any other platform error occurs. </li>
43614 http://tizen.org/privilege/packagemanager.install
43617 Some preloaded packages cannot be uninstalled. In this case, ErrorCallback with UnKnownError type will be launched.
43619 <Code> var onUninstallation = {
43620 onprogress: function(packageId, percentage) {
43621 console.log("On Uninstallation(" + packageId + ") : progress(" + percentage + ")");
43623 oncomplete: function(packageId) {
43624 console.log("Uninstallation(" + packageId + ") Complete");
43628 var onError = function (err) {
43629 console.log("Error occurred on installation : " + err.name);
43632 // Let's assume that the package id to uninstall is "testapp001"
43633 tizen.package.uninstall("testapp001", onUninstallation, onError);
43636 <Type type="void"/>
43638 <Argument name="id">
43641 The package ID to uninstall
43644 <Type name="PackageId"/>
43646 <Argument name="progressCallback">
43649 The method to invoke when uninstallation is in progress or has been completed
43652 <Type name="PackageProgressCallback"/>
43654 <Argument optional="optional" name="errorCallback">
43657 The method to invoke when an error occurs
43660 <Type name="ErrorCallback" nullable="nullable"/>
43664 <RaiseException name="WebAPIException">
43667 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43670 with error type SecurityError, if the application does not have the privilege to call this method.
43676 <Operation name="getPackagesInfo" id="::Package::PackageManager::getPackagesInfo">
43677 <webidl> void getPackagesInfo(<ref>PackageInformationArraySuccessCallback</ref> successCallback,
43678 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
43681 Gets information of the installed packages.
43685 The result contains the snapshots of the installed packages information.
43688 The <em>errorCallback()</em> is launched with this error type:
43692 UnknownError - If any other platform error occurs. </li>
43702 http://tizen.org/privilege/package.info
43704 <Code> function onListInstalledPackages(packages) {
43705 for (var i = 0; i < packages.length; i++) {
43706 console.log("Package id["+i+"] : " +packages[i].id);
43710 tizen.package.getPackagesInfo(
43711 onListInstalledPackages,
43712 function (err) {console.log("Can't obtain packages list" + err.name);});
43715 <Type type="void"/>
43717 <Argument name="successCallback">
43720 The method to call when an invocation ends successfully
43723 <Type name="PackageInformationArraySuccessCallback"/>
43725 <Argument optional="optional" name="errorCallback">
43728 The method to call when an error occurs
43731 <Type name="ErrorCallback" nullable="nullable"/>
43735 <RaiseException name="WebAPIException">
43738 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43741 with error type SecurityError, if the application does not have the privilege to call this method.
43747 <Operation name="getPackageInfo" id="::Package::PackageManager::getPackageInfo">
43748 <webidl> <ref>PackageInformation</ref> getPackageInfo(optional <ref>PackageId</ref>? id) raises(<ref>WebAPIException</ref>);</webidl>
43751 Gets information of an installed package.
43755 If the ID is set to <var>null</var> or not set at all, it returns package information of the current application.
43756 The list of installed packages and their package IDs is obtained using <em>getPackagesInfo()</em>.
43766 http://tizen.org/privilege/package.info
43768 <Code> var packageInfo = tizen.package.getPackageInfo(null);
43770 console.log("Current Package ID : " + packageInfo.id);
43773 <Type name="PackageInformation">
43776 PackageInformation The information of a package
43781 <Argument optional="optional" name="id">
43784 A string representing package ID. If the ID is not provided, the package information of the calling application is returned.
43787 <Type name="PackageId" nullable="nullable"/>
43791 <RaiseException name="WebAPIException">
43794 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43797 with error type SecurityError, if the application does not have the privilege to call this method.
43800 with error type NotFoundError, if the package with the specified ID is not found.
43803 with error type UnknownError, if the package information cannot be retrieved because of a platform error.
43809 <Operation name="setPackageInfoEventListener" id="::Package::PackageManager::setPackageInfoEventListener">
43810 <webidl> void setPackageInfoEventListener(<ref>PackageInformationEventCallback</ref> eventCallback) raises(<ref>WebAPIException</ref>);</webidl>
43813 Sets a listener to receive notifications for any changes made to the list of installed packages.
43817 This method sets a <em>PackageInformationEventCallback</em> type callback that is triggered when a package is installed, removed or updated.
43820 The callback lasts until <em>unsetPackageInfoEventListener()</em> method is called.
43830 http://tizen.org/privilege/package.info
43832 <Code> var packageEventCallback = {
43833 oninstalled: function(packageInfo) {
43834 console.log('The package ' + packageInfo.name + ' is installed');
43836 onupdated: function(packageInfo) {
43837 console.log('The package ' + packageInfo.name + ' is updated');
43839 onuninstalled: function(packageId) {
43840 console.log('The package ' + packageId + ' is uninstalled');
43844 tizen.package.setPackageInfoEventListener(packageEventCallback);
43847 <Type type="void"/>
43849 <Argument name="eventCallback">
43852 The method to be called when any change is made to the list of installed packages.
43855 <Type name="PackageInformationEventCallback"/>
43859 <RaiseException name="WebAPIException">
43862 with error type TypeMismatchError, if an input parameter is not compatible with the expected type for that parameter.
43865 with error type SecurityError, if the application does not have the privilege to call this method.
43868 with error type UnknownError, if the package list change event cannot be generated because of a platform error.
43874 <Operation name="unsetPackageInfoEventListener" id="::Package::PackageManager::unsetPackageInfoEventListener">
43875 <webidl> void unsetPackageInfoEventListener() raises(<ref>WebAPIException</ref>);</webidl>
43878 Unsets the listener to stop receiving package notifications.
43887 http://tizen.org/privilege/package.info
43889 <Code> tizen.package.unsetPackageInfoEventListener();
43892 <Type type="void"/>
43895 <RaiseException name="WebAPIException">
43898 with error type SecurityError, if the application does not have the privilege to call this method.
43901 with error type UnknownError, if the listener removal request fails because of a platform error.
43908 <Interface name="PackageInformation" id="::Package::PackageInformation">
43909 <webidl> [NoInterfaceObject] interface PackageInformation {
43911 readonly attribute <ref>PackageId</ref> id;
43914 readonly attribute DOMString name;
43917 readonly attribute DOMString iconPath;
43920 readonly attribute DOMString version;
43923 readonly attribute long totalSize;
43926 readonly attribute long dataSize;
43929 readonly attribute Date lastModified;
43932 readonly attribute DOMString author;
43935 readonly attribute DOMString description;
43938 readonly attribute <ref>ApplicationId</ref>[] appIds;
43943 This interface defines the general information available to an installed package.
43949 <ExtendedAttributeList>
43950 <ExtendedAttribute name="NoInterfaceObject">
43951 <webidl>NoInterfaceObject</webidl>
43952 </ExtendedAttribute>
43953 </ExtendedAttributeList>
43954 <Attribute readonly="readonly" name="id" id="::Package::PackageInformation::id">
43955 <webidl> readonly attribute <ref>PackageId</ref> id;</webidl>
43958 An attribute to store the identifier of a package.
43964 <Type name="PackageId"/>
43966 <Attribute readonly="readonly" name="name" id="::Package::PackageInformation::name">
43967 <webidl> readonly attribute DOMString name;</webidl>
43970 An attribute to store the package name.
43976 <Type type="DOMString"/>
43978 <Attribute readonly="readonly" name="iconPath" id="::Package::PackageInformation::iconPath">
43979 <webidl> readonly attribute DOMString iconPath;</webidl>
43982 An attribute to store the icon path of a package.
43988 <Type type="DOMString"/>
43990 <Attribute readonly="readonly" name="version" id="::Package::PackageInformation::version">
43991 <webidl> readonly attribute DOMString version;</webidl>
43994 An attribute to store the package version.
44000 <Type type="DOMString"/>
44002 <Attribute readonly="readonly" name="totalSize" id="::Package::PackageInformation::totalSize">
44003 <webidl> readonly attribute long totalSize;</webidl>
44006 An attribute to store the total installed size(package + data) of a package.
44012 <Type type="long"/>
44014 <Attribute readonly="readonly" name="dataSize" id="::Package::PackageInformation::dataSize">
44015 <webidl> readonly attribute long dataSize;</webidl>
44018 An attribute to store the current data size of a package.
44024 <Type type="long"/>
44026 <Attribute readonly="readonly" name="lastModified" id="::Package::PackageInformation::lastModified">
44027 <webidl> readonly attribute Date lastModified;</webidl>
44030 An attribute to store the latest installed or updated time of a package.
44036 <Type type="Date"/>
44038 <Attribute readonly="readonly" name="author" id="::Package::PackageInformation::author">
44039 <webidl> readonly attribute DOMString author;</webidl>
44042 An attribute to store the author of a package.
44048 <Type type="DOMString"/>
44050 <Attribute readonly="readonly" name="description" id="::Package::PackageInformation::description">
44051 <webidl> readonly attribute DOMString description;</webidl>
44054 An attribute to store the package description.
44060 <Type type="DOMString"/>
44062 <Attribute readonly="readonly" name="appIds" id="::Package::PackageInformation::appIds">
44063 <webidl> readonly attribute <ref>ApplicationId</ref>[] appIds;</webidl>
44066 An attribute to store the application ID list of a package.
44072 <Type type="array">
44073 <Type name="ApplicationId"/>
44077 <Interface name="PackageInformationArraySuccessCallback" id="::Package::PackageInformationArraySuccessCallback">
44078 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface PackageInformationArraySuccessCallback {
44081 void onsuccess(<ref>PackageInformation</ref>[] informationArray);
44085 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.
44089 It is used in <em>tizen.package.getPackagesInfo()</em>.
44096 <ExtendedAttributeList>
44097 <ExtendedAttribute name="Callback" value="FunctionOnly">
44098 <webidl>Callback</webidl>
44099 </ExtendedAttribute>
44100 <ExtendedAttribute name="NoInterfaceObject">
44101 <webidl> NoInterfaceObject</webidl>
44102 </ExtendedAttribute>
44103 </ExtendedAttributeList>
44104 <Operation name="onsuccess" id="::Package::PackageInformationArraySuccessCallback::onsuccess">
44105 <webidl> void onsuccess(<ref>PackageInformation</ref>[] informationArray);</webidl>
44108 Called when the asynchronous call completes successfully.
44114 <Type type="void"/>
44116 <Argument name="informationArray">
44119 A list of installed packages information.
44122 <Type type="array">
44123 <Type name="PackageInformation"/>
44129 <Interface name="PackageProgressCallback" id="::Package::PackageProgressCallback">
44130 <webidl> [Callback, NoInterfaceObject] interface PackageProgressCallback {
44133 void onprogress(<ref>PackageId</ref> id, short progress);
44136 void oncomplete(<ref>PackageId</ref> id);
44140 This callback interface specifies subscriptions for any notification on the progress or completion of requests.
44146 <ExtendedAttributeList>
44147 <ExtendedAttribute name="Callback">
44148 <webidl>Callback</webidl>
44149 </ExtendedAttribute>
44150 <ExtendedAttribute name="NoInterfaceObject">
44151 <webidl> NoInterfaceObject</webidl>
44152 </ExtendedAttribute>
44153 </ExtendedAttributeList>
44154 <Operation name="onprogress" id="::Package::PackageProgressCallback::onprogress">
44155 <webidl> void onprogress(<ref>PackageId</ref> id, short progress);</webidl>
44158 Called while the request is in progress.
44164 <Type type="void"/>
44166 <Argument name="id">
44172 <Type name="PackageId"/>
44174 <Argument name="progress">
44177 The progress in percentage.
44180 <Type type="short"/>
44184 <Operation name="oncomplete" id="::Package::PackageProgressCallback::oncomplete">
44185 <webidl> void oncomplete(<ref>PackageId</ref> id);</webidl>
44188 Called while the request is completed.
44194 <Type type="void"/>
44196 <Argument name="id">
44202 <Type name="PackageId"/>
44207 <Interface name="PackageInformationEventCallback" id="::Package::PackageInformationEventCallback">
44208 <webidl> [Callback, NoInterfaceObject] interface PackageInformationEventCallback {
44211 void oninstalled(<ref>PackageInformation</ref> info);
44214 void onupdated(<ref>PackageInformation</ref> info);
44217 void onuninstalled(<ref>PackageId</ref> id);
44221 This callback interface specifies methods that are invoked when a package is installed, updated, or uninstalled.
44227 <ExtendedAttributeList>
44228 <ExtendedAttribute name="Callback">
44229 <webidl>Callback</webidl>
44230 </ExtendedAttribute>
44231 <ExtendedAttribute name="NoInterfaceObject">
44232 <webidl> NoInterfaceObject</webidl>
44233 </ExtendedAttribute>
44234 </ExtendedAttributeList>
44235 <Operation name="oninstalled" id="::Package::PackageInformationEventCallback::oninstalled">
44236 <webidl> void oninstalled(<ref>PackageInformation</ref> info);</webidl>
44239 Called when a package is installed.
44245 <Type type="void"/>
44247 <Argument name="info">
44250 The information of the installed package
44253 <Type name="PackageInformation"/>
44257 <Operation name="onupdated" id="::Package::PackageInformationEventCallback::onupdated">
44258 <webidl> void onupdated(<ref>PackageInformation</ref> info);</webidl>
44261 Called when a package is updated.
44267 <Type type="void"/>
44269 <Argument name="info">
44272 The information of the updated package
44275 <Type name="PackageInformation"/>
44279 <Operation name="onuninstalled" id="::Package::PackageInformationEventCallback::onuninstalled">
44280 <webidl> void onuninstalled(<ref>PackageId</ref> id);</webidl>
44283 Called when a package is uninstalled.
44289 <Type type="void"/>
44291 <Argument name="id">
44294 The ID of the uninstalled package
44297 <Type name="PackageId"/>
44303 <Module name="Power" id="::Power">
44304 <webidl>module Power {
44306 enum PowerResource { "SCREEN", "CPU" };
44308 enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };
44310 enum PowerCpuState { "CPU_AWAKE" };
44312 typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;
44314 [NoInterfaceObject] interface PowerManagerObject {
44315 readonly attribute <ref>PowerManager</ref> power;
44317 <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;
44319 [NoInterfaceObject] interface PowerManager {
44320 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44322 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44324 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44326 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44328 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44330 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44332 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44334 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44336 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44338 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44341 [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44342 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44348 This API provides support for requesting power management related resource states.
44352 For more information on the Power features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/power.htm">Power Guide</a>.
44359 <Enum name="PowerResource" id="::Power::PowerResource">
44360 <webidl> enum PowerResource { "SCREEN", "CPU" };</webidl>
44363 An enumerator that defines power resources with values aligned with <em>SystemInfo </em>property values.
44367 We support screen and cpu resources for now.
44368 Supported power resource states are provided in PowerScreenState and PowerCpuState enums respectively prefixed by the corresponding resource type.
44375 <EnumValue stringvalue="SCREEN">
44376 <webidl> "SCREEN</webidl>
44378 <EnumValue stringvalue="CPU">
44379 <webidl> "CPU</webidl>
44382 <Enum name="PowerScreenState" id="::Power::PowerScreenState">
44383 <webidl> enum PowerScreenState { "SCREEN_OFF", "SCREEN_DIM", "SCREEN_NORMAL", "SCREEN_BRIGHT" };</webidl>
44386 An enumerator that indicates the power state for screen resource.
44390 The supported values are:
44394 SCREEN_OFF - This screen state cannot be requested but can only be used in the state change callback. </li>
44396 SCREEN_DIM - The minimal screen state is set to <em>DIM</em> and device does not change to <em>OFF</em> state automatically. </li>
44398 SCREEN_NORMAL - The minimal screen state is set to <em>NORMAL</em> and device does not change to <em>DIM</em> state automatically. </li>
44400 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>
44403 <em>DIM</em> state refers to the screen that the backlight is turned off
44404 <em>NORMAL</em> state refers to the default screen brightness that a user has configured for the device.
44405 <em>BRIGHT(Deprecated)</em> state refers to the maximum screen brightness that the device provides.
44406 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.
44410 SCREEN_BRIGHT is deprecated.
44416 <EnumValue stringvalue="SCREEN_OFF">
44417 <webidl> "SCREEN_OFF</webidl>
44419 <EnumValue stringvalue="SCREEN_DIM">
44420 <webidl> "SCREEN_DIM</webidl>
44422 <EnumValue stringvalue="SCREEN_NORMAL">
44423 <webidl> "SCREEN_NORMAL</webidl>
44425 <EnumValue stringvalue="SCREEN_BRIGHT">
44426 <webidl> "SCREEN_BRIGHT</webidl>
44429 <Enum name="PowerCpuState" id="::Power::PowerCpuState">
44430 <webidl> enum PowerCpuState { "CPU_AWAKE" };</webidl>
44433 An enumerator that indicates the power state for cpu resource.
44437 The supported values are:
44441 CPU_AWAKE - The cpu state is set to be awaken and it does not go to <em>SLEEP</em> state automatically. </li>
44448 <EnumValue stringvalue="CPU_AWAKE">
44449 <webidl> "CPU_AWAKE</webidl>
44452 <Typedef name="PowerState" id="::Power::PowerState">
44453 <webidl> typedef (<ref>PowerScreenState</ref> or <ref>PowerCpuState</ref>) PowerState;</webidl>
44456 The supported power states in general.
44457 It can be either a PowerScreenState or a PowerCpuState.
44463 <Type type="union">
44464 <Type name="PowerScreenState"/>
44465 <Type name="PowerCpuState"/>
44468 <Interface name="PowerManagerObject" id="::Power::PowerManagerObject">
44469 <webidl> [NoInterfaceObject] interface PowerManagerObject {
44470 readonly attribute <ref>PowerManager</ref> power;
44474 This interface defines what is instantiated by the <em>Tizen</em> object from the Tizen Platform.
44478 There will be a <em>tizen.power </em>object that allows accessing of a functionality of the Power API.
44485 <ExtendedAttributeList>
44486 <ExtendedAttribute name="NoInterfaceObject">
44487 <webidl>NoInterfaceObject</webidl>
44488 </ExtendedAttribute>
44489 </ExtendedAttributeList>
44490 <Attribute readonly="readonly" name="power" id="::Power::PowerManagerObject::power">
44491 <webidl> readonly attribute <ref>PowerManager</ref> power;</webidl>
44492 <Type name="PowerManager"/>
44495 <Implements name1="Tizen" name2="PowerManagerObject">
44496 <webidl> <ref>Tizen</ref> implements <ref>PowerManagerObject</ref>;</webidl>
44498 <Interface name="PowerManager" id="::Power::PowerManager">
44499 <webidl> [NoInterfaceObject] interface PowerManager {
44500 void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);
44502 void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);
44504 void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);
44506 void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);
44508 double getScreenBrightness() raises(<ref>WebAPIException</ref>);
44510 void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);
44512 boolean isScreenOn() raises(<ref>WebAPIException</ref>);
44514 void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);
44516 void turnScreenOn() raises(<ref>WebAPIException</ref>);
44518 void turnScreenOff() raises(<ref>WebAPIException</ref>);
44522 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.
44528 <ExtendedAttributeList>
44529 <ExtendedAttribute name="NoInterfaceObject">
44530 <webidl>NoInterfaceObject</webidl>
44531 </ExtendedAttribute>
44532 </ExtendedAttributeList>
44533 <Operation name="request" id="::Power::PowerManager::request">
44534 <webidl> void request(<ref>PowerResource</ref> resource, <ref>PowerState</ref> state) raises(<ref>WebAPIException</ref>);</webidl>
44537 Requests the minimum-state for a power resource.
44546 http://tizen.org/privilege/power
44548 <Code> tizen.power.request("SCREEN", "SCREEN_NORMAL");
44551 <Type type="void"/>
44553 <Argument name="resource">
44556 The power resource for which the request is made.
44559 <Type name="PowerResource"/>
44561 <Argument name="state">
44564 The minimal power state in which the power resource is desired to be.
44567 <Type name="PowerState"/>
44571 <RaiseException name="WebAPIException">
44574 with error type TypeMismatchError, if the input parameter is not
44575 compatible with the expected type.
44578 with error type NotSupportedError, if this feature is not supported.
44581 with error type InvalidValuesError, if any of the input
44582 parameters contain an invalid value.
44585 with error type SecurityError, if the application does not have the privilege to call this method.
44588 with error type UnknownError in any other error case.
44594 <Operation name="release" id="::Power::PowerManager::release">
44595 <webidl> void release(<ref>PowerResource</ref> resource) raises(<ref>WebAPIException</ref>);</webidl>
44598 Releases the power state request for the given resource.
44603 <Code> // Release SCREEN resource.
44604 tizen.power.release("SCREEN");
44607 <Type type="void"/>
44609 <Argument name="resource">
44612 The resource for which requests are to be removed.
44615 <Type name="PowerResource"/>
44619 <RaiseException name="WebAPIException">
44622 with error type TypeMismatchError, if the input parameter is not
44623 compatible with the expected type.
44626 with error type NotSupportedError, if this feature is not supported.
44629 with error type InvalidValuesError, if any of the input
44630 parameters contain an invalid value.
44633 with error type UnknownError in any other error case.
44639 <Operation name="setScreenStateChangeListener" id="::Power::PowerManager::setScreenStateChangeListener">
44640 <webidl> void setScreenStateChangeListener(<ref>ScreenStateChangeCallback</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
44643 Sets the screen state change callback and monitors its state changes.
44648 <Code> function onScreenStateChanged(previousState, changedState) {
44649 console.log("Screen state changed from " + previousState + " to " + changedState);
44652 // Set the screen state change listener.
44653 tizen.power.setScreenStateChangeListener(onScreenStateChanged);
44656 <Type type="void"/>
44658 <Argument name="listener">
44661 The screen state change callback.
44664 <Type name="ScreenStateChangeCallback"/>
44668 <RaiseException name="WebAPIException">
44671 with error type TypeMismatchError, if the input parameter is not
44672 compatible with the expected type.
44675 with error type NotSupportedError, if this feature is not supported.
44678 with error type InvalidValuesError, if any of the input
44679 parameters contain an invalid value.
44682 with error type UnknownError in any other error case.
44688 <Operation name="unsetScreenStateChangeListener" id="::Power::PowerManager::unsetScreenStateChangeListener">
44689 <webidl> void unsetScreenStateChangeListener() raises(<ref>WebAPIException</ref>);</webidl>
44692 Unsets the screen state change callback and stop monitoring it.
44697 <Code> // Unset the screen state change listener.
44698 tizen.power.unsetScreenStateChangeListener();
44701 <Type type="void"/>
44704 <RaiseException name="WebAPIException">
44707 with error type NotSupportedError, if this feature is not supported.
44710 with error type UnknownError in any other error case.
44716 <Operation name="getScreenBrightness" id="::Power::PowerManager::getScreenBrightness">
44717 <webidl> double getScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44720 Gets the screen brightness level of an application, from 0 to 1.
44725 <Code> // Get the current screen brightness value.
44726 var screenBrightness = tizen.power.getScreenBrightness();
44729 <Type type="double">
44732 double Current screen brightness value.
44738 <RaiseException name="WebAPIException">
44741 with error type NotSupportedError, if this feature is not supported.
44744 with error type UnknownError in any other error case.
44750 <Operation name="setScreenBrightness" id="::Power::PowerManager::setScreenBrightness">
44751 <webidl> void setScreenBrightness(double brightness) raises(<ref>WebAPIException</ref>);</webidl>
44754 Sets the screen brightness level for an application, from 0 to 1.
44758 An approximation is made for best effort when the given value is not exactly applicable by the hardware or system.
44768 http://tizen.org/privilege/power
44770 <Code> // Set the screen brightness value for the application.
44771 tizen.power.setScreenBrightness(1);
44774 <Type type="void"/>
44776 <Argument name="brightness">
44779 The screen brightness value to set.
44782 <Type type="double"/>
44786 <RaiseException name="WebAPIException">
44789 with error type TypeMismatchError, if the input parameter is not
44790 compatible with the expected type.
44793 with error type NotSupportedError, if this feature is not supported.
44796 with error type InvalidValuesError, if any of the input
44797 parameters contain an invalid value.
44800 with error type SecurityError, if the application does not have the privilege to call this method.
44803 with error type UnknownError in any other error case.
44809 <Operation name="isScreenOn" id="::Power::PowerManager::isScreenOn">
44810 <webidl> boolean isScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44813 Returns <var>true</var> if the screen is on.
44818 <Code> // Check whether the screen is on or off.
44819 var isScreenOn = tizen.power.isScreenOn();
44822 <Type type="boolean">
44825 boolean true if screen is on.
44831 <RaiseException name="WebAPIException">
44834 with error type NotSupportedError, if this feature is not supported.
44837 with error type UnknownError in any other error case.
44843 <Operation name="restoreScreenBrightness" id="::Power::PowerManager::restoreScreenBrightness">
44844 <webidl> void restoreScreenBrightness() raises(<ref>WebAPIException</ref>);</webidl>
44847 Restores the screen brightness to the system default setting value.
44852 <Code> // Restore the screen brightness value to the system default setting value.
44853 tizen.power.restoreScreenBrightness();
44856 <Type type="void"/>
44859 <RaiseException name="WebAPIException">
44862 with error type NotSupportedError, if this feature is not supported.
44865 with error type UnknownError in any other error case.
44871 <Operation name="turnScreenOn" id="::Power::PowerManager::turnScreenOn">
44872 <webidl> void turnScreenOn() raises(<ref>WebAPIException</ref>);</webidl>
44875 Turns on the screen.
44879 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.
44889 http://tizen.org/privilege/power
44891 <Code> // Turn on the screen.
44892 tizen.power.turnScreenOn();
44895 <Type type="void"/>
44898 <RaiseException name="WebAPIException">
44901 with error type NotSupportedError, if this feature is not supported.
44904 with error type SecurityError, if the application does not have the privilege to call this method.
44907 with error type UnknownError in any other error case.
44913 <Operation name="turnScreenOff" id="::Power::PowerManager::turnScreenOff">
44914 <webidl> void turnScreenOff() raises(<ref>WebAPIException</ref>);</webidl>
44917 Turns off the screen.
44921 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
44931 http://tizen.org/privilege/power
44933 <Code> // Turn off the screen.
44934 tizen.power.turnScreenOff();
44937 <Type type="void"/>
44940 <RaiseException name="WebAPIException">
44943 with error type NotSupportedError, if this feature is not supported.
44946 with error type SecurityError, if the application does not have the privilege to call this method.
44949 with error type UnknownError in any other error case.
44956 <Interface name="ScreenStateChangeCallback" id="::Power::ScreenStateChangeCallback">
44957 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ScreenStateChangeCallback {
44958 void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);
44962 This callback interface defines notification for the screen state changes.
44968 <ExtendedAttributeList>
44969 <ExtendedAttribute name="Callback" value="FunctionOnly">
44970 <webidl>Callback</webidl>
44971 </ExtendedAttribute>
44972 <ExtendedAttribute name="NoInterfaceObject">
44973 <webidl> NoInterfaceObject</webidl>
44974 </ExtendedAttribute>
44975 </ExtendedAttributeList>
44976 <Operation name="onchanged" id="::Power::ScreenStateChangeCallback::onchanged">
44977 <webidl> void onchanged(<ref>PowerScreenState</ref> previousState, <ref>PowerScreenState</ref> changedState);</webidl>
44980 Called on screen state change.
44986 <Type type="void"/>
44988 <Argument name="previousState">
44991 The previous screen state.
44994 <Type name="PowerScreenState"/>
44996 <Argument name="changedState">
44999 The changed screen state.
45002 <Type name="PowerScreenState"/>
45008 <Module name="Push" id="::Push">
45009 <webidl>module Push {
45011 typedef DOMString PushRegistrationId;
45014 [NoInterfaceObject] interface PushManagerObject {
45015 readonly attribute <ref>PushManager</ref> push;
45017 <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;
45020 [NoInterfaceObject] interface PushManager {
45022 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45023 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45026 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45027 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45030 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45033 void disconnectService() raises(<ref>WebAPIException</ref>);
45036 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45040 [NoInterfaceObject] interface PushMessage {
45042 readonly attribute DOMString appData;
45045 readonly attribute DOMString alertMessage;
45048 readonly attribute Date date;
45052 [Callback=FunctionOnly, NoInterfaceObject]
45053 interface PushRegisterSuccessCallback {
45055 void onsuccess(<ref>PushRegistrationId</ref> id);
45059 [Callback=FunctionOnly, NoInterfaceObject]
45060 interface PushNotificationCallback {
45062 void onsuccess(<ref>PushMessage</ref> message);
45067 This API provides the functionality for receiving push notifications
45068 from Tizen push server.
45069 The push service is a client daemon that maintains a permanent connection
45070 between your device and Tizen push server in order to process your registration
45071 and deregistration requests, deliver push notifications to applications on a device.
45075 If the application is connected, the push service passes the notification data over
45076 the connection. Otherwise, the push service posts UI notification with the data.
45077 It will be delivered when a user launches the application by selecting the posting.
45080 To receive push notifications, follow the steps below:
45084 Get administrative permission for an application on your device </li>
45086 Register the application </li>
45088 Connect to the push service </li>
45090 Get notification data </li>
45093 For more information on the Push features, see <a href="../../org.tizen.web.appprogramming/html/guide/communication_guide/push.htm">Push Guide</a>.
45099 <def-api-feature identifier="http://tizen.org/feature/network.push">
45103 To guarantee this application running on a device with Push feature, define below in the config file:
45109 <Typedef name="PushRegistrationId" id="::Push::PushRegistrationId">
45110 <webidl> typedef DOMString PushRegistrationId;</webidl>
45113 A push service registration identifier.
45119 <Type type="DOMString"/>
45121 <Interface name="PushManagerObject" id="::Push::PushManagerObject">
45122 <webidl> [NoInterfaceObject] interface PushManagerObject {
45123 readonly attribute <ref>PushManager</ref> push;
45127 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
45131 There will be a <em>tizen.push </em>object that allows access to the functionality of the Push API.
45138 <ExtendedAttributeList>
45139 <ExtendedAttribute name="NoInterfaceObject">
45140 <webidl>NoInterfaceObject</webidl>
45141 </ExtendedAttribute>
45142 </ExtendedAttributeList>
45143 <Attribute readonly="readonly" name="push" id="::Push::PushManagerObject::push">
45144 <webidl> readonly attribute <ref>PushManager</ref> push;</webidl>
45145 <Type name="PushManager"/>
45148 <Implements name1="Tizen" name2="PushManagerObject">
45149 <webidl> <ref>Tizen</ref> implements <ref>PushManagerObject</ref>;</webidl>
45151 <Interface name="PushManager" id="::Push::PushManager">
45152 <webidl> [NoInterfaceObject] interface PushManager {
45154 void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45155 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45158 void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45159 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45162 void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);
45165 void disconnectService() raises(<ref>WebAPIException</ref>);
45168 <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);
45172 This interface provides methods to manage push registration and notification.
45178 <ExtendedAttributeList>
45179 <ExtendedAttribute name="NoInterfaceObject">
45180 <webidl>NoInterfaceObject</webidl>
45181 </ExtendedAttribute>
45182 </ExtendedAttributeList>
45183 <Operation name="registerService" id="::Push::PushManager::registerService">
45184 <webidl> void registerService(<ref>ApplicationControl</ref> appControl, <ref>PushRegisterSuccessCallback</ref> successCallback,
45185 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45188 Registers an application to the Tizen push server.
45191 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>.
45195 The <em>ErrorCallback()</em> is launched with these error types:
45199 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
45201 UnknownError - If any other error occurs. </li>
45211 http://tizen.org/privilege/push
45213 <Code> // Defines the data to be used when this process is launched by notification service.
45214 var service = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/push_test");
45216 // Defines the error callback.
45217 function errorCallback(response) {
45218 console.log( 'The following error occurred: ' + response.name);
45221 // Defines the registration success callback
45222 function registerSuccessCallback(id) {
45223 console.log("Registration succeeded with id: " + id);
45226 // Requests registration.
45227 tizen.push.registerService(service, registerSuccessCallback, errorCallback);
45230 <Type type="void"/>
45232 <Argument name="appControl">
45235 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>.
45238 <Type name="ApplicationControl"/>
45240 <Argument name="successCallback">
45243 The method to be called when the registration request succeeds.
45246 <Type name="PushRegisterSuccessCallback"/>
45248 <Argument optional="optional" name="errorCallback">
45251 The method to be called when the registration request fails.
45254 <Type name="ErrorCallback" nullable="nullable"/>
45258 <RaiseException name="WebAPIException">
45261 with error type TypeMismatchError, if any input parameter
45262 is not compatible with the expected type for that parameter.
45265 with error type InvalidValuesError, if any input parameters
45266 does not contain a valid value.
45269 with error type SecurityError, if the application does not have the privilege to call this method.
45272 with error type NotSupportedError, if this feature is not supported.
45275 with error type UnknownError, if any other error occurs.
45281 <Operation name="unregisterService" id="::Push::PushManager::unregisterService">
45282 <webidl> void unregisterService(optional <ref>SuccessCallback</ref>? successCallback,
45283 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45286 Unregisters an application from the Tizen push server.
45290 The <em>ErrorCallback()</em> is launched with these error types:
45294 UnknownError - If an unknown error occurs. </li>
45304 http://tizen.org/privilege/push
45306 <Code> // Defines the error callback
45307 function errorCallback(response) {
45308 console.log( 'The following error occurred: ' + response.name);
45311 // Defines the unregistration success callback
45312 function unregisterSuccessCallback() {
45313 console.log("Unregistration succeeded.");
45316 // Requests unregistration
45317 tizen.push.unregisterService(unregisterSuccessCallback, errorCallback);
45320 <Type type="void"/>
45322 <Argument optional="optional" name="successCallback">
45325 The method to be called when the request is successfully unregistered.
45328 <Type name="SuccessCallback" nullable="nullable"/>
45330 <Argument optional="optional" name="errorCallback">
45333 The method to be called when the unregistration request fails.
45336 <Type name="ErrorCallback" nullable="nullable"/>
45340 <RaiseException name="WebAPIException">
45343 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45346 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45349 with error type SecurityError, if the application does not have the privilege to call this method.
45352 with error type NotSupportedError, if this feature is not supported.
45355 with error type UnknownError, if any other error occurs.
45361 <Operation name="connectService" id="::Push::PushManager::connectService">
45362 <webidl> void connectService(<ref>PushNotificationCallback</ref> notificationCallback) raises(<ref>WebAPIException</ref>);</webidl>
45365 Connects to the push service and receives push notifications.
45374 http://tizen.org/privilege/push
45376 <Code> // Defines the connect success callback
45377 function notificationCallback(noti) {
45378 console.log("Notification received with alert message: " + noti.alertMessage);
45381 // Requests for push service connection
45382 tizen.push.connectService(notificationCallback, errorCallback);
45385 <Type type="void"/>
45387 <Argument name="notificationCallback">
45390 The method to be called when the notification message arrives.
45393 <Type name="PushNotificationCallback"/>
45397 <RaiseException name="WebAPIException">
45400 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
45403 with error type InvalidValuesError, if any input parameters does not contain a valid value.
45406 with error type SecurityError, if the application does not have the privilege to call this method.
45409 with error type NotSupportedError, if this feature is not supported.
45412 with error type UnknownError, if any other error occurs.
45418 <Operation name="disconnectService" id="::Push::PushManager::disconnectService">
45419 <webidl> void disconnectService() raises(<ref>WebAPIException</ref>);</webidl>
45422 Disconnects to the push service and stop receiving push notifications.
45431 http://tizen.org/privilege/push
45433 <Code> // Requests disconnection
45434 tizen.push.disconnectService();
45437 <Type type="void"/>
45440 <RaiseException name="WebAPIException">
45443 with error type SecurityError, if the application does not have the privilege to call this method.
45446 with error type NotSupportedError, if this feature is not supported.
45449 with error type UnknownError, if any other error occurs.
45455 <Operation name="getRegistrationId" id="::Push::PushManager::getRegistrationId">
45456 <webidl> <ref>PushRegistrationId</ref> getRegistrationId() raises(<ref>WebAPIException</ref>);</webidl>
45459 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.
45468 http://tizen.org/privilege/push
45470 <Code> var registrationId = tizen.push.getRegistrationId();
45471 if ( registrationId != NULL ) {
45472 console.log("The registration id: " + registrationId);
45476 <Type name="PushRegistrationId"/>
45479 <RaiseException name="WebAPIException">
45482 with error type SecurityError, if the application does not have the privilege to call this method.
45485 with error type NotSupportedError, if this feature is not supported.
45488 with error type UnknownError, if any other error occurs.
45495 <Interface name="PushMessage" id="::Push::PushMessage">
45496 <webidl> [NoInterfaceObject] interface PushMessage {
45498 readonly attribute DOMString appData;
45501 readonly attribute DOMString alertMessage;
45504 readonly attribute Date date;
45508 This interface specifies the push message that is delivered from the push service.
45514 <ExtendedAttributeList>
45515 <ExtendedAttribute name="NoInterfaceObject">
45516 <webidl>NoInterfaceObject</webidl>
45517 </ExtendedAttribute>
45518 </ExtendedAttributeList>
45519 <Attribute readonly="readonly" name="appData" id="::Push::PushMessage::appData">
45520 <webidl> readonly attribute DOMString appData;</webidl>
45523 An attribute to store the push notification data.
45527 This data is the message that the sender wants to send and its length must be less than 1 KB.
45534 <Type type="DOMString"/>
45536 <Attribute readonly="readonly" name="alertMessage" id="::Push::PushMessage::alertMessage">
45537 <webidl> readonly attribute DOMString alertMessage;</webidl>
45540 An attribute to store the push notification message that is displayed as an alert message to the user.
45546 <Type type="DOMString"/>
45548 <Attribute readonly="readonly" name="date" id="::Push::PushMessage::date">
45549 <webidl> readonly attribute Date date;</webidl>
45552 An attribute to store the date/time when a push notification message is received.
45558 <Type type="Date"/>
45561 <Interface name="PushRegisterSuccessCallback" id="::Push::PushRegisterSuccessCallback">
45562 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45563 interface PushRegisterSuccessCallback {
45565 void onsuccess(<ref>PushRegistrationId</ref> id);
45569 This interface specifies the success callback for push service registration request.
45573 This success callback is invoked when a push service registration request is successful.
45580 <ExtendedAttributeList>
45581 <ExtendedAttribute name="Callback" value="FunctionOnly">
45582 <webidl>Callback</webidl>
45583 </ExtendedAttribute>
45584 <ExtendedAttribute name="NoInterfaceObject">
45585 <webidl> NoInterfaceObject</webidl>
45586 </ExtendedAttribute>
45587 </ExtendedAttributeList>
45588 <Operation name="onsuccess" id="::Push::PushRegisterSuccessCallback::onsuccess">
45589 <webidl> void onsuccess(<ref>PushRegistrationId</ref> id);</webidl>
45592 Called when a push service registration request is successful.
45598 <Type type="void"/>
45600 <Argument name="id">
45603 The registration ID.
45606 <Type name="PushRegistrationId"/>
45611 <Interface name="PushNotificationCallback" id="::Push::PushNotificationCallback">
45612 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
45613 interface PushNotificationCallback {
45615 void onsuccess(<ref>PushMessage</ref> message);
45619 This interface specifies the notification callback for the received push notification message.
45623 This notification callback is invoked when the push notification message arrives.
45630 <ExtendedAttributeList>
45631 <ExtendedAttribute name="Callback" value="FunctionOnly">
45632 <webidl>Callback</webidl>
45633 </ExtendedAttribute>
45634 <ExtendedAttribute name="NoInterfaceObject">
45635 <webidl> NoInterfaceObject</webidl>
45636 </ExtendedAttribute>
45637 </ExtendedAttributeList>
45638 <Operation name="onsuccess" id="::Push::PushNotificationCallback::onsuccess">
45639 <webidl> void onsuccess(<ref>PushMessage</ref> message);</webidl>
45642 Called when the push notification message arrives.
45648 <Type type="void"/>
45650 <Argument name="message">
45653 The received push notification message.
45656 <Type name="PushMessage"/>
45662 <Module name="SecureElement" id="::SecureElement">
45663 <webidl>module SecureElement {
45665 [NoInterfaceObject] interface SEServiceManagerObject {
45666 readonly attribute <ref>SEService</ref> seService;
45668 <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;
45671 [NoInterfaceObject] interface SEService
45674 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45676 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45678 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45681 void shutdown() raises(<ref>WebAPIException</ref>);
45685 [NoInterfaceObject] interface Reader
45688 readonly attribute boolean isPresent;
45690 DOMString getName() raises(<ref>WebAPIException</ref>);
45692 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45694 void closeSessions() raises(<ref>WebAPIException</ref>);
45697 [NoInterfaceObject] interface Session
45700 readonly attribute boolean isClosed;
45702 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45704 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45706 byte[] getATR() raises(<ref>WebAPIException</ref>);
45708 void close() raises(<ref>WebAPIException</ref>);
45710 void closeChannels() raises(<ref>WebAPIException</ref>);
45714 [NoInterfaceObject] interface Channel {
45716 readonly attribute boolean isBasicChannel;
45718 void close() raises(<ref>WebAPIException</ref>);
45721 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45725 [Callback, NoInterfaceObject] interface SEChangeListener {
45727 void onSEReady(<ref>Reader</ref> reader);
45729 void onSENotReady(<ref>Reader</ref> reader);
45733 [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
45735 void onsuccess(<ref>Reader</ref>[] readers);
45739 [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
45741 void onsuccess(<ref>Session</ref> session);
45745 [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
45747 void onsuccess(<ref>Channel</ref> channel);
45751 [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
45753 void onsuccess(byte[] response);
45758 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.
45762 This API provides functionality to communicate with applications in several Secure Elements.
45768 <def-api-feature identifier="http://tizen.org/feature/network.secure_element">
45772 To guarantee this application running on a device with SecureElement feature, define below in the config file:
45778 <Interface name="SEServiceManagerObject" id="::SecureElement::SEServiceManagerObject">
45779 <webidl> [NoInterfaceObject] interface SEServiceManagerObject {
45780 readonly attribute <ref>SEService</ref> seService;
45784 Defines what is instantiated by the Tizen object from the Tizen Platform.
45788 There is a <em>tizen.seService</em> object that allows access to the functionalities of the Secure Element API.
45795 <ExtendedAttributeList>
45796 <ExtendedAttribute name="NoInterfaceObject">
45797 <webidl>NoInterfaceObject</webidl>
45798 </ExtendedAttribute>
45799 </ExtendedAttributeList>
45800 <Attribute readonly="readonly" name="seService" id="::SecureElement::SEServiceManagerObject::seService">
45801 <webidl> readonly attribute <ref>SEService</ref> seService;</webidl>
45802 <Type name="SEService"/>
45805 <Implements name1="Tizen" name2="SEServiceManagerObject">
45806 <webidl> <ref>Tizen</ref> implements <ref>SEServiceManagerObject</ref>;</webidl>
45808 <Interface name="SEService" id="::SecureElement::SEService">
45809 <webidl> [NoInterfaceObject] interface SEService
45812 void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
45814 unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);
45816 void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);
45819 void shutdown() raises(<ref>WebAPIException</ref>);
45823 This interface provides access to the available Secure Element readers.
45827 It provides access to the API functionalities through the <em>tizen.seService</em> interface.
45834 <ExtendedAttributeList>
45835 <ExtendedAttribute name="NoInterfaceObject">
45836 <webidl>NoInterfaceObject</webidl>
45837 </ExtendedAttribute>
45838 </ExtendedAttributeList>
45839 <Operation name="getReaders" id="::SecureElement::SEService::getReaders">
45840 <webidl> void getReaders(<ref>ReaderArraySuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
45843 Gets all the available Secure Element readers.
45847 The ErrorCallback is launched with these error types:
45851 UnknownError - If any error occurs during retrieval. </li>
45858 http://tizen.org/privilege/secureelement
45864 function success(readers) {
45865 for (var i = 0; i < readers.length; i++) {
45866 if (readers[i].isPresent) {
45867 console.log ("Reader Name : " + readers[i].getName());
45871 function error(err) {
45872 console.log (err.name + ": " + err.message);
45874 tizen.seService.getReaders(success, error);
45876 console.log (err.name + ": " + err.message);
45880 <Type type="void"/>
45882 <Argument name="successCallback">
45885 The method to be invoked when the list of available Secure Element readers has been successfully retrieved
45888 <Type name="ReaderArraySuccessCallback"/>
45890 <Argument optional="optional" name="errorCallback">
45893 The method to call when an error occurs
45896 <Type name="ErrorCallback" nullable="nullable"/>
45900 <RaiseException name="WebAPIException">
45903 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45906 with error type SecurityError, if the application does not have the privilege to call this method.
45912 <Operation name="registerSEListener" id="::SecureElement::SEService::registerSEListener">
45913 <webidl> unsigned long registerSEListener(<ref>SEChangeListener</ref> listener) raises(<ref>WebAPIException</ref>);</webidl>
45916 Registers a callback function that is invoked when an available Secure Element reader is detected.
45922 http://tizen.org/privilege/secureelement
45928 var seListener = tizen.seService.registerSEListener({
45929 onSEReady:function(reader) {
45930 console.log (reader.getName() + "is ready.");
45931 }, onSENotReady:function(reader) {
45932 console.log (reader.getName() + "is not ready.");
45935 console.log (err.name + ": " + err.message);
45939 <Type type="unsigned long">
45942 unsigned long An identifier used to clear the watch subscription.
45947 <Argument name="listener">
45950 A listener to be invoked for successful detection of available Secure Element readers.
45953 <Type name="SEChangeListener"/>
45957 <RaiseException name="WebAPIException">
45960 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
45963 with error type SecurityError, if the application does not have the privilege to call this method.
45966 with error type UnknownError, if any other error occurs.
45972 <Operation name="unregisterSEListener" id="::SecureElement::SEService::unregisterSEListener">
45973 <webidl> void unregisterSEListener(unsigned long id) raises(<ref>WebAPIException</ref>);</webidl>
45976 Unregisters the listener from notifying any detection of an available Secure Element reader.
45982 http://tizen.org/privilege/secureelement
45987 <Code> var seListener; //seListener obtained from registerSEListener
45989 tizen.seService.unregisterSEListener(seListener);
45991 console.log (err.name + ": " + err.message);
45995 <Type type="void"/>
45997 <Argument name="id">
46000 A subscription identifier that is returned by the <em>registerSEListener()</em> method.
46003 <Type type="unsigned long"/>
46007 <RaiseException name="WebAPIException">
46010 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46013 with error type InvalidValuesError, if any of the input parameters contains an invalid value.
46016 with error type SecurityError, if the application does not have the privilege to call this method.
46019 with error type UnknownError, if any other error occurs.
46025 <Operation name="shutdown" id="::SecureElement::SEService::shutdown">
46026 <webidl> void shutdown() raises(<ref>WebAPIException</ref>);</webidl>
46029 Shuts down Secure Elements after releasing all resources.
46035 http://tizen.org/privilege/secureelement
46041 tizen.seService.shutdown();
46043 console.log (err.name + ": " + err.message);
46047 <Type type="void"/>
46050 <RaiseException name="WebAPIException">
46053 with error type SecurityError, if the application does not have the privilege to call this method.
46056 with error type UnknownError, if any other error occurs.
46063 <Interface name="Reader" id="::SecureElement::Reader">
46064 <webidl> [NoInterfaceObject] interface Reader
46067 readonly attribute boolean isPresent;
46069 DOMString getName() raises(<ref>WebAPIException</ref>);
46071 void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46073 void closeSessions() raises(<ref>WebAPIException</ref>);
46077 Reader interface that is connected to this device.
46081 This interface offers methods to control sessions on the reader.
46088 <ExtendedAttributeList>
46089 <ExtendedAttribute name="NoInterfaceObject">
46090 <webidl>NoInterfaceObject</webidl>
46091 </ExtendedAttribute>
46092 </ExtendedAttributeList>
46093 <Attribute readonly="readonly" name="isPresent" id="::SecureElement::Reader::isPresent">
46094 <webidl> readonly attribute boolean isPresent;</webidl>
46097 An attribute to check whether a Secure Element is present on a reader.
46103 <Type type="boolean"/>
46105 <Operation name="getName" id="::SecureElement::Reader::getName">
46106 <webidl> DOMString getName() raises(<ref>WebAPIException</ref>);</webidl>
46109 Gets reader's name.
46115 http://tizen.org/privilege/secureelement
46121 function success(readers) {
46122 for (var i = 0; i < readers.length; i++) {
46123 if (readers[i].isPresent) {
46124 console.log ("Reader Name : " + readers[i].getName());
46128 function error(err) {
46129 console.log (err.name + ": " + err.message);
46131 tizen.seService.getReaders(success, error);
46133 console.log (err.name + ": " + err.message);
46137 <Type type="DOMString">
46140 DOMString The name of the reader.
46146 <RaiseException name="WebAPIException">
46149 with error type SecurityError, if the application does not have the privilege to call this method.
46152 with error type UnknownError, if any other error occurs.
46158 <Operation name="openSession" id="::SecureElement::Reader::openSession">
46159 <webidl> void openSession(<ref>SessionSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46162 Opens a session on a reader.
46166 The ErrorCallback is launched with these error types:
46170 IOError - An error occurred in communication with the Secure Element in this reader. </li>
46172 InvalidStateError - If a Secure Element is not present on this reader. </li>
46174 UnknownError - If any other error occurs. </li>
46181 http://tizen.org/privilege/secureelement
46187 function success(session) {
46188 console.log ("Open Session Success : " + !session.isClosed);
46190 function error(err) {
46191 console.log (err.name + ": " + err.message);
46193 reader.openSession(success, error);
46195 console.log (err.name + ": " + err.message);
46199 <Type type="void"/>
46201 <Argument name="successCallback">
46204 The method to be invoked when a session has been successfully opened
46207 <Type name="SessionSuccessCallback"/>
46209 <Argument optional="optional" name="errorCallback">
46212 The method to be called when an error occurs
46215 <Type name="ErrorCallback" nullable="nullable"/>
46219 <RaiseException name="WebAPIException">
46222 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46225 with error type SecurityError, if the application does not have the privilege to call this method.
46231 <Operation name="closeSessions" id="::SecureElement::Reader::closeSessions">
46232 <webidl> void closeSessions() raises(<ref>WebAPIException</ref>);</webidl>
46235 Closes all sessions opened on a reader.
46241 http://tizen.org/privilege/secureelement
46247 reader.closeSessions();
46249 console.log (err.name + ": " + err.message);
46253 <Type type="void"/>
46256 <RaiseException name="WebAPIException">
46259 with error type SecurityError, if the application does not have the privilege to call this method.
46262 with error type UnknownError in any other error case.
46269 <Interface name="Session" id="::SecureElement::Session">
46270 <webidl> [NoInterfaceObject] interface Session
46273 readonly attribute boolean isClosed;
46275 void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46277 void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46279 byte[] getATR() raises(<ref>WebAPIException</ref>);
46281 void close() raises(<ref>WebAPIException</ref>);
46283 void closeChannels() raises(<ref>WebAPIException</ref>);
46287 This interface is connected to one of the readers and offers methods to control channels in a session.
46293 <ExtendedAttributeList>
46294 <ExtendedAttribute name="NoInterfaceObject">
46295 <webidl>NoInterfaceObject</webidl>
46296 </ExtendedAttribute>
46297 </ExtendedAttributeList>
46298 <Attribute readonly="readonly" name="isClosed" id="::SecureElement::Session::isClosed">
46299 <webidl> readonly attribute boolean isClosed;</webidl>
46302 An attribute to check whether a session is closed or not.
46308 <Type type="boolean"/>
46310 <Operation name="openBasicChannel" id="::SecureElement::Session::openBasicChannel">
46311 <webidl> void openBasicChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46314 Opens a basic channel in a session.
46315 The basic channel (defined in the ISO7816-4 specification) is opened by default and its channel ID is <var>0</var>.
46316 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.
46317 Some Secure Elements might always deny opening a basic channel.
46321 The ErrorCallback is launched with these error types:
46325 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46327 SecurityError - If access to this AID or the default application on this session is not allowed . </li>
46329 InvalidStateError - If this session is closed. </li>
46331 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46333 NoChannelError - If basic channel is unavailable. </li>
46335 UnknownError - If any other error occurs. </li>
46342 http://tizen.org/privilege/secureelement
46348 function successChannel(channel) {
46349 if (channel.isBasicChannel) {
46350 console.log ("Basic channel is opened.");
46352 console.log ("Logical channel is opened.");
46355 function errorChannel(err) {
46356 console.log ("openBasicChannel Error :" + err.name +": " + err.message);
46359 function successSession(session) {
46360 console.log ("Open Session Success : " + !session.isClosed);
46361 // This aid is for test. Use aid for your applet in secure element.
46362 session.openBasicChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46364 function errorSession(err) {
46365 console.log ("openSession Error : " + err.name + ": " + err.message);
46367 reader.openSession(successSession, errorSession);
46369 console.log (err.name + ": " + err.message);
46373 <Type type="void"/>
46375 <Argument name="aid">
46378 The id of the applet to select on this channel.<br/>If the array is empty, the default applet is selected in this session.
46381 <Type type="array">
46382 <Type type="byte"/>
46385 <Argument name="successCallback">
46388 The method to be invoked when a basic channel has been successfully opened
46391 <Type name="ChannelSuccessCallback"/>
46393 <Argument optional="optional" name="errorCallback">
46396 The method to be called when an error occurs
46399 <Type name="ErrorCallback" nullable="nullable"/>
46403 <RaiseException name="WebAPIException">
46406 with error type TypeMismatchError, if the input parameter
46407 is not compatible with the expected type for that parameter.
46410 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46413 with error type SecurityError, if the application does not have the privilege to call this method.
46419 <Operation name="openLogicalChannel" id="::SecureElement::Session::openLogicalChannel">
46420 <webidl> void openLogicalChannel(byte[] aid, <ref>ChannelSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46423 Opens a logical channel in a session by the specified applet id.
46424 The logical channel is defined in the ISO7816-4 specification.
46428 The ErrorCallback is launched with these error types:
46432 IOError - If an error occurs while communicating with the Secure Element in the reader. </li>
46434 SecurityError - If access to this AID or the default application in this session is not allowed. </li>
46436 InvalidStateError - If this session is closed. </li>
46438 NotFoundError - If the application of the AID does not exist in the Secure Element. </li>
46440 NoChannelError - If logical channel is unavailable. </li>
46442 UnknownError - If any other error occurs. </li>
46449 http://tizen.org/privilege/secureelement
46454 <Code> var session; //Session obtained from openSession callback
46456 function successChannel(channel) {
46457 if (channel.isBasicChannel) {
46458 console.log ("Basic channel is opened.");
46460 console.log ("Logical channel is opened.");
46463 function errorChannel(err) {
46464 console.log ("openLogicalChannel Error :" + err.name + ": " + err.message);
46467 // This aid is for test. Use aid for your applet in secure element.
46468 session.openLogicalChannel([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe], successChannel, errorChannel);
46470 console.log (err.name + ": " + err.message);
46474 <Type type="void"/>
46476 <Argument name="aid">
46479 The id of the applet to select on this channel<br/>If the array is empty, the default application is selected in this session.
46482 <Type type="array">
46483 <Type type="byte"/>
46486 <Argument name="successCallback">
46489 The method to be invoked when a logical channel has been successfully opened
46492 <Type name="ChannelSuccessCallback"/>
46494 <Argument optional="optional" name="errorCallback">
46497 The method to be called when an error occurs
46500 <Type name="ErrorCallback" nullable="nullable"/>
46504 <RaiseException name="WebAPIException">
46507 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46510 with error type InvalidValuesError, if the AID's length is not within the limit: 5 to 16(inclusive).
46513 with error type SecurityError, if the application does not have the privilege to call this method.
46519 <Operation name="getATR" id="::SecureElement::Session::getATR">
46520 <webidl> byte[] getATR() raises(<ref>WebAPIException</ref>);</webidl>
46523 Gets the answer to reset(ATR) of a Secure Element.
46529 http://tizen.org/privilege/secureelement
46534 <Code> var session; //Session obtained from openSession callback
46536 var atr = session.getATR();
46538 console.log (err.name + ": " + err.message);
46542 <Type type="array">
46545 byte[] The ATR of a Secure Element.
46548 <Type type="byte"/>
46552 <RaiseException name="WebAPIException">
46555 with error type SecurityError, if the application does not have the privilege to call this method.
46558 with error type UnknownError, if any other error occurs.
46564 <Operation name="close" id="::SecureElement::Session::close">
46565 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46574 http://tizen.org/privilege/secureelement
46579 <Code> var session; //Session obtained from openSession callback
46583 console.log (err.name + ": " + err.message);
46587 <Type type="void"/>
46590 <RaiseException name="WebAPIException">
46593 with error type SecurityError, if the application does not have the privilege to call this method.
46596 with error type UnknownError, if any other error occurs.
46602 <Operation name="closeChannels" id="::SecureElement::Session::closeChannels">
46603 <webidl> void closeChannels() raises(<ref>WebAPIException</ref>);</webidl>
46606 Closes all channels on this session.
46612 http://tizen.org/privilege/secureelement
46617 <Code> var session; //Session obtained from openSession callback
46619 session.closeChannels();
46621 console.log (err.name + ": " + err.message);
46625 <Type type="void"/>
46628 <RaiseException name="WebAPIException">
46631 with error type SecurityError, if the application does not have the privilege to call this method.
46634 with error type UnknownError in any other error case.
46641 <Interface name="Channel" id="::SecureElement::Channel">
46642 <webidl> [NoInterfaceObject] interface Channel {
46644 readonly attribute boolean isBasicChannel;
46646 void close() raises(<ref>WebAPIException</ref>);
46649 void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
46653 This interface is open to a Secure Element and offers methods to send Application Protocol Data Units(APDU) to the Secure Element.
46654 The channel is defined in the ISO7816-4.
46660 <ExtendedAttributeList>
46661 <ExtendedAttribute name="NoInterfaceObject">
46662 <webidl>NoInterfaceObject</webidl>
46663 </ExtendedAttribute>
46664 </ExtendedAttributeList>
46665 <Attribute readonly="readonly" name="isBasicChannel" id="::SecureElement::Channel::isBasicChannel">
46666 <webidl> readonly attribute boolean isBasicChannel;</webidl>
46669 An attribute to check whether it is a basic channel or not.
46675 <Type type="boolean"/>
46677 <Operation name="close" id="::SecureElement::Channel::close">
46678 <webidl> void close() raises(<ref>WebAPIException</ref>);</webidl>
46687 http://tizen.org/privilege/secureelement
46692 <Code> var channel; //Obtained from openLogicalChannel or openBasicChannel
46696 console.log (err.name + ": " + err.message);
46700 <Type type="void"/>
46703 <RaiseException name="WebAPIException">
46706 with error type SecurityError, if the application does not have the privilege to call this method.
46709 with error type UnknownError, if any other error occurs.
46715 <Operation name="transmit" id="::SecureElement::Channel::transmit">
46716 <webidl> void transmit(byte[] command, <ref>TransmitSuccessCallback</ref> successCallback, optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
46719 Transmits an APDU command to a Secure Element. The APDU command is defined in ISO7816-4.
46723 Some commands that are not allowed to be sent are:
46727 MANAGE_CHANNEL commands. </li>
46729 SELECT by DF Name (p1=04). </li>
46731 The commands that CLA bytes with channel numbers are de-masked. </li>
46734 The ErrorCallback is launched with these error types:
46738 InvalidValuesError - If the command contain an invalid value. </li>
46740 IOError - An error occurred while communicating with the Secure Element in the reader. </li>
46742 SecurityError - If the command is not allowed. </li>
46744 InvalidStateError - If this channel is closed. </li>
46746 UnknownError - If any other error occurs. </li>
46753 http://tizen.org/privilege/secureelement
46759 <Type type="void"/>
46761 <Argument name="command">
46764 The APDU command to transmit through this channel
46767 <Type type="array">
46768 <Type type="byte"/>
46771 <Argument name="successCallback">
46774 The method to be invoked when a command has been successfully transmitted
46777 <Type name="TransmitSuccessCallback"/>
46779 <Argument optional="optional" name="errorCallback">
46782 The method to be called when an error occurs
46785 <Type name="ErrorCallback" nullable="nullable"/>
46789 <RaiseException name="WebAPIException">
46792 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
46795 with error type SecurityError, if the application does not have the privilege to call this method.
46802 <Interface name="SEChangeListener" id="::SecureElement::SEChangeListener">
46803 <webidl> [Callback, NoInterfaceObject] interface SEChangeListener {
46805 void onSEReady(<ref>Reader</ref> reader);
46807 void onSENotReady(<ref>Reader</ref> reader);
46811 This interface provides the success callback that is invoked when a Secure Element reader is detected or lost.
46815 It is used in <em>SEService.registerSEListener()</em>.
46822 <ExtendedAttributeList>
46823 <ExtendedAttribute name="Callback">
46824 <webidl>Callback</webidl>
46825 </ExtendedAttribute>
46826 <ExtendedAttribute name="NoInterfaceObject">
46827 <webidl> NoInterfaceObject</webidl>
46828 </ExtendedAttribute>
46829 </ExtendedAttributeList>
46830 <Operation name="onSEReady" id="::SecureElement::SEChangeListener::onSEReady">
46831 <webidl> void onSEReady(<ref>Reader</ref> reader);</webidl>
46834 Called when a Secure Element reader is detected.
46840 <Type type="void"/>
46842 <Argument name="reader">
46845 A newly detected Secure Element reader
46848 <Type name="Reader"/>
46852 <Operation name="onSENotReady" id="::SecureElement::SEChangeListener::onSENotReady">
46853 <webidl> void onSENotReady(<ref>Reader</ref> reader);</webidl>
46856 Called when a Secure Element reader is lost.
46862 <Type type="void"/>
46864 <Argument name="reader">
46867 A lost Secure Element reader
46870 <Type name="Reader"/>
46875 <Interface name="ReaderArraySuccessCallback" id="::SecureElement::ReaderArraySuccessCallback">
46876 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ReaderArraySuccessCallback {
46878 void onsuccess(<ref>Reader</ref>[] readers);
46882 This callback interface provides a success callback that is invoked when a list of available Secure Element readers is retrieved.
46886 It specifies a success method with an array of <em>Reader</em> objects as an input parameter.
46887 It is used in asynchronous operations such as <em>SEService.getReaders()</em>.
46894 <ExtendedAttributeList>
46895 <ExtendedAttribute name="Callback" value="FunctionOnly">
46896 <webidl>Callback</webidl>
46897 </ExtendedAttribute>
46898 <ExtendedAttribute name="NoInterfaceObject">
46899 <webidl> NoInterfaceObject</webidl>
46900 </ExtendedAttribute>
46901 </ExtendedAttributeList>
46902 <Operation name="onsuccess" id="::SecureElement::ReaderArraySuccessCallback::onsuccess">
46903 <webidl> void onsuccess(<ref>Reader</ref>[] readers);</webidl>
46906 Called when an asynchronous call completes successfully.
46912 <Type type="void"/>
46914 <Argument name="readers">
46917 A list of available Secure Element readers
46920 <Type type="array">
46921 <Type name="Reader"/>
46927 <Interface name="SessionSuccessCallback" id="::SecureElement::SessionSuccessCallback">
46928 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SessionSuccessCallback {
46930 void onsuccess(<ref>Session</ref> session);
46934 This interface specifies the success callback that is invoked when a session on a specific reader is open.
46938 This callback interface specifies a success method with a <em>Session</em> object as an input parameter.
46939 It is used in asynchronous operations such as <em>Reader.openSession()</em>.
46946 <ExtendedAttributeList>
46947 <ExtendedAttribute name="Callback" value="FunctionOnly">
46948 <webidl>Callback</webidl>
46949 </ExtendedAttribute>
46950 <ExtendedAttribute name="NoInterfaceObject">
46951 <webidl> NoInterfaceObject</webidl>
46952 </ExtendedAttribute>
46953 </ExtendedAttributeList>
46954 <Operation name="onsuccess" id="::SecureElement::SessionSuccessCallback::onsuccess">
46955 <webidl> void onsuccess(<ref>Session</ref> session);</webidl>
46958 Called when an asynchronous call completes successfully.
46964 <Type type="void"/>
46966 <Argument name="session">
46972 <Type name="Session"/>
46977 <Interface name="ChannelSuccessCallback" id="::SecureElement::ChannelSuccessCallback">
46978 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface ChannelSuccessCallback {
46980 void onsuccess(<ref>Channel</ref> channel);
46984 This interface specifies the success callback that is invoked when a channel is open to communicate with a specific applet.
46988 This callback interface specifies a success method with a <em>Channel</em> object as an input parameter.
46989 It is used in asynchronous operations such as <em>Session.openBasicChannel() </em>or <em>Session.openLogicalChannel()</em>.
46996 <ExtendedAttributeList>
46997 <ExtendedAttribute name="Callback" value="FunctionOnly">
46998 <webidl>Callback</webidl>
46999 </ExtendedAttribute>
47000 <ExtendedAttribute name="NoInterfaceObject">
47001 <webidl> NoInterfaceObject</webidl>
47002 </ExtendedAttribute>
47003 </ExtendedAttributeList>
47004 <Operation name="onsuccess" id="::SecureElement::ChannelSuccessCallback::onsuccess">
47005 <webidl> void onsuccess(<ref>Channel</ref> channel);</webidl>
47008 Called when an asynchronous call completes successfully.
47014 <Type type="void"/>
47016 <Argument name="channel">
47022 <Type name="Channel"/>
47027 <Interface name="TransmitSuccessCallback" id="::SecureElement::TransmitSuccessCallback">
47028 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface TransmitSuccessCallback {
47030 void onsuccess(byte[] response);
47034 This interface specifies the success callback that is invoked when <em>Channel.transmit() </em>completes successfully.
47038 This callback interface specifies a success method with an array of bytes as an input parameter. It is used in <em>Channel.transmit()</em>.
47045 <ExtendedAttributeList>
47046 <ExtendedAttribute name="Callback" value="FunctionOnly">
47047 <webidl>Callback</webidl>
47048 </ExtendedAttribute>
47049 <ExtendedAttribute name="NoInterfaceObject">
47050 <webidl> NoInterfaceObject</webidl>
47051 </ExtendedAttribute>
47052 </ExtendedAttributeList>
47053 <Operation name="onsuccess" id="::SecureElement::TransmitSuccessCallback::onsuccess">
47054 <webidl> void onsuccess(byte[] response);</webidl>
47057 Called when an asynchronous call completes successfully.
47063 <Type type="void"/>
47065 <Argument name="response">
47068 An APDU command response that is transmitted on a channel
47071 <Type type="array">
47072 <Type type="byte"/>
47079 <Module name="SystemInfo" id="::SystemInfo">
47080 <webidl>module SystemInfo {
47082 enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };
47084 enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };
47086 enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };
47088 enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };
47090 enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };
47092 [NoInterfaceObject] interface SystemInfoObject {
47093 readonly attribute <ref>SystemInfo</ref> systeminfo;
47095 <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;
47097 [NoInterfaceObject] interface SystemInfo {
47099 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47101 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47102 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47103 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47105 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47106 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47107 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47109 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47112 [NoInterfaceObject] interface SystemInfoDeviceCapability {
47113 readonly attribute boolean bluetooth;
47115 readonly attribute boolean nfc;
47117 readonly attribute boolean nfcReservedPush ;
47119 readonly attribute unsigned short multiTouchCount;
47121 readonly attribute boolean inputKeyboard;
47123 readonly attribute boolean inputKeyboardLayout;
47125 readonly attribute boolean wifi;
47127 readonly attribute boolean wifiDirect;
47129 readonly attribute boolean opengles;
47131 readonly attribute DOMString openglestextureFormat;
47133 readonly attribute boolean openglesVersion1_1;
47135 readonly attribute boolean openglesVersion2_0;
47137 readonly attribute boolean fmRadio;
47139 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47141 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47143 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47145 readonly attribute DOMString platformName;
47147 readonly attribute boolean camera;
47149 readonly attribute boolean cameraFront;
47151 readonly attribute boolean cameraFrontFlash;
47153 readonly attribute boolean cameraBack;
47155 readonly attribute boolean cameraBackFlash;
47157 readonly attribute boolean location;
47159 readonly attribute boolean locationGps;
47161 readonly attribute boolean locationWps;
47163 readonly attribute boolean microphone;
47165 readonly attribute boolean usbHost;
47167 readonly attribute boolean usbAccessory;
47169 readonly attribute boolean screenOutputRca;
47171 readonly attribute boolean screenOutputHdmi;
47173 readonly attribute DOMString platformCoreCpuArch;
47175 readonly attribute DOMString platformCoreFpuArch;
47177 readonly attribute boolean sipVoip;
47179 readonly attribute DOMString duid;
47181 readonly attribute boolean speechRecognition;
47183 readonly attribute boolean speechSynthesis;
47185 readonly attribute boolean accelerometer;
47187 readonly attribute boolean accelerometerWakeup;
47189 readonly attribute boolean barometer;
47191 readonly attribute boolean barometerWakeup;
47193 readonly attribute boolean gyroscope;
47195 readonly attribute boolean gyroscopeWakeup;
47197 readonly attribute boolean magnetometer;
47199 readonly attribute boolean magnetometerWakeup;
47201 readonly attribute boolean photometer;
47203 readonly attribute boolean photometerWakeup;
47205 readonly attribute boolean proximity;
47207 readonly attribute boolean proximityWakeup;
47209 readonly attribute boolean tiltmeter;
47211 readonly attribute boolean tiltmeterWakeup;
47213 readonly attribute boolean dataEncryption;
47215 readonly attribute boolean graphicsAcceleration;
47217 readonly attribute boolean push;
47219 readonly attribute boolean telephony;
47221 readonly attribute boolean telephonyMms;
47223 readonly attribute boolean telephonySms;
47225 readonly attribute boolean screenSizeNormal;
47227 readonly attribute boolean screenSize480_800;
47229 readonly attribute boolean screenSize720_1280;
47231 readonly attribute boolean autoRotation;
47233 readonly attribute boolean shellAppWidget;
47235 readonly attribute boolean visionImageRecognition;
47237 readonly attribute boolean visionQrcodeGeneration;
47239 readonly attribute boolean visionQrcodeRecognition;
47241 readonly attribute boolean visionFaceRecognition;
47243 readonly attribute boolean secureElement;
47245 readonly attribute boolean nativeOspCompatible;
47247 readonly attribute <ref>SystemInfoProfile</ref> profile;
47250 dictionary SystemInfoOptions {
47251 unsigned long timeout;
47253 double highThreshold;
47255 double lowThreshold;
47258 [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
47259 void onsuccess(<ref>SystemInfoProperty</ref> prop);
47262 [NoInterfaceObject] interface SystemInfoProperty {
47265 [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
47266 readonly attribute double level;
47268 readonly attribute boolean isCharging;
47271 [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
47272 readonly attribute double load;
47275 [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
47276 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
47279 [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
47280 readonly attribute DOMString type;
47282 readonly attribute unsigned long long capacity;
47284 readonly attribute unsigned long long availableCapacity;
47286 readonly attribute boolean isRemovable;
47288 readonly attribute boolean isRemoveable;
47291 [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
47292 readonly attribute unsigned long resolutionWidth;
47294 readonly attribute unsigned long resolutionHeight;
47296 readonly attribute unsigned long dotsPerInchWidth;
47298 readonly attribute unsigned long dotsPerInchHeight;
47300 readonly attribute double physicalWidth;
47302 readonly attribute double physicalHeight;
47304 readonly attribute double brightness;
47307 [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
47309 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
47310 readonly attribute boolean isAutoRotation;
47313 [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
47315 readonly attribute DOMString model;
47316 readonly attribute DOMString manufacturer;
47317 readonly attribute DOMString buildVersion;
47320 [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
47322 readonly attribute DOMString language;
47324 readonly attribute DOMString country;
47327 [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
47329 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
47332 [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
47334 readonly attribute DOMString status;
47335 readonly attribute DOMString ssid;
47336 readonly attribute DOMString ipAddress;
47337 readonly attribute DOMString ipv6Address;
47338 readonly attribute double signalStrength;
47341 [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
47343 readonly attribute DOMString status;
47344 readonly attribute DOMString apn;
47345 readonly attribute DOMString ipAddress;
47346 readonly attribute DOMString ipv6Address;
47347 readonly attribute unsigned short mcc;
47348 readonly attribute unsigned short mnc;
47349 readonly attribute unsigned short cellId;
47350 readonly attribute unsigned short lac;
47351 readonly attribute boolean isRoaming;
47352 readonly attribute boolean isFlightMode;
47353 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
47356 [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
47357 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
47358 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
47359 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
47360 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
47361 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
47362 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
47363 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
47364 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
47367 [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
47369 readonly attribute boolean isVideoOutputOn;
47374 This specification defines interfaces and methods that provide web applications with access to various properties of a system.
47378 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.
47381 The following provides an overview of the tree data structure:
47393 DEVICE_ORIENTATION </li>
47403 CELLULAR_NETWORK </li>
47410 For more information on the SystemInfo features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systeminfo.htm">System Information Guide</a>.
47417 <Enum name="SystemInfoPropertyId" id="::SystemInfo::SystemInfoPropertyId">
47418 <webidl> enum SystemInfoPropertyId { "BATTERY" , "CPU", "STORAGE", "DISPLAY", "DEVICE_ORIENTATION", "BUILD", "LOCALE", "NETWORK", "WIFI_NETWORK", "CELLULAR_NETWORK", "SIM", "PERIPHERAL" };</webidl>
47421 The device property identifier.
47427 LOCALE and PERIPHERAL are supported Since 2.1
47430 <EnumValue stringvalue="BATTERY">
47431 <webidl> "BATTERY</webidl>
47433 <EnumValue stringvalue="CPU">
47434 <webidl> "CPU</webidl>
47436 <EnumValue stringvalue="STORAGE">
47437 <webidl> "STORAGE</webidl>
47439 <EnumValue stringvalue="DISPLAY">
47440 <webidl> "DISPLAY</webidl>
47442 <EnumValue stringvalue="DEVICE_ORIENTATION">
47443 <webidl> "DEVICE_ORIENTATION</webidl>
47445 <EnumValue stringvalue="BUILD">
47446 <webidl> "BUILD</webidl>
47448 <EnumValue stringvalue="LOCALE">
47449 <webidl> "LOCALE</webidl>
47451 <EnumValue stringvalue="NETWORK">
47452 <webidl> "NETWORK</webidl>
47454 <EnumValue stringvalue="WIFI_NETWORK">
47455 <webidl> "WIFI_NETWORK</webidl>
47457 <EnumValue stringvalue="CELLULAR_NETWORK">
47458 <webidl> "CELLULAR_NETWORK</webidl>
47460 <EnumValue stringvalue="SIM">
47461 <webidl> "SIM</webidl>
47463 <EnumValue stringvalue="PERIPHERAL">
47464 <webidl> "PERIPHERAL</webidl>
47467 <Enum name="SystemInfoNetworkType" id="::SystemInfo::SystemInfoNetworkType">
47468 <webidl> enum SystemInfoNetworkType { "NONE", "2G", "2.5G", "3G", "4G", "WIFI", "ETHERNET", "UNKNOWN" };</webidl>
47477 <EnumValue stringvalue="NONE">
47478 <webidl> "NONE</webidl>
47480 <EnumValue stringvalue="2G">
47481 <webidl> "2G</webidl>
47483 <EnumValue stringvalue="2.5G">
47484 <webidl> "2.5G</webidl>
47486 <EnumValue stringvalue="3G">
47487 <webidl> "3G</webidl>
47489 <EnumValue stringvalue="4G">
47490 <webidl> "4G</webidl>
47492 <EnumValue stringvalue="WIFI">
47493 <webidl> "WIFI</webidl>
47495 <EnumValue stringvalue="ETHERNET">
47496 <webidl> "ETHERNET</webidl>
47498 <EnumValue stringvalue="UNKNOWN">
47499 <webidl> "UNKNOWN</webidl>
47502 <Enum name="SystemInfoDeviceOrientationStatus" id="::SystemInfo::SystemInfoDeviceOrientationStatus">
47503 <webidl> enum SystemInfoDeviceOrientationStatus { "PORTRAIT_PRIMARY", "PORTRAIT_SECONDARY", "LANDSCAPE_PRIMARY", "LANDSCAPE_SECONDARY" };</webidl>
47506 Device Orientation Status.
47512 <EnumValue stringvalue="PORTRAIT_PRIMARY">
47513 <webidl> "PORTRAIT_PRIMARY</webidl>
47515 <EnumValue stringvalue="PORTRAIT_SECONDARY">
47516 <webidl> "PORTRAIT_SECONDARY</webidl>
47518 <EnumValue stringvalue="LANDSCAPE_PRIMARY">
47519 <webidl> "LANDSCAPE_PRIMARY</webidl>
47521 <EnumValue stringvalue="LANDSCAPE_SECONDARY">
47522 <webidl> "LANDSCAPE_SECONDARY</webidl>
47525 <Enum name="SystemInfoSimState" id="::SystemInfo::SystemInfoSimState">
47526 <webidl> enum SystemInfoSimState { "ABSENT", "INITIALIZING", "READY", "PIN_REQUIRED", "PUK_REQUIRED", "NETWORK_LOCKED", "SIM_LOCKED", "UNKNOWN" };</webidl>
47535 <EnumValue stringvalue="ABSENT">
47536 <webidl> "ABSENT</webidl>
47538 <EnumValue stringvalue="INITIALIZING">
47539 <webidl> "INITIALIZING</webidl>
47541 <EnumValue stringvalue="READY">
47542 <webidl> "READY</webidl>
47544 <EnumValue stringvalue="PIN_REQUIRED">
47545 <webidl> "PIN_REQUIRED</webidl>
47547 <EnumValue stringvalue="PUK_REQUIRED">
47548 <webidl> "PUK_REQUIRED</webidl>
47550 <EnumValue stringvalue="NETWORK_LOCKED">
47551 <webidl> "NETWORK_LOCKED</webidl>
47553 <EnumValue stringvalue="SIM_LOCKED">
47554 <webidl> "SIM_LOCKED</webidl>
47556 <EnumValue stringvalue="UNKNOWN">
47557 <webidl> "UNKNOWN</webidl>
47560 <Enum name="SystemInfoProfile" id="::SystemInfo::SystemInfoProfile">
47561 <webidl> enum SystemInfoProfile { "MOBILE_FULL", "MOBILE_WEB" };</webidl>
47570 <EnumValue stringvalue="MOBILE_FULL">
47571 <webidl> "MOBILE_FULL</webidl>
47573 <EnumValue stringvalue="MOBILE_WEB">
47574 <webidl> "MOBILE_WEB</webidl>
47577 <Interface name="SystemInfoObject" id="::SystemInfo::SystemInfoObject">
47578 <webidl> [NoInterfaceObject] interface SystemInfoObject {
47579 readonly attribute <ref>SystemInfo</ref> systeminfo;
47583 Defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
47587 There will be a tizen.systeminfo object that allows accessing the
47588 functionality of the SystemInfo API.
47595 <ExtendedAttributeList>
47596 <ExtendedAttribute name="NoInterfaceObject">
47597 <webidl>NoInterfaceObject</webidl>
47598 </ExtendedAttribute>
47599 </ExtendedAttributeList>
47600 <Attribute readonly="readonly" name="systeminfo" id="::SystemInfo::SystemInfoObject::systeminfo">
47601 <webidl> readonly attribute <ref>SystemInfo</ref> systeminfo;</webidl>
47602 <Type name="SystemInfo"/>
47605 <Implements name1="Tizen" name2="SystemInfoObject">
47606 <webidl> <ref>Tizen</ref> implements <ref>SystemInfoObject</ref>;</webidl>
47608 <Interface name="SystemInfo" id="::SystemInfo::SystemInfo">
47609 <webidl> [NoInterfaceObject] interface SystemInfo {
47611 <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);
47613 void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47614 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47615 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);
47617 unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47618 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47619 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);
47621 void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);
47625 This entry interface queries the information of a system.
47629 This API offers methods for retrieving system information
47630 and for subscribing notifications of system information changes.
47634 <ExtendedAttributeList>
47635 <ExtendedAttribute name="NoInterfaceObject">
47636 <webidl>NoInterfaceObject</webidl>
47637 </ExtendedAttribute>
47638 </ExtendedAttributeList>
47639 <Operation name="getCapabilities" id="::SystemInfo::SystemInfo::getCapabilities">
47640 <webidl> <ref>SystemInfoDeviceCapability</ref> getCapabilities() raises(<ref>WebAPIException</ref>);</webidl>
47643 Gets the capabilities of the device.
47647 The function must synchronously acquire the capabilities of the device.
47653 <Code> var deviceCapabilities;
47654 deviceCapabilities = tizen.systeminfo.getCapabilities();
47655 if (deviceCapabilities.bluetooth)
47657 console.log("Bluetooth is supported");
47661 <Type name="SystemInfoDeviceCapability"/>
47664 <RaiseException name="WebAPIException">
47667 with error type NotSupportedError, if this feature is not supported.
47670 with error type SecurityError, if this functionality is not allowed.
47673 with error type UnknownError in any other error case.
47679 <Operation name="getPropertyValue" id="::SystemInfo::SystemInfo::getPropertyValue">
47680 <webidl> void getPropertyValue(<ref>SystemInfoPropertyId</ref> property,
47681 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47682 optional <ref>ErrorCallback</ref>? errorCallback) raises(<ref>WebAPIException</ref>);</webidl>
47685 Gets the current value of a specified system property.
47689 The function must asynchronously acquire the current value of the requested property. If it is successful,
47690 the successCallback must be invoked with an object containing the information provided by the property.
47693 The <em>errorCallback() </em>can be launched with any of these error types:
47697 UnknownError - If any other error occurs. </li>
47703 <Code> function onSuccessCallback(battery) {
47704 console.log("The battery level is " + battery.level);
47707 function onErrorCallback(error) {
47708 console.log("An error occurred " + error.message);
47711 tizen.systeminfo.getPropertyValue("BATTERY", onSuccessCallback, onErrorCallback);
47714 <Type type="void"/>
47716 <Argument name="property">
47719 The name of the property to retrieve.
47722 <Type name="SystemInfoPropertyId"/>
47724 <Argument name="successCallback">
47727 Function called when the properties have been successfully retrieved.
47730 <Type name="SystemInfoPropertySuccessCallback"/>
47732 <Argument optional="optional" name="errorCallback">
47735 Function called when an error occurred while retrieving the properties.
47738 <Type name="ErrorCallback" nullable="nullable"/>
47742 <RaiseException name="WebAPIException">
47745 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47748 with error type SecurityError, if this functionality is not allowed.
47751 with error type UnknownError in any other error case.
47757 <Operation name="addPropertyValueChangeListener" id="::SystemInfo::SystemInfo::addPropertyValueChangeListener">
47758 <webidl> unsigned long addPropertyValueChangeListener(<ref>SystemInfoPropertyId</ref> property,
47759 <ref>SystemInfoPropertySuccessCallback</ref> successCallback,
47760 optional <ref>SystemInfoOptions</ref>? options) raises(<ref>WebAPIException</ref>);</webidl>
47763 Adds a listener to allow tracking of changes in one or more system properties.
47767 When called, it immediately returns and then asynchronously starts a watch process defined by the following steps:
47770 1. Register the successCallback to receive system events that the status of the requested properties may have changed.
47773 2. When a system event is successfully received invoke the associated successCallback with an object containing the property
47777 3. Repeat step 2 until removePropertyValueChangeListener function is called.
47780 If property value is 'BUILD', listener would not be registered because 'BUILD' property's value is a fixed value.
47786 <Code> function onSuccessCallback(battery) {
47787 console.log("Low battery: " + battery.level);
47791 tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback, {lowThreshold : 0.2});
47794 <Type type="unsigned long">
47797 unsigned long An identifier used to clear the watch subscription.
47802 <Argument name="property">
47805 The name of the property to retrieve.
47808 <Type name="SystemInfoPropertyId"/>
47810 <Argument name="successCallback">
47813 Function called when the properties have been successfully retrieved.
47816 <Type name="SystemInfoPropertySuccessCallback"/>
47818 <Argument optional="optional" name="options">
47821 An object containing the various options for fetching the properties requested.
47824 <Type name="SystemInfoOptions" nullable="nullable"/>
47828 <RaiseException name="WebAPIException">
47831 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47834 with error type NotSupportedError, if this feature is not supported.
47837 with error type InvalidValuesError, if any of the input
47838 parameters contain an invalid value.
47841 with error type SecurityError, if this functionality is not allowed.
47844 with error type UnknownError in any other error case.
47850 <Operation name="removePropertyValueChangeListener" id="::SystemInfo::SystemInfo::removePropertyValueChangeListener">
47851 <webidl> void removePropertyValueChangeListener(unsigned long listenerId) raises(<ref>WebAPIException</ref>);</webidl>
47854 Unsubscribes notifications for property changes set up by addPropertyValueChangeListener.
47858 If a valid listenerId argument is passed that corresponds to a subscription
47859 already place, then the watch process MUST immediately terminate and no further
47860 callback is invoked. If the listenerId argument does not correspond to a valid subscription,
47861 the method should return without any further action.
47867 <Code> var id = null;
47868 function onSuccessCallback(battery) {
47869 console.log("New value for Battery level is " + battery.level);
47870 if (id != null) { // After receiving the first notification, we clear it
47871 tizen.systeminfo.removePropertyValueChangeListener(id);
47875 id = tizen.systeminfo.addPropertyValueChangeListener("BATTERY", onSuccessCallback);
47878 <Type type="void"/>
47880 <Argument name="listenerId">
47883 An identifier of the subscription returned by the addPropertyValueChangeListener() method.
47886 <Type type="unsigned long"/>
47890 <RaiseException name="WebAPIException">
47893 with error type TypeMismatchError, if the input parameter is not compatible with the expected type.
47896 with error type NotSupportedError, if this feature is not supported.
47899 with error type InvalidValuesError, if any of the input
47900 parameters contain an invalid value.
47903 with error type SecurityError, if this functionality is not allowed.
47906 with error type UnknownError in any other error case.
47913 <Interface name="SystemInfoDeviceCapability" id="::SystemInfo::SystemInfoDeviceCapability">
47914 <webidl> [NoInterfaceObject] interface SystemInfoDeviceCapability {
47915 readonly attribute boolean bluetooth;
47917 readonly attribute boolean nfc;
47919 readonly attribute boolean nfcReservedPush ;
47921 readonly attribute unsigned short multiTouchCount;
47923 readonly attribute boolean inputKeyboard;
47925 readonly attribute boolean inputKeyboardLayout;
47927 readonly attribute boolean wifi;
47929 readonly attribute boolean wifiDirect;
47931 readonly attribute boolean opengles;
47933 readonly attribute DOMString openglestextureFormat;
47935 readonly attribute boolean openglesVersion1_1;
47937 readonly attribute boolean openglesVersion2_0;
47939 readonly attribute boolean fmRadio;
47941 readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);
47943 readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);
47945 readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);
47947 readonly attribute DOMString platformName;
47949 readonly attribute boolean camera;
47951 readonly attribute boolean cameraFront;
47953 readonly attribute boolean cameraFrontFlash;
47955 readonly attribute boolean cameraBack;
47957 readonly attribute boolean cameraBackFlash;
47959 readonly attribute boolean location;
47961 readonly attribute boolean locationGps;
47963 readonly attribute boolean locationWps;
47965 readonly attribute boolean microphone;
47967 readonly attribute boolean usbHost;
47969 readonly attribute boolean usbAccessory;
47971 readonly attribute boolean screenOutputRca;
47973 readonly attribute boolean screenOutputHdmi;
47975 readonly attribute DOMString platformCoreCpuArch;
47977 readonly attribute DOMString platformCoreFpuArch;
47979 readonly attribute boolean sipVoip;
47981 readonly attribute DOMString duid;
47983 readonly attribute boolean speechRecognition;
47985 readonly attribute boolean speechSynthesis;
47987 readonly attribute boolean accelerometer;
47989 readonly attribute boolean accelerometerWakeup;
47991 readonly attribute boolean barometer;
47993 readonly attribute boolean barometerWakeup;
47995 readonly attribute boolean gyroscope;
47997 readonly attribute boolean gyroscopeWakeup;
47999 readonly attribute boolean magnetometer;
48001 readonly attribute boolean magnetometerWakeup;
48003 readonly attribute boolean photometer;
48005 readonly attribute boolean photometerWakeup;
48007 readonly attribute boolean proximity;
48009 readonly attribute boolean proximityWakeup;
48011 readonly attribute boolean tiltmeter;
48013 readonly attribute boolean tiltmeterWakeup;
48015 readonly attribute boolean dataEncryption;
48017 readonly attribute boolean graphicsAcceleration;
48019 readonly attribute boolean push;
48021 readonly attribute boolean telephony;
48023 readonly attribute boolean telephonyMms;
48025 readonly attribute boolean telephonySms;
48027 readonly attribute boolean screenSizeNormal;
48029 readonly attribute boolean screenSize480_800;
48031 readonly attribute boolean screenSize720_1280;
48033 readonly attribute boolean autoRotation;
48035 readonly attribute boolean shellAppWidget;
48037 readonly attribute boolean visionImageRecognition;
48039 readonly attribute boolean visionQrcodeGeneration;
48041 readonly attribute boolean visionQrcodeRecognition;
48043 readonly attribute boolean visionFaceRecognition;
48045 readonly attribute boolean secureElement;
48047 readonly attribute boolean nativeOspCompatible;
48049 readonly attribute <ref>SystemInfoProfile</ref> profile;
48053 SystemInfoDeviceCapability object.
48059 <ExtendedAttributeList>
48060 <ExtendedAttribute name="NoInterfaceObject">
48061 <webidl>NoInterfaceObject</webidl>
48062 </ExtendedAttribute>
48063 </ExtendedAttributeList>
48064 <Attribute readonly="readonly" name="bluetooth" id="::SystemInfo::SystemInfoDeviceCapability::bluetooth">
48065 <webidl> readonly attribute boolean bluetooth;</webidl>
48068 Indicates whether the device supports Bluetooth.
48074 <Type type="boolean"/>
48076 <Attribute readonly="readonly" name="nfc" id="::SystemInfo::SystemInfoDeviceCapability::nfc">
48077 <webidl> readonly attribute boolean nfc;</webidl>
48080 Indicates whether the device supports NFC.
48086 <Type type="boolean"/>
48088 <Attribute readonly="readonly" name="nfcReservedPush" id="::SystemInfo::SystemInfoDeviceCapability::nfcReservedPush">
48089 <webidl> readonly attribute boolean nfcReservedPush ;</webidl>
48092 Indicates whether the device supports NFC reserved push.
48098 <Type type="boolean"/>
48100 <Attribute readonly="readonly" name="multiTouchCount" id="::SystemInfo::SystemInfoDeviceCapability::multiTouchCount">
48101 <webidl> readonly attribute unsigned short multiTouchCount;</webidl>
48104 The number of point in Multi-point touch.
48110 <Type type="unsigned short"/>
48112 <Attribute readonly="readonly" name="inputKeyboard" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboard">
48113 <webidl> readonly attribute boolean inputKeyboard;</webidl>
48116 Indicates whether the device supports the built-in Keyboard.
48122 <Type type="boolean"/>
48124 <Attribute readonly="readonly" name="inputKeyboardLayout" id="::SystemInfo::SystemInfoDeviceCapability::inputKeyboardLayout">
48125 <webidl> readonly attribute boolean inputKeyboardLayout;</webidl>
48128 Indicates whether the device supports the built-in keyboard layout.
48134 <Type type="boolean"/>
48136 <Attribute readonly="readonly" name="wifi" id="::SystemInfo::SystemInfoDeviceCapability::wifi">
48137 <webidl> readonly attribute boolean wifi;</webidl>
48140 Indicates whether the device supports Wi-Fi.
48146 <Type type="boolean"/>
48148 <Attribute readonly="readonly" name="wifiDirect" id="::SystemInfo::SystemInfoDeviceCapability::wifiDirect">
48149 <webidl> readonly attribute boolean wifiDirect;</webidl>
48152 Indicates whether the device supports Wi-Fi direct.
48158 <Type type="boolean"/>
48160 <Attribute readonly="readonly" name="opengles" id="::SystemInfo::SystemInfoDeviceCapability::opengles">
48161 <webidl> readonly attribute boolean opengles;</webidl>
48164 Indicates whether the device supports OpenGL-ES.
48170 <Type type="boolean"/>
48172 <Attribute readonly="readonly" name="openglestextureFormat" id="::SystemInfo::SystemInfoDeviceCapability::openglestextureFormat">
48173 <webidl> readonly attribute DOMString openglestextureFormat;</webidl>
48176 The device 3DC texture format for OpenGL-ES.
48177 One example of possible output is as follows: "3dc/atc/etc/ptc/pvrtc/utc"
48183 <Type type="DOMString"/>
48185 <Attribute readonly="readonly" name="openglesVersion1_1" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion1_1">
48186 <webidl> readonly attribute boolean openglesVersion1_1;</webidl>
48189 Indicates whether the device supports OpenGL-ES version 1.1.
48195 <Type type="boolean"/>
48197 <Attribute readonly="readonly" name="openglesVersion2_0" id="::SystemInfo::SystemInfoDeviceCapability::openglesVersion2_0">
48198 <webidl> readonly attribute boolean openglesVersion2_0;</webidl>
48201 Indicates whether the device supports OpenGL-ES version 2.0.
48207 <Type type="boolean"/>
48209 <Attribute readonly="readonly" name="fmRadio" id="::SystemInfo::SystemInfoDeviceCapability::fmRadio">
48210 <webidl> readonly attribute boolean fmRadio;</webidl>
48213 Indicates whether the device supports FM radio.
48219 <Type type="boolean"/>
48221 <Attribute readonly="readonly" name="platformVersion" id="::SystemInfo::SystemInfoDeviceCapability::platformVersion">
48222 <webidl> readonly attribute DOMString platformVersion raises(<ref>WebAPIException</ref>);</webidl>
48225 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>.
48234 http://tizen.org/privilege/system
48237 <Type type="DOMString"/>
48239 <RaiseException name="WebAPIException">
48242 with error type SecurityError, if this attribute is not allowed.
48248 <Attribute readonly="readonly" name="webApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::webApiVersion">
48249 <webidl> readonly attribute DOMString webApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48252 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>.
48261 http://tizen.org/privilege/system
48264 <Type type="DOMString"/>
48266 <RaiseException name="WebAPIException">
48269 with error type SecurityError, if this attribute is not allowed.
48275 <Attribute readonly="readonly" name="nativeApiVersion" id="::SystemInfo::SystemInfoDeviceCapability::nativeApiVersion">
48276 <webidl> readonly attribute DOMString nativeApiVersion raises(<ref>WebAPIException</ref>);</webidl>
48279 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>.
48288 http://tizen.org/privilege/system
48291 <Type type="DOMString"/>
48293 <RaiseException name="WebAPIException">
48296 with error type SecurityError, if this attribute is not allowed.
48302 <Attribute readonly="readonly" name="platformName" id="::SystemInfo::SystemInfoDeviceCapability::platformName">
48303 <webidl> readonly attribute DOMString platformName;</webidl>
48306 The name of the platform.
48312 <Type type="DOMString"/>
48314 <Attribute readonly="readonly" name="camera" id="::SystemInfo::SystemInfoDeviceCapability::camera">
48315 <webidl> readonly attribute boolean camera;</webidl>
48318 Indicates whether the device supports camera.
48324 <Type type="boolean"/>
48326 <Attribute readonly="readonly" name="cameraFront" id="::SystemInfo::SystemInfoDeviceCapability::cameraFront">
48327 <webidl> readonly attribute boolean cameraFront;</webidl>
48330 Indicates whether the device supports front camera.
48336 <Type type="boolean"/>
48338 <Attribute readonly="readonly" name="cameraFrontFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraFrontFlash">
48339 <webidl> readonly attribute boolean cameraFrontFlash;</webidl>
48342 Indicates whether the device supports flash on the front camera.
48348 <Type type="boolean"/>
48350 <Attribute readonly="readonly" name="cameraBack" id="::SystemInfo::SystemInfoDeviceCapability::cameraBack">
48351 <webidl> readonly attribute boolean cameraBack;</webidl>
48354 Indicates whether the device supports back-side camera.
48360 <Type type="boolean"/>
48362 <Attribute readonly="readonly" name="cameraBackFlash" id="::SystemInfo::SystemInfoDeviceCapability::cameraBackFlash">
48363 <webidl> readonly attribute boolean cameraBackFlash;</webidl>
48366 Indicates whether the device supports flash on the back-side camera.
48372 <Type type="boolean"/>
48374 <Attribute readonly="readonly" name="location" id="::SystemInfo::SystemInfoDeviceCapability::location">
48375 <webidl> readonly attribute boolean location;</webidl>
48378 Indicates whether the device supports CPS or not.
48384 <Type type="boolean"/>
48386 <Attribute readonly="readonly" name="locationGps" id="::SystemInfo::SystemInfoDeviceCapability::locationGps">
48387 <webidl> readonly attribute boolean locationGps;</webidl>
48390 Indicates whether the device supports GPS based location feature.
48396 <Type type="boolean"/>
48398 <Attribute readonly="readonly" name="locationWps" id="::SystemInfo::SystemInfoDeviceCapability::locationWps">
48399 <webidl> readonly attribute boolean locationWps;</webidl>
48402 Indicates whether the device supports WPS based location feature.
48408 <Type type="boolean"/>
48410 <Attribute readonly="readonly" name="microphone" id="::SystemInfo::SystemInfoDeviceCapability::microphone">
48411 <webidl> readonly attribute boolean microphone;</webidl>
48414 Indicates whether the device supports microphone.
48420 <Type type="boolean"/>
48422 <Attribute readonly="readonly" name="usbHost" id="::SystemInfo::SystemInfoDeviceCapability::usbHost">
48423 <webidl> readonly attribute boolean usbHost;</webidl>
48426 Indicates whether the device supports USB host.
48432 <Type type="boolean"/>
48434 <Attribute readonly="readonly" name="usbAccessory" id="::SystemInfo::SystemInfoDeviceCapability::usbAccessory">
48435 <webidl> readonly attribute boolean usbAccessory;</webidl>
48438 Indicates whether the device supports USB accessory.
48444 <Type type="boolean"/>
48446 <Attribute readonly="readonly" name="screenOutputRca" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputRca">
48447 <webidl> readonly attribute boolean screenOutputRca;</webidl>
48450 Indicates whether the device supports RCA output.
48456 <Type type="boolean"/>
48458 <Attribute readonly="readonly" name="screenOutputHdmi" id="::SystemInfo::SystemInfoDeviceCapability::screenOutputHdmi">
48459 <webidl> readonly attribute boolean screenOutputHdmi;</webidl>
48462 Indicates whether the device supports HDMI output.
48468 <Type type="boolean"/>
48470 <Attribute readonly="readonly" name="platformCoreCpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreCpuArch">
48471 <webidl> readonly attribute DOMString platformCoreCpuArch;</webidl>
48474 The device CPU architecture.
48475 The possible values for this attribute are: armv6, armv7, x86.
48481 <Type type="DOMString"/>
48483 <Attribute readonly="readonly" name="platformCoreFpuArch" id="::SystemInfo::SystemInfoDeviceCapability::platformCoreFpuArch">
48484 <webidl> readonly attribute DOMString platformCoreFpuArch;</webidl>
48487 The device FPU architecture.
48488 The possible values for this attribute are: vfpv3 / sse2 / sse3 / ssse3.
48494 <Type type="DOMString"/>
48496 <Attribute readonly="readonly" name="sipVoip" id="::SystemInfo::SystemInfoDeviceCapability::sipVoip">
48497 <webidl> readonly attribute boolean sipVoip;</webidl>
48500 Indicates whether the device supports VOIP.
48506 <Type type="boolean"/>
48508 <Attribute readonly="readonly" name="duid" id="::SystemInfo::SystemInfoDeviceCapability::duid">
48509 <webidl> readonly attribute DOMString duid;</webidl>
48512 The device unique ID.
48518 <Type type="DOMString"/>
48520 <Attribute readonly="readonly" name="speechRecognition" id="::SystemInfo::SystemInfoDeviceCapability::speechRecognition">
48521 <webidl> readonly attribute boolean speechRecognition;</webidl>
48524 Indicates whether the device supports speech recognition.
48530 <Type type="boolean"/>
48532 <Attribute readonly="readonly" name="speechSynthesis" id="::SystemInfo::SystemInfoDeviceCapability::speechSynthesis">
48533 <webidl> readonly attribute boolean speechSynthesis;</webidl>
48536 Indicates whether the device supports speech synthesis.
48542 <Type type="boolean"/>
48544 <Attribute readonly="readonly" name="accelerometer" id="::SystemInfo::SystemInfoDeviceCapability::accelerometer">
48545 <webidl> readonly attribute boolean accelerometer;</webidl>
48548 Indicates whether the device supports Accelerometer sensor.
48554 <Type type="boolean"/>
48556 <Attribute readonly="readonly" name="accelerometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::accelerometerWakeup">
48557 <webidl> readonly attribute boolean accelerometerWakeup;</webidl>
48560 Indicates whether the device supports Accelerometer sensor wake-up feature.
48566 <Type type="boolean"/>
48568 <Attribute readonly="readonly" name="barometer" id="::SystemInfo::SystemInfoDeviceCapability::barometer">
48569 <webidl> readonly attribute boolean barometer;</webidl>
48572 Indicates whether the device supports Barometer sensor.
48578 <Type type="boolean"/>
48580 <Attribute readonly="readonly" name="barometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::barometerWakeup">
48581 <webidl> readonly attribute boolean barometerWakeup;</webidl>
48584 Indicates whether the device supports Barometer sensor wake-up feature.
48590 <Type type="boolean"/>
48592 <Attribute readonly="readonly" name="gyroscope" id="::SystemInfo::SystemInfoDeviceCapability::gyroscope">
48593 <webidl> readonly attribute boolean gyroscope;</webidl>
48596 Indicates whether the device supports Gyroscope sensor.
48602 <Type type="boolean"/>
48604 <Attribute readonly="readonly" name="gyroscopeWakeup" id="::SystemInfo::SystemInfoDeviceCapability::gyroscopeWakeup">
48605 <webidl> readonly attribute boolean gyroscopeWakeup;</webidl>
48608 Indicates whether the device supports Gyroscope sensor wake-up feature.
48614 <Type type="boolean"/>
48616 <Attribute readonly="readonly" name="magnetometer" id="::SystemInfo::SystemInfoDeviceCapability::magnetometer">
48617 <webidl> readonly attribute boolean magnetometer;</webidl>
48620 Indicates whether the device supports Magnetometer sensor.
48626 <Type type="boolean"/>
48628 <Attribute readonly="readonly" name="magnetometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::magnetometerWakeup">
48629 <webidl> readonly attribute boolean magnetometerWakeup;</webidl>
48632 Indicates whether the device supports Magnetometer sensor wake-up feature.
48638 <Type type="boolean"/>
48640 <Attribute readonly="readonly" name="photometer" id="::SystemInfo::SystemInfoDeviceCapability::photometer">
48641 <webidl> readonly attribute boolean photometer;</webidl>
48644 Indicates whether the device supports Photometer sensor.
48650 <Type type="boolean"/>
48652 <Attribute readonly="readonly" name="photometerWakeup" id="::SystemInfo::SystemInfoDeviceCapability::photometerWakeup">
48653 <webidl> readonly attribute boolean photometerWakeup;</webidl>
48656 Indicates whether the device supports Photometer sensor wake-up feature.
48662 <Type type="boolean"/>
48664 <Attribute readonly="readonly" name="proximity" id="::SystemInfo::SystemInfoDeviceCapability::proximity">
48665 <webidl> readonly attribute boolean proximity;</webidl>
48668 Indicates whether the device supports Proximity sensor.
48674 <Type type="boolean"/>
48676 <Attribute readonly="readonly" name="proximityWakeup" id="::SystemInfo::SystemInfoDeviceCapability::proximityWakeup">
48677 <webidl> readonly attribute boolean proximityWakeup;</webidl>
48680 Indicates whether the device supports Proximity sensor wake-up feature.
48686 <Type type="boolean"/>
48688 <Attribute readonly="readonly" name="tiltmeter" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeter">
48689 <webidl> readonly attribute boolean tiltmeter;</webidl>
48692 Indicates whether the device supports Tiltmeter sensor.
48698 <Type type="boolean"/>
48700 <Attribute readonly="readonly" name="tiltmeterWakeup" id="::SystemInfo::SystemInfoDeviceCapability::tiltmeterWakeup">
48701 <webidl> readonly attribute boolean tiltmeterWakeup;</webidl>
48704 Indicates whether the device supports Tiltmeter sensor wake-up feature.
48710 <Type type="boolean"/>
48712 <Attribute readonly="readonly" name="dataEncryption" id="::SystemInfo::SystemInfoDeviceCapability::dataEncryption">
48713 <webidl> readonly attribute boolean dataEncryption;</webidl>
48716 Indicates whether the device supports data encryption.
48722 <Type type="boolean"/>
48724 <Attribute readonly="readonly" name="graphicsAcceleration" id="::SystemInfo::SystemInfoDeviceCapability::graphicsAcceleration">
48725 <webidl> readonly attribute boolean graphicsAcceleration;</webidl>
48728 Indicates whether the device supports hardware acceleration for 2D/3D graphics.
48734 <Type type="boolean"/>
48736 <Attribute readonly="readonly" name="push" id="::SystemInfo::SystemInfoDeviceCapability::push">
48737 <webidl> readonly attribute boolean push;</webidl>
48740 Indicates whether the device supports push service.
48746 <Type type="boolean"/>
48748 <Attribute readonly="readonly" name="telephony" id="::SystemInfo::SystemInfoDeviceCapability::telephony">
48749 <webidl> readonly attribute boolean telephony;</webidl>
48752 Indicates whether the device supports the telephony feature.
48758 <Type type="boolean"/>
48760 <Attribute readonly="readonly" name="telephonyMms" id="::SystemInfo::SystemInfoDeviceCapability::telephonyMms">
48761 <webidl> readonly attribute boolean telephonyMms;</webidl>
48764 Indicates whether the device supports the mms feature.
48770 <Type type="boolean"/>
48772 <Attribute readonly="readonly" name="telephonySms" id="::SystemInfo::SystemInfoDeviceCapability::telephonySms">
48773 <webidl> readonly attribute boolean telephonySms;</webidl>
48776 Indicates whether the device supports the sms feature.
48782 <Type type="boolean"/>
48784 <Attribute readonly="readonly" name="screenSizeNormal" id="::SystemInfo::SystemInfoDeviceCapability::screenSizeNormal">
48785 <webidl> readonly attribute boolean screenSizeNormal;</webidl>
48788 Indicates whether the device supports the screen normal size.
48794 <Type type="boolean"/>
48796 <Attribute readonly="readonly" name="screenSize480_800" id="::SystemInfo::SystemInfoDeviceCapability::screenSize480_800">
48797 <webidl> readonly attribute boolean screenSize480_800;</webidl>
48800 Indicates whether the device supports the 480 * 800 screen size.
48806 <Type type="boolean"/>
48808 <Attribute readonly="readonly" name="screenSize720_1280" id="::SystemInfo::SystemInfoDeviceCapability::screenSize720_1280">
48809 <webidl> readonly attribute boolean screenSize720_1280;</webidl>
48812 Indicates whether the device supports the 720 * 1280 screen size.
48818 <Type type="boolean"/>
48820 <Attribute readonly="readonly" name="autoRotation" id="::SystemInfo::SystemInfoDeviceCapability::autoRotation">
48821 <webidl> readonly attribute boolean autoRotation;</webidl>
48824 Indicates whether the device supports auto rotation.
48830 <Type type="boolean"/>
48832 <Attribute readonly="readonly" name="shellAppWidget" id="::SystemInfo::SystemInfoDeviceCapability::shellAppWidget">
48833 <webidl> readonly attribute boolean shellAppWidget;</webidl>
48836 Indicates whether the device supports shell app widget.
48842 <Type type="boolean"/>
48844 <Attribute readonly="readonly" name="visionImageRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionImageRecognition">
48845 <webidl> readonly attribute boolean visionImageRecognition;</webidl>
48848 Indicates whether the device supports vision image recognition.
48854 <Type type="boolean"/>
48856 <Attribute readonly="readonly" name="visionQrcodeGeneration" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeGeneration">
48857 <webidl> readonly attribute boolean visionQrcodeGeneration;</webidl>
48860 Indicates whether the device supports vision qrcode generation.
48866 <Type type="boolean"/>
48868 <Attribute readonly="readonly" name="visionQrcodeRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionQrcodeRecognition">
48869 <webidl> readonly attribute boolean visionQrcodeRecognition;</webidl>
48872 Indicates whether the device supports vision qrcode recognition.
48878 <Type type="boolean"/>
48880 <Attribute readonly="readonly" name="visionFaceRecognition" id="::SystemInfo::SystemInfoDeviceCapability::visionFaceRecognition">
48881 <webidl> readonly attribute boolean visionFaceRecognition;</webidl>
48884 Indicates whether the device supports vision face recognition.
48890 <Type type="boolean"/>
48892 <Attribute readonly="readonly" name="secureElement" id="::SystemInfo::SystemInfoDeviceCapability::secureElement">
48893 <webidl> readonly attribute boolean secureElement;</webidl>
48896 Indicates whether the device supports secure element.
48902 <Type type="boolean"/>
48904 <Attribute readonly="readonly" name="nativeOspCompatible" id="::SystemInfo::SystemInfoDeviceCapability::nativeOspCompatible">
48905 <webidl> readonly attribute boolean nativeOspCompatible;</webidl>
48908 Indicates whether the device supports native osp API.
48914 <Type type="boolean"/>
48916 <Attribute readonly="readonly" name="profile" id="::SystemInfo::SystemInfoDeviceCapability::profile">
48917 <webidl> readonly attribute <ref>SystemInfoProfile</ref> profile;</webidl>
48920 Represents the profile of the current device.
48926 <Type name="SystemInfoProfile"/>
48929 <Dictionary name="SystemInfoOptions" id="::SystemInfo::SystemInfoOptions">
48930 <webidl> dictionary SystemInfoOptions {
48931 unsigned long timeout;
48933 double highThreshold;
48935 double lowThreshold;
48939 An object containing the various options for fetching the properties requested.
48945 <DictionaryMember name="timeout" id="::SystemInfo::SystemInfoOptions::timeout">
48946 <webidl> unsigned long timeout;</webidl>
48949 The number of milliseconds beyond which the operation must be interrupted.
48955 <Type type="unsigned long"/>
48956 </DictionaryMember>
48957 <DictionaryMember name="highThreshold" id="::SystemInfo::SystemInfoOptions::highThreshold">
48958 <webidl> double highThreshold;</webidl>
48961 An attribute to indicate that the <em>successCallback()</em> method in the watch
48962 operation will be triggered only if the device property is a number and its value is greater than or equal to this number.
48963 This attribute has no effect on the <em>get()</em> method.
48969 <Type type="double"/>
48970 </DictionaryMember>
48971 <DictionaryMember name="lowThreshold" id="::SystemInfo::SystemInfoOptions::lowThreshold">
48972 <webidl> double lowThreshold;</webidl>
48975 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.
48976 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>.
48977 This attribute has no effect on the get method.
48983 <Type type="double"/>
48984 </DictionaryMember>
48986 <Interface name="SystemInfoPropertySuccessCallback" id="::SystemInfo::SystemInfoPropertySuccessCallback">
48987 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemInfoPropertySuccessCallback {
48988 void onsuccess(<ref>SystemInfoProperty</ref> prop);
48992 Systemfinfo specific success callback.
48996 This callback interface specifies a success callback with SystemInfoProperty as input argument.
48997 It is used in asynchronous
48998 operations, such as getPropertyValue() or addPropertyValueChangeListener()
49005 <ExtendedAttributeList>
49006 <ExtendedAttribute name="Callback" value="FunctionOnly">
49007 <webidl>Callback</webidl>
49008 </ExtendedAttribute>
49009 <ExtendedAttribute name="NoInterfaceObject">
49010 <webidl> NoInterfaceObject</webidl>
49011 </ExtendedAttribute>
49012 </ExtendedAttributeList>
49013 <Operation name="onsuccess" id="::SystemInfo::SystemInfoPropertySuccessCallback::onsuccess">
49014 <webidl> void onsuccess(<ref>SystemInfoProperty</ref> prop);</webidl>
49017 Method invoked when the asynchronous call completes successfully.
49023 <Type type="void"/>
49025 <Argument name="prop">
49028 The property returned from a successful asynchronous operation.
49031 <Type name="SystemInfoProperty"/>
49036 <Interface name="SystemInfoProperty" id="::SystemInfo::SystemInfoProperty">
49037 <webidl> [NoInterfaceObject] interface SystemInfoProperty {
49041 This is a common abstract interface used by different types of system information objects.
49047 <ExtendedAttributeList>
49048 <ExtendedAttribute name="NoInterfaceObject">
49049 <webidl>NoInterfaceObject</webidl>
49050 </ExtendedAttribute>
49051 </ExtendedAttributeList>
49053 <Interface name="SystemInfoBattery" id="::SystemInfo::SystemInfoBattery">
49054 <webidl> [NoInterfaceObject] interface SystemInfoBattery : <ref>SystemInfoProperty</ref> {
49055 readonly attribute double level;
49057 readonly attribute boolean isCharging;
49061 This property reflects the general state of the system's battery
49067 <ExtendedAttributeList>
49068 <ExtendedAttribute name="NoInterfaceObject">
49069 <webidl>NoInterfaceObject</webidl>
49070 </ExtendedAttribute>
49071 </ExtendedAttributeList>
49072 <InterfaceInheritance>
49073 <Name name="SystemInfoProperty"/>
49074 </InterfaceInheritance>
49075 <Attribute readonly="readonly" name="level" id="::SystemInfo::SystemInfoBattery::level">
49076 <webidl> readonly attribute double level;</webidl>
49079 An attribute to specify the remaining level of an internal battery, scaled from <var>0 </var>to <var>1</var>:
49084 <var>0 </var>indicates that the battery level is the lowest and the system is about to enter shutdown mode. </li>
49086 <var>1 </var>indicates that the system's charge is maximum. </li>
49089 Any threshold parameter used in a watch operation to monitor this property applies to this attribute.
49096 <Type type="double"/>
49098 <Attribute readonly="readonly" name="isCharging" id="::SystemInfo::SystemInfoBattery::isCharging">
49099 <webidl> readonly attribute boolean isCharging;</webidl>
49102 Indicates whether the battery source is currently charging.
49108 <Type type="boolean"/>
49111 <Interface name="SystemInfoCpu" id="::SystemInfo::SystemInfoCpu">
49112 <webidl> [NoInterfaceObject] interface SystemInfoCpu : <ref>SystemInfoProperty</ref> {
49113 readonly attribute double load;
49117 This property reflects the state of the CPUs available to this system.
49123 <ExtendedAttributeList>
49124 <ExtendedAttribute name="NoInterfaceObject">
49125 <webidl>NoInterfaceObject</webidl>
49126 </ExtendedAttribute>
49127 </ExtendedAttributeList>
49128 <InterfaceInheritance>
49129 <Name name="SystemInfoProperty"/>
49130 </InterfaceInheritance>
49131 <Attribute readonly="readonly" name="load" id="::SystemInfo::SystemInfoCpu::load">
49132 <webidl> readonly attribute double load;</webidl>
49135 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.
49136 Any threshold parameter used in a watch function to monitor this property applies to this attribute.
49142 <Type type="double"/>
49145 <Interface name="SystemInfoStorage" id="::SystemInfo::SystemInfoStorage">
49146 <webidl> [NoInterfaceObject] interface SystemInfoStorage : <ref>SystemInfoProperty</ref> {
49147 readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;
49151 This property exposes the data storage devices connected to this system.
49157 <ExtendedAttributeList>
49158 <ExtendedAttribute name="NoInterfaceObject">
49159 <webidl>NoInterfaceObject</webidl>
49160 </ExtendedAttribute>
49161 </ExtendedAttributeList>
49162 <InterfaceInheritance>
49163 <Name name="SystemInfoProperty"/>
49164 </InterfaceInheritance>
49165 <Attribute readonly="readonly" name="units" id="::SystemInfo::SystemInfoStorage::units">
49166 <webidl> readonly attribute <ref>SystemInfoStorageUnit</ref>[] units;</webidl>
49169 The array of storage units connected to this device.
49175 <Type type="array">
49176 <Type name="SystemInfoStorageUnit"/>
49180 <Interface name="SystemInfoStorageUnit" id="::SystemInfo::SystemInfoStorageUnit">
49181 <webidl> [NoInterfaceObject] interface SystemInfoStorageUnit : <ref>SystemInfoProperty</ref> {
49182 readonly attribute DOMString type;
49184 readonly attribute unsigned long long capacity;
49186 readonly attribute unsigned long long availableCapacity;
49188 readonly attribute boolean isRemovable;
49190 readonly attribute boolean isRemoveable;
49194 This property exposes a single storage device connected to this system.
49197 <ExtendedAttributeList>
49198 <ExtendedAttribute name="NoInterfaceObject">
49199 <webidl>NoInterfaceObject</webidl>
49200 </ExtendedAttribute>
49201 </ExtendedAttributeList>
49202 <InterfaceInheritance>
49203 <Name name="SystemInfoProperty"/>
49204 </InterfaceInheritance>
49205 <Attribute readonly="readonly" name="type" id="::SystemInfo::SystemInfoStorageUnit::type">
49206 <webidl> readonly attribute DOMString type;</webidl>
49209 The type of a storage device. The value is one of the constants defined for this type.
49213 The supported storage unit types are:
49232 <Type type="DOMString"/>
49234 <Attribute readonly="readonly" name="capacity" id="::SystemInfo::SystemInfoStorageUnit::capacity">
49235 <webidl> readonly attribute unsigned long long capacity;</webidl>
49238 The amount of data that this device can hold, in bytes.
49244 <Type type="unsigned long long"/>
49246 <Attribute readonly="readonly" name="availableCapacity" id="::SystemInfo::SystemInfoStorageUnit::availableCapacity">
49247 <webidl> readonly attribute unsigned long long availableCapacity;</webidl>
49250 The amount of available data that this device can hold, in bytes.
49256 <Type type="unsigned long long"/>
49258 <Attribute readonly="readonly" name="isRemovable" id="::SystemInfo::SystemInfoStorageUnit::isRemovable">
49259 <webidl> readonly attribute boolean isRemovable;</webidl>
49262 An attribute to indicate whether a device can be removed or not.
49266 The following values are supported:
49270 <var>true </var> - If this storage unit can be removed from the system (such as an sdcard unplugged) </li>
49272 <var>false</var> - If this storage unit cannot be removed from the system </li>
49279 <Type type="boolean"/>
49281 <Attribute readonly="readonly" name="isRemoveable" id="::SystemInfo::SystemInfoStorageUnit::isRemoveable">
49282 <webidl> readonly attribute boolean isRemoveable;</webidl>
49285 true if this unit can be removed from the system (such as an sdcard unplugged), false otherwise.
49291 A typographic error.
49294 <Type type="boolean"/>
49297 <Interface name="SystemInfoDisplay" id="::SystemInfo::SystemInfoDisplay">
49298 <webidl> [NoInterfaceObject] interface SystemInfoDisplay : <ref>SystemInfoProperty</ref> {
49299 readonly attribute unsigned long resolutionWidth;
49301 readonly attribute unsigned long resolutionHeight;
49303 readonly attribute unsigned long dotsPerInchWidth;
49305 readonly attribute unsigned long dotsPerInchHeight;
49307 readonly attribute double physicalWidth;
49309 readonly attribute double physicalHeight;
49311 readonly attribute double brightness;
49315 This property reflects the information of the Display.
49321 <ExtendedAttributeList>
49322 <ExtendedAttribute name="NoInterfaceObject">
49323 <webidl>NoInterfaceObject</webidl>
49324 </ExtendedAttribute>
49325 </ExtendedAttributeList>
49326 <InterfaceInheritance>
49327 <Name name="SystemInfoProperty"/>
49328 </InterfaceInheritance>
49329 <Attribute readonly="readonly" name="resolutionWidth" id="::SystemInfo::SystemInfoDisplay::resolutionWidth">
49330 <webidl> readonly attribute unsigned long resolutionWidth;</webidl>
49333 The total number of addressable pixels in the horizontal direction of a rectangular entity
49334 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49340 <Type type="unsigned long"/>
49342 <Attribute readonly="readonly" name="resolutionHeight" id="::SystemInfo::SystemInfoDisplay::resolutionHeight">
49343 <webidl> readonly attribute unsigned long resolutionHeight;</webidl>
49346 The total number of addressable pixels in the vertical direction of a rectangular element
49347 (such as Camera, Display, Image, Video, ...) when held in its default orientation.
49353 <Type type="unsigned long"/>
49355 <Attribute readonly="readonly" name="dotsPerInchWidth" id="::SystemInfo::SystemInfoDisplay::dotsPerInchWidth">
49356 <webidl> readonly attribute unsigned long dotsPerInchWidth;</webidl>
49359 Resolution of this device, along its width, in dots per inch.
49365 <Type type="unsigned long"/>
49367 <Attribute readonly="readonly" name="dotsPerInchHeight" id="::SystemInfo::SystemInfoDisplay::dotsPerInchHeight">
49368 <webidl> readonly attribute unsigned long dotsPerInchHeight;</webidl>
49371 Resolution of this device, along its height, in dots per inch.
49377 <Type type="unsigned long"/>
49379 <Attribute readonly="readonly" name="physicalWidth" id="::SystemInfo::SystemInfoDisplay::physicalWidth">
49380 <webidl> readonly attribute double physicalWidth;</webidl>
49383 The display's physical width in millimeters.
49389 <Type type="double"/>
49391 <Attribute readonly="readonly" name="physicalHeight" id="::SystemInfo::SystemInfoDisplay::physicalHeight">
49392 <webidl> readonly attribute double physicalHeight;</webidl>
49395 The display's physical height in millimeters.
49401 <Type type="double"/>
49403 <Attribute readonly="readonly" name="brightness" id="::SystemInfo::SystemInfoDisplay::brightness">
49404 <webidl> readonly attribute double brightness;</webidl>
49407 The current brightness of a display ranging between <var>0 </var>to <var>1</var>.
49413 <Type type="double"/>
49416 <Interface name="SystemInfoDeviceOrientation" id="::SystemInfo::SystemInfoDeviceOrientation">
49417 <webidl> [NoInterfaceObject] interface SystemInfoDeviceOrientation : <ref>SystemInfoProperty</ref> {
49419 readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;
49420 readonly attribute boolean isAutoRotation;
49424 This property reflects the information of the device orientation in this system.
49430 <ExtendedAttributeList>
49431 <ExtendedAttribute name="NoInterfaceObject">
49432 <webidl>NoInterfaceObject</webidl>
49433 </ExtendedAttribute>
49434 </ExtendedAttributeList>
49435 <InterfaceInheritance>
49436 <Name name="SystemInfoProperty"/>
49437 </InterfaceInheritance>
49438 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoDeviceOrientation::status">
49439 <webidl> readonly attribute <ref>SystemInfoDeviceOrientationStatus</ref> status;</webidl>
49442 Represents the status of the current device orientation.
49448 <Type name="SystemInfoDeviceOrientationStatus"/>
49450 <Attribute readonly="readonly" name="isAutoRotation" id="::SystemInfo::SystemInfoDeviceOrientation::isAutoRotation">
49451 <webidl> readonly attribute boolean isAutoRotation;</webidl>
49454 whether the device is in autorotation.
49460 <Type type="boolean"/>
49463 <Interface name="SystemInfoBuild" id="::SystemInfo::SystemInfoBuild">
49464 <webidl> [NoInterfaceObject] interface SystemInfoBuild : <ref>SystemInfoProperty</ref> {
49466 readonly attribute DOMString model;
49467 readonly attribute DOMString manufacturer;
49468 readonly attribute DOMString buildVersion;
49472 This property reflects the information of the current device.
49478 <ExtendedAttributeList>
49479 <ExtendedAttribute name="NoInterfaceObject">
49480 <webidl>NoInterfaceObject</webidl>
49481 </ExtendedAttribute>
49482 </ExtendedAttributeList>
49483 <InterfaceInheritance>
49484 <Name name="SystemInfoProperty"/>
49485 </InterfaceInheritance>
49486 <Attribute readonly="readonly" name="model" id="::SystemInfo::SystemInfoBuild::model">
49487 <webidl> readonly attribute DOMString model;</webidl>
49490 Represents the model name of the current device.
49496 <Type type="DOMString"/>
49498 <Attribute readonly="readonly" name="manufacturer" id="::SystemInfo::SystemInfoBuild::manufacturer">
49499 <webidl> readonly attribute DOMString manufacturer;</webidl>
49502 Represents the manufacturer of the device.
49508 <Type type="DOMString"/>
49510 <Attribute readonly="readonly" name="buildVersion" id="::SystemInfo::SystemInfoBuild::buildVersion">
49511 <webidl> readonly attribute DOMString buildVersion;</webidl>
49514 Represents the build version information of the device.
49520 <Type type="DOMString"/>
49523 <Interface name="SystemInfoLocale" id="::SystemInfo::SystemInfoLocale">
49524 <webidl> [NoInterfaceObject] interface SystemInfoLocale : <ref>SystemInfoProperty</ref> {
49526 readonly attribute DOMString language;
49528 readonly attribute DOMString country;
49532 This property reflects the locale information of the current device.
49538 <ExtendedAttributeList>
49539 <ExtendedAttribute name="NoInterfaceObject">
49540 <webidl>NoInterfaceObject</webidl>
49541 </ExtendedAttribute>
49542 </ExtendedAttributeList>
49543 <InterfaceInheritance>
49544 <Name name="SystemInfoProperty"/>
49545 </InterfaceInheritance>
49546 <Attribute readonly="readonly" name="language" id="::SystemInfo::SystemInfoLocale::language">
49547 <webidl> readonly attribute DOMString language;</webidl>
49550 Indicates the current language setting in the (LANGUAGE)_(REGION) syntax.
49551 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49552 The language setting is case-sensitive.
49558 <Type type="DOMString"/>
49560 <Attribute readonly="readonly" name="country" id="::SystemInfo::SystemInfoLocale::country">
49561 <webidl> readonly attribute DOMString country;</webidl>
49564 Indicates the current country setting in the (LANGUAGE)_(REGION) syntax.
49565 The language setting is in the ISO 630-2 format and the region setting is in the ISO 3166-1 format.
49566 The country setting is case-sensitive.
49572 <Type type="DOMString"/>
49575 <Interface name="SystemInfoNetwork" id="::SystemInfo::SystemInfoNetwork">
49576 <webidl> [NoInterfaceObject] interface SystemInfoNetwork : <ref>SystemInfoProperty</ref> {
49578 readonly attribute <ref>SystemInfoNetworkType</ref> networkType;
49582 This property reflects the information of the data network in this system.
49588 <ExtendedAttributeList>
49589 <ExtendedAttribute name="NoInterfaceObject">
49590 <webidl>NoInterfaceObject</webidl>
49591 </ExtendedAttribute>
49592 </ExtendedAttributeList>
49593 <InterfaceInheritance>
49594 <Name name="SystemInfoProperty"/>
49595 </InterfaceInheritance>
49596 <Attribute readonly="readonly" name="networkType" id="::SystemInfo::SystemInfoNetwork::networkType">
49597 <webidl> readonly attribute <ref>SystemInfoNetworkType</ref> networkType;</webidl>
49600 Represents the network type of the current data network.
49606 <Type name="SystemInfoNetworkType"/>
49609 <Interface name="SystemInfoWifiNetwork" id="::SystemInfo::SystemInfoWifiNetwork">
49610 <webidl> [NoInterfaceObject] interface SystemInfoWifiNetwork : <ref>SystemInfoProperty</ref> {
49612 readonly attribute DOMString status;
49613 readonly attribute DOMString ssid;
49614 readonly attribute DOMString ipAddress;
49615 readonly attribute DOMString ipv6Address;
49616 readonly attribute double signalStrength;
49620 This property reflects the information of the Wi-Fi network in this system.
49626 <ExtendedAttributeList>
49627 <ExtendedAttribute name="NoInterfaceObject">
49628 <webidl>NoInterfaceObject</webidl>
49629 </ExtendedAttribute>
49630 </ExtendedAttributeList>
49631 <InterfaceInheritance>
49632 <Name name="SystemInfoProperty"/>
49633 </InterfaceInheritance>
49634 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoWifiNetwork::status">
49635 <webidl> readonly attribute DOMString status;</webidl>
49638 Represents the status (ON or OFF) of the Wi-Fi interface.
49644 <Type type="DOMString"/>
49646 <Attribute readonly="readonly" name="ssid" id="::SystemInfo::SystemInfoWifiNetwork::ssid">
49647 <webidl> readonly attribute DOMString ssid;</webidl>
49650 Represents the SSID of a Wi-Fi network.
49656 <Type type="DOMString"/>
49658 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoWifiNetwork::ipAddress">
49659 <webidl> readonly attribute DOMString ipAddress;</webidl>
49662 Represents the IPv4 address of Wi-Fi network.
49668 <Type type="DOMString"/>
49670 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoWifiNetwork::ipv6Address">
49671 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49674 Represents the IPv6 address of Wi-Fi network.
49680 <Type type="DOMString"/>
49682 <Attribute readonly="readonly" name="signalStrength" id="::SystemInfo::SystemInfoWifiNetwork::signalStrength">
49683 <webidl> readonly attribute double signalStrength;</webidl>
49686 This connection's signal strength, as a normalized value between 0 (no signal detected) and 1 (the level is at its maximum value).
49692 <Type type="double"/>
49695 <Interface name="SystemInfoCellularNetwork" id="::SystemInfo::SystemInfoCellularNetwork">
49696 <webidl> [NoInterfaceObject] interface SystemInfoCellularNetwork : <ref>SystemInfoProperty</ref> {
49698 readonly attribute DOMString status;
49699 readonly attribute DOMString apn;
49700 readonly attribute DOMString ipAddress;
49701 readonly attribute DOMString ipv6Address;
49702 readonly attribute unsigned short mcc;
49703 readonly attribute unsigned short mnc;
49704 readonly attribute unsigned short cellId;
49705 readonly attribute unsigned short lac;
49706 readonly attribute boolean isRoaming;
49707 readonly attribute boolean isFlightMode;
49708 readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);
49712 This property reflects the information of the Cellular network in this system.
49718 <ExtendedAttributeList>
49719 <ExtendedAttribute name="NoInterfaceObject">
49720 <webidl>NoInterfaceObject</webidl>
49721 </ExtendedAttribute>
49722 </ExtendedAttributeList>
49723 <InterfaceInheritance>
49724 <Name name="SystemInfoProperty"/>
49725 </InterfaceInheritance>
49726 <Attribute readonly="readonly" name="status" id="::SystemInfo::SystemInfoCellularNetwork::status">
49727 <webidl> readonly attribute DOMString status;</webidl>
49730 Represents the status (ON or OFF) of the cellular network.
49736 <Type type="DOMString"/>
49738 <Attribute readonly="readonly" name="apn" id="::SystemInfo::SystemInfoCellularNetwork::apn">
49739 <webidl> readonly attribute DOMString apn;</webidl>
49742 Represents an Access Point Name of the cellular network.
49748 <Type type="DOMString"/>
49750 <Attribute readonly="readonly" name="ipAddress" id="::SystemInfo::SystemInfoCellularNetwork::ipAddress">
49751 <webidl> readonly attribute DOMString ipAddress;</webidl>
49754 Represents the IPv4 address of the cellular network.
49760 <Type type="DOMString"/>
49762 <Attribute readonly="readonly" name="ipv6Address" id="::SystemInfo::SystemInfoCellularNetwork::ipv6Address">
49763 <webidl> readonly attribute DOMString ipv6Address;</webidl>
49766 Represents the IPv6 address of the cellular network.
49772 <Type type="DOMString"/>
49774 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoCellularNetwork::mcc">
49775 <webidl> readonly attribute unsigned short mcc;</webidl>
49778 Represents Mobile Country Code (MCC) of the cellular network.
49784 <Type type="unsigned short"/>
49786 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoCellularNetwork::mnc">
49787 <webidl> readonly attribute unsigned short mnc;</webidl>
49790 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
49791 identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks.
49797 <Type type="unsigned short"/>
49799 <Attribute readonly="readonly" name="cellId" id="::SystemInfo::SystemInfoCellularNetwork::cellId">
49800 <webidl> readonly attribute unsigned short cellId;</webidl>
49803 Represents Cell Id.
49809 <Type type="unsigned short"/>
49811 <Attribute readonly="readonly" name="lac" id="::SystemInfo::SystemInfoCellularNetwork::lac">
49812 <webidl> readonly attribute unsigned short lac;</webidl>
49815 Represents Location Area Code.
49821 <Type type="unsigned short"/>
49823 <Attribute readonly="readonly" name="isRoaming" id="::SystemInfo::SystemInfoCellularNetwork::isRoaming">
49824 <webidl> readonly attribute boolean isRoaming;</webidl>
49827 Whether the connection is set up while the device is roaming.
49833 <Type type="boolean"/>
49835 <Attribute readonly="readonly" name="isFlightMode" id="::SystemInfo::SystemInfoCellularNetwork::isFlightMode">
49836 <webidl> readonly attribute boolean isFlightMode;</webidl>
49839 Indicates whether the device is in flight mode.
49845 <Type type="boolean"/>
49847 <Attribute readonly="readonly" name="imei" id="::SystemInfo::SystemInfoCellularNetwork::imei">
49848 <webidl> readonly attribute DOMString imei raises(<ref>WebAPIException</ref>);</webidl>
49851 Represents the International Mobile Equipment Identity (IMEI).
49860 http://tizen.org/privilege/systemmanager
49863 <Type type="DOMString"/>
49865 <RaiseException name="WebAPIException">
49868 with error type SecurityError, if this attribute is not allowed.
49875 <Interface name="SystemInfoSIM" id="::SystemInfo::SystemInfoSIM">
49876 <webidl> [NoInterfaceObject] interface SystemInfoSIM : <ref>SystemInfoProperty</ref> {
49877 readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);
49878 readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);
49879 readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);
49880 readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);
49881 readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);
49882 readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);
49883 readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);
49884 readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);
49888 This property reflects the information of the SIM card information.
49894 <ExtendedAttributeList>
49895 <ExtendedAttribute name="NoInterfaceObject">
49896 <webidl>NoInterfaceObject</webidl>
49897 </ExtendedAttribute>
49898 </ExtendedAttributeList>
49899 <InterfaceInheritance>
49900 <Name name="SystemInfoProperty"/>
49901 </InterfaceInheritance>
49902 <Attribute readonly="readonly" name="state" id="::SystemInfo::SystemInfoSIM::state">
49903 <webidl> readonly attribute <ref>SystemInfoSimState</ref> state raises(<ref>WebAPIException</ref>);</webidl>
49906 Represents the SIM card state.
49915 http://tizen.org/privilege/system
49918 <Type name="SystemInfoSimState"/>
49920 <RaiseException name="WebAPIException">
49923 with error type SecurityError, if this attribute is not allowed.
49929 <Attribute readonly="readonly" name="operatorName" id="::SystemInfo::SystemInfoSIM::operatorName">
49930 <webidl> readonly attribute DOMString operatorName raises(<ref>WebAPIException</ref>);</webidl>
49933 Represents the Operator Name String (ONS) of Common PCN Handset Specification (CPHS) in SIM card.
49942 http://tizen.org/privilege/system
49945 <Type type="DOMString"/>
49947 <RaiseException name="WebAPIException">
49950 with error type SecurityError, if this attribute is not allowed.
49956 <Attribute readonly="readonly" name="msisdn" id="::SystemInfo::SystemInfoSIM::msisdn">
49957 <webidl> readonly attribute DOMString msisdn raises(<ref>WebAPIException</ref>);</webidl>
49960 Represents the SIM card subscriber number.
49969 http://tizen.org/privilege/systemmanager
49972 <Type type="DOMString"/>
49974 <RaiseException name="WebAPIException">
49977 with error type SecurityError, if this attribute is not allowed.
49983 <Attribute readonly="readonly" name="iccid" id="::SystemInfo::SystemInfoSIM::iccid">
49984 <webidl> readonly attribute DOMString iccid raises(<ref>WebAPIException</ref>);</webidl>
49987 Represents the Integrated Circuit Card ID.
49996 http://tizen.org/privilege/system
49999 <Type type="DOMString"/>
50001 <RaiseException name="WebAPIException">
50004 with error type SecurityError, if this attribute is not allowed.
50010 <Attribute readonly="readonly" name="mcc" id="::SystemInfo::SystemInfoSIM::mcc">
50011 <webidl> readonly attribute unsigned short mcc raises(<ref>WebAPIException</ref>);</webidl>
50014 Represents the Mobile Country Code (MCC) of SIM provider.
50023 http://tizen.org/privilege/system
50026 <Type type="unsigned short"/>
50028 <RaiseException name="WebAPIException">
50031 with error type SecurityError, if this attribute is not allowed.
50037 <Attribute readonly="readonly" name="mnc" id="::SystemInfo::SystemInfoSIM::mnc">
50038 <webidl> readonly attribute unsigned short mnc raises(<ref>WebAPIException</ref>);</webidl>
50041 Represents the Mobile Network Code (MNC) of SIM provider.
50050 http://tizen.org/privilege/system
50053 <Type type="unsigned short"/>
50055 <RaiseException name="WebAPIException">
50058 with error type SecurityError, if this attribute is not allowed.
50064 <Attribute readonly="readonly" name="msin" id="::SystemInfo::SystemInfoSIM::msin">
50065 <webidl> readonly attribute DOMString msin raises(<ref>WebAPIException</ref>);</webidl>
50068 Represents the Mobile Subscription Identification Number (MSIN) of SIM provider.
50077 http://tizen.org/privilege/systemmanager
50080 <Type type="DOMString"/>
50082 <RaiseException name="WebAPIException">
50085 with error type SecurityError, if this attribute is not allowed.
50091 <Attribute readonly="readonly" name="spn" id="::SystemInfo::SystemInfoSIM::spn">
50092 <webidl> readonly attribute DOMString spn raises(<ref>WebAPIException</ref>);</webidl>
50095 Represents the Service Provider Name (SPN) of SIM card.
50104 http://tizen.org/privilege/system
50107 <Type type="DOMString"/>
50109 <RaiseException name="WebAPIException">
50112 with error type SecurityError, if this attribute is not allowed.
50119 <Interface name="SystemInfoPeripheral" id="::SystemInfo::SystemInfoPeripheral">
50120 <webidl> [NoInterfaceObject] interface SystemInfoPeripheral : <ref>SystemInfoProperty</ref> {
50122 readonly attribute boolean isVideoOutputOn;
50126 This property reflects the peripheral information of the current device.
50132 <ExtendedAttributeList>
50133 <ExtendedAttribute name="NoInterfaceObject">
50134 <webidl>NoInterfaceObject</webidl>
50135 </ExtendedAttribute>
50136 </ExtendedAttributeList>
50137 <InterfaceInheritance>
50138 <Name name="SystemInfoProperty"/>
50139 </InterfaceInheritance>
50140 <Attribute readonly="readonly" name="isVideoOutputOn" id="::SystemInfo::SystemInfoPeripheral::isVideoOutputOn">
50141 <webidl> readonly attribute boolean isVideoOutputOn;</webidl>
50144 Represents the video out status.
50150 <Type type="boolean"/>
50154 <Module name="SystemSetting" id="::SystemSetting">
50155 <webidl>module SystemSetting {
50157 [NoInterfaceObject] interface SystemSettingObject {
50158 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50160 <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;
50162 enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};
50164 [NoInterfaceObject] interface SystemSettingManager {
50166 void setProperty(<ref>SystemSettingType</ref> type,
50168 <ref>SuccessCallback</ref> successCallback,
50169 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50171 void getProperty(<ref>SystemSettingType</ref> type,
50172 <ref>SystemSettingSuccessCallback</ref> successCallback,
50173 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50177 [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50178 void onsuccess(DOMString value);
50184 This API provides interfaces and methods providing Web applications with access to various values of the system.
50188 This API provides an interface and method through features such as:
50196 INCOMING_CALL </li>
50198 NOTIFICATION_EMAIL </li>
50201 For more information on the SystemSetting features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/systemsetting.htm">System Setting Guide</a>.
50208 <Interface name="SystemSettingObject" id="::SystemSetting::SystemSettingObject">
50209 <webidl> [NoInterfaceObject] interface SystemSettingObject {
50210 readonly attribute <ref>SystemSettingManager</ref> systemsetting;
50214 This interface defines what is instantiated by the <em>Tizen </em>object from the Tizen Platform.
50218 There will be a <em>tizen.systemsetting </em>object that allows accessing the functionality of the SystemSetting API.
50225 <ExtendedAttributeList>
50226 <ExtendedAttribute name="NoInterfaceObject">
50227 <webidl>NoInterfaceObject</webidl>
50228 </ExtendedAttribute>
50229 </ExtendedAttributeList>
50230 <Attribute readonly="readonly" name="systemsetting" id="::SystemSetting::SystemSettingObject::systemsetting">
50231 <webidl> readonly attribute <ref>SystemSettingManager</ref> systemsetting;</webidl>
50232 <Type name="SystemSettingManager"/>
50235 <Implements name1="Tizen" name2="SystemSettingObject">
50236 <webidl> <ref>Tizen</ref> implements <ref>SystemSettingObject</ref>;</webidl>
50238 <Enum name="SystemSettingType" id="::SystemSetting::SystemSettingType">
50239 <webidl> enum SystemSettingType {"HOME_SCREEN", "LOCK_SCREEN", "INCOMING_CALL", "NOTIFICATION_EMAIL"};</webidl>
50242 This enumerator indicates the type of supported system setting.
50243 The following values are supported in this release:
50248 HOME_SCREEN - For homescreen background image. </li>
50250 LOCK_SCREEN - For lockscreen background image. </li>
50252 INCOMING_CALL - For incoming call ringtone. </li>
50254 NOTIFICATION_EMAIL - For email notification alert tone. </li>
50257 Defines supporting setting types.
50258 The HOME_SCREEN and LOCK_SCREEN are supported for images files.
50259 The INCOMING_CALL and NOTIFICATION_EMAIL are support for sound files.
50266 <EnumValue stringvalue="HOME_SCREEN">
50267 <webidl>"HOME_SCREEN</webidl>
50269 <EnumValue stringvalue="LOCK_SCREEN">
50270 <webidl> "LOCK_SCREEN</webidl>
50272 <EnumValue stringvalue="INCOMING_CALL">
50273 <webidl> "INCOMING_CALL</webidl>
50275 <EnumValue stringvalue="NOTIFICATION_EMAIL">
50276 <webidl> "NOTIFICATION_EMAIL</webidl>
50279 <Interface name="SystemSettingManager" id="::SystemSetting::SystemSettingManager">
50280 <webidl> [NoInterfaceObject] interface SystemSettingManager {
50282 void setProperty(<ref>SystemSettingType</ref> type,
50284 <ref>SuccessCallback</ref> successCallback,
50285 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50287 void getProperty(<ref>SystemSettingType</ref> type,
50288 <ref>SystemSettingSuccessCallback</ref> successCallback,
50289 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
50294 This is the top-level interface for the SystemSetting API that provides
50295 access to the module functionalities.
50298 <ExtendedAttributeList>
50299 <ExtendedAttribute name="NoInterfaceObject">
50300 <webidl>NoInterfaceObject</webidl>
50301 </ExtendedAttribute>
50302 </ExtendedAttributeList>
50303 <Operation name="setProperty" id="::SystemSetting::SystemSettingManager::setProperty">
50304 <webidl> void setProperty(<ref>SystemSettingType</ref> type,
50306 <ref>SuccessCallback</ref> successCallback,
50307 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50310 Sets the property of a device.
50314 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.
50322 The ErrorCallback is launched with these error types:
50326 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50328 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50330 UnknownError - If any other error occurs. </li>
50337 http://tizen.org/privilege/setting
50339 <Code> // Define the success callback
50340 function successCallback() {
50341 console.log("Success to setProperty");
50344 // Define the error callback.
50345 function errorCallback(error) {
50346 console.log("Fail to setProperty" + error.message);
50349 tizen.systemsetting.setProperty("HOME_SCREEN", "/opt/usr/media/Images/image1.jpg", successCallback, errorCallback);
50353 <Type type="void"/>
50355 <Argument name="type">
50358 The setting type to set.
50361 <Type name="SystemSettingType"/>
50363 <Argument name="value">
50366 The location path of a wallpaper or ringtone file.
50369 <Type type="DOMString"/>
50371 <Argument name="successCallback">
50374 To be invoked if the setting value is successfully set.
50377 <Type name="SuccessCallback"/>
50379 <Argument optional="optional" name="errorCallback">
50382 To be invoked if the setting value cannot be set.
50385 <Type name="ErrorCallback" nullable="nullable"/>
50389 <RaiseException name="WebAPIException">
50392 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50395 with error type NotSupportedError, if this feature is not supported.
50398 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50401 with error type SecurityError, if this functionality is not allowed.
50404 with error type UnknownError in any other error case.
50410 <Operation name="getProperty" id="::SystemSetting::SystemSettingManager::getProperty">
50411 <webidl> void getProperty(<ref>SystemSettingType</ref> type,
50412 <ref>SystemSettingSuccessCallback</ref> successCallback,
50413 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
50416 Gets the value of the property of a device.
50420 This method allows the user to get the value of the specified system property as wallpaper or ringtone of a device.
50428 The ErrorCallback is launched with these error types:
50432 TypeMismatchError - If any input parameter is not compatible with the expected type for that parameter. </li>
50434 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
50436 UnknownError - If any other error occurs. </li>
50439 <Code> // Define the success callback
50440 function getPropertySuccessCallback(value) {
50441 console.log("Success to getProperty : " + value);
50444 // Define the error callback.
50445 function errorCallback(error) {
50446 console.log("Fail to getProperty" + error.message);
50449 tizen.systemsetting.getProperty("HOME_SCREEN", getPropertySuccessCallback, errorCallback);
50453 <Type type="void"/>
50455 <Argument name="type">
50458 The type of the property to get.
50461 <Type name="SystemSettingType"/>
50463 <Argument name="successCallback">
50466 To be invoked if the setting value is successfully retrieved.
50469 <Type name="SystemSettingSuccessCallback"/>
50471 <Argument optional="optional" name="errorCallback">
50474 To be invoked if the setting value cannot be retrieved.
50477 <Type name="ErrorCallback" nullable="nullable"/>
50481 <RaiseException name="WebAPIException">
50484 with error type InvalidValuesError, if any of the input parameters contain an invalid value.
50487 with error type NotSupportedError, if this feature is not supported.
50490 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
50493 with error type UnknownError in any other error case.
50500 <Interface name="SystemSettingSuccessCallback" id="::SystemSetting::SystemSettingSuccessCallback">
50501 <webidl> [Callback=FunctionOnly, NoInterfaceObject] interface SystemSettingSuccessCallback {
50502 void onsuccess(DOMString value);
50506 The success callback for getProperty().
50512 <ExtendedAttributeList>
50513 <ExtendedAttribute name="Callback" value="FunctionOnly">
50514 <webidl>Callback</webidl>
50515 </ExtendedAttribute>
50516 <ExtendedAttribute name="NoInterfaceObject">
50517 <webidl> NoInterfaceObject</webidl>
50518 </ExtendedAttribute>
50519 </ExtendedAttributeList>
50520 <Operation name="onsuccess" id="::SystemSetting::SystemSettingSuccessCallback::onsuccess">
50521 <webidl> void onsuccess(DOMString value);</webidl>
50522 <Type type="void"/>
50524 <Argument name="value">
50525 <Type type="DOMString"/>
50531 <Module name="Time" id="::Time">
50532 <webidl>module Time {
50534 enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };
50536 [NoInterfaceObject] interface TimeManagerObject {
50537 readonly attribute <ref>TimeUtil</ref> time;
50539 <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;
50541 [NoInterfaceObject] interface TimeUtil {
50542 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50544 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50546 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50548 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50550 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50552 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50556 [Constructor(optional Date? datetime, optional DOMString? timezone),
50557 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
50562 void setDate(long date);
50566 long getFullYear();
50568 void setFullYear(long year);
50572 void setHours(long hours);
50574 long getMilliseconds();
50576 void setMilliseconds(long ms);
50580 void setMinutes(long minutes);
50584 void setMonth(long month);
50588 void setSeconds(long seconds);
50592 void setUTCDate(long date);
50596 long getUTCFullYear();
50598 void setUTCFullYear(long year);
50600 long getUTCHours();
50602 void setUTCHours(long hours);
50604 long getUTCMilliseconds();
50606 void setUTCMilliseconds(long ms);
50608 long getUTCMinutes();
50610 void setUTCMinutes(long minutes);
50612 long getUTCMonth();
50614 void setUTCMonth(long month);
50616 long getUTCSeconds();
50618 void setUTCSeconds(long seconds);
50620 DOMString getTimezone();
50622 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
50624 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
50626 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
50628 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50630 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50632 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50634 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
50636 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
50638 DOMString toLocaleDateString();
50640 DOMString toLocaleTimeString();
50642 DOMString toLocaleString();
50644 DOMString toDateString();
50646 DOMString toTimeString();
50648 DOMString toString();
50650 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
50652 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
50654 boolean isDST() raises(<ref>WebAPIException</ref>);
50656 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
50658 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
50661 [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
50662 interface TimeDuration
50664 attribute long long length;
50666 attribute <ref>TimeDurationUnit</ref> unit;
50668 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50670 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50672 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50674 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
50679 The Time API provides information regarding date / time and time zones.
50686 The JavaScript Date object does not have full timezone support.
50687 Date objects allow only simple representations to denote a particular location's
50688 offset from Universal Coordinated Time (UTC). This is typically provided as a +/-
50689 offset from UTC-0 (also known as Greenwich Mean Time, or GMT) for example, +05:30 denotes
50690 that a location is 5 hours and 30 minutes ahead of UTC +00:00.
50691 The issue with this method is not getting the correct
50692 local time for a given date. The existing methods are sufficient for this purpose.
50693 The issue is correctly converting to and from local time and UTC for all points in
50694 time - in any of the past, present, and future - based on an initial time provided.
50695 This is important for defining relative dates, where a time in a given location may
50696 observe different UTC offsets, according to any Daylight Savings Rules (DST) in effect
50697 or any other changes that may occur to a location's time zone over time.
50698 Without the communication of the explicit time zone rules governing a given date and
50699 time, the ability to effectively calculate the offset of the local time to UTC or to
50700 any other time zone at any point in the past or future is lost.
50703 This API can be used to get TZDate objects with full time zone support, convert them
50704 between timezones, retrieve available timezones.
50707 For more information on the Time features, see <a href="../../org.tizen.web.appprogramming/html/guide/sys_guide/time.htm">Time Guide</a>.
50711 <Enum name="TimeDurationUnit" id="::Time::TimeDurationUnit">
50712 <webidl> enum TimeDurationUnit { "MSECS", "SECS", "MINS", "HOURS", "DAYS" };</webidl>
50715 TimeDuration unit (milliseconds, seconds, minutes, hours or days).
50719 At least the following values must be supported:
50723 MSECS - Indicates a duration in milliseconds </li>
50725 SECS - Indicates a duration in seconds </li>
50727 MINS - Indicates a duration in minutes </li>
50729 HOURS - Indicates a duration in hours </li>
50731 DAYS - Indicates a duration in days </li>
50738 <EnumValue stringvalue="MSECS">
50739 <webidl> "MSECS</webidl>
50741 <EnumValue stringvalue="SECS">
50742 <webidl> "SECS</webidl>
50744 <EnumValue stringvalue="MINS">
50745 <webidl> "MINS</webidl>
50747 <EnumValue stringvalue="HOURS">
50748 <webidl> "HOURS</webidl>
50750 <EnumValue stringvalue="DAYS">
50751 <webidl> "DAYS</webidl>
50754 <Interface name="TimeManagerObject" id="::Time::TimeManagerObject">
50755 <webidl> [NoInterfaceObject] interface TimeManagerObject {
50756 readonly attribute <ref>TimeUtil</ref> time;
50760 Defines what is instantiated in the tizen object by the Tizen Platform.
50764 There will be a tizen.time object that allows accessing the
50765 functionality of the Time API.
50772 <ExtendedAttributeList>
50773 <ExtendedAttribute name="NoInterfaceObject">
50774 <webidl>NoInterfaceObject</webidl>
50775 </ExtendedAttribute>
50776 </ExtendedAttributeList>
50777 <Attribute readonly="readonly" name="time" id="::Time::TimeManagerObject::time">
50778 <webidl> readonly attribute <ref>TimeUtil</ref> time;</webidl>
50779 <Type name="TimeUtil"/>
50782 <Implements name1="Tizen" name2="TimeManagerObject">
50783 <webidl> <ref>Tizen</ref> implements <ref>TimeManagerObject</ref>;</webidl>
50785 <Interface name="TimeUtil" id="::Time::TimeUtil">
50786 <webidl> [NoInterfaceObject] interface TimeUtil {
50787 <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);
50789 DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);
50791 DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);
50793 DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);
50795 DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);
50797 boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);
50801 The TimeUtil class that provides access to the time API.
50805 This interface offers methods to manage date / time as well as timezones such as:
50809 Get the current date / time using getCurrentDateTime(). </li>
50811 Get timezones using getLocalTimezone() and getAvailableTimezones(). </li>
50818 <ExtendedAttributeList>
50819 <ExtendedAttribute name="NoInterfaceObject">
50820 <webidl>NoInterfaceObject</webidl>
50821 </ExtendedAttribute>
50822 </ExtendedAttributeList>
50823 <Operation name="getCurrentDateTime" id="::Time::TimeUtil::getCurrentDateTime">
50824 <webidl> <ref>TZDate</ref> getCurrentDateTime() raises(<ref>WebAPIException</ref>);</webidl>
50827 Returns the current date / time.
50832 <Code> var current_dt = tizen.time.getCurrentDateTime();
50833 console.log("current date / time is " + current_dt.toLocaleString());
50836 <Type name="TZDate">
50839 TZDate Current TZDate object.
50845 <RaiseException name="WebAPIException">
50848 with error type UnknownError, if the call failed due to an unknown error.
50854 <Operation name="getLocalTimezone" id="::Time::TimeUtil::getLocalTimezone">
50855 <webidl> DOMString getLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
50858 Returns identifier of the local system timezone.
50863 <Code> console.log("The local time zone is " + tizen.time.getLocalTimezone());
50866 <Type type="DOMString">
50869 Timezone Local timezone.
50875 <RaiseException name="WebAPIException">
50878 with error type UnknownError, if the call failed due to an unknown error.
50884 <Operation name="getAvailableTimezones" id="::Time::TimeUtil::getAvailableTimezones">
50885 <webidl> DOMString[] getAvailableTimezones() raises(<ref>WebAPIException</ref>);</webidl>
50888 Returns synchronously the identifiers of the timezones supported by the device.
50892 Zero or more slashes separate different components of a timezone identifier,
50893 with the most general descriptor first and the most specific one last. For example,
50894 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
50900 <Code> var tzids = tizen.time.getAvailableTimezones();
50901 console.log("The device supports " + tzids.length + " time zones.");
50904 <Type type="array">
50907 Array of time zone identifiers.
50910 <Type type="DOMString"/>
50914 <RaiseException name="WebAPIException">
50917 with error type UnknownError, if the call failed due to an unknown error.
50923 <Operation name="getDateFormat" id="::Time::TimeUtil::getDateFormat">
50924 <webidl> DOMString getDateFormat(optional boolean? shortformat) raises(<ref>WebAPIException</ref>);</webidl>
50928 Returns the date format according to the system's locale settings.
50931 These expressions may be used in the returned string:
50935 "d" = day number (1 to 31) </li>
50937 "D" = day name </li>
50939 "m" = month number (1 to 12) </li>
50941 "M" = month name </li>
50943 "y" = year </li>
50946 Examples of string formats include: "d/m/y", "y-d-m", "D, M d y".
50953 <Type type="DOMString">
50956 DOMString The date format according to the system's locale settings.
50961 <Argument optional="optional" name="shortformat">
50964 Flag indicating if the user is interested in the short
50965 date format (23/10/2011) instead of a long date format ("Monday, October 23 2011").
50966 By default, this attribute is set to false.
50969 <Type type="boolean" nullable="nullable"/>
50973 <RaiseException name="WebAPIException">
50976 with error type UnknownError, if the call failed due to an unknown error.
50982 <Operation name="getTimeFormat" id="::Time::TimeUtil::getTimeFormat">
50983 <webidl> DOMString getTimeFormat() raises(<ref>WebAPIException</ref>);</webidl>
50987 Returns the time format according to the system's locale settings.
50990 These expressions may be used in the returned string:
50994 "h" = hours (0 to 23 or 1 to 12 if AM/PM display) </li>
50996 "m" = minutes (0 to 59) </li>
50998 "s" = seconds (0 to 59) </li>
51000 "ap" = AM/PM display </li>
51003 Examples of string formats include: "h:m:s ap", "h:m:s".
51010 <Type type="DOMString">
51013 DOMString The time format according to the system's locale settings.
51019 <RaiseException name="WebAPIException">
51022 with error type UnknownError, if the call failed due to an unknown error.
51028 <Operation name="isLeapYear" id="::Time::TimeUtil::isLeapYear">
51029 <webidl> boolean isLeapYear(long year) raises(<ref>WebAPIException</ref>);</webidl>
51032 Returns <em>true</em> if the given year is a leap year.
51037 <Code> var current_dt = tizen.time.getCurrentDateTime();
51038 var is_leap = tizen.time.isLeapYear(current_dt.getFullYear());
51040 console.log("This year is a leap year.");
51043 <Type type="boolean">
51046 boolean <em>true</em>, if the year is a leap year.
51051 <Argument name="year">
51057 <Type type="long"/>
51061 <RaiseException name="WebAPIException">
51064 with error type TypeMismatchError, if the input parameter
51065 is not compatible with the expected type for that parameter.
51068 with error type InvalidValuesError, if any of the input
51069 parameters contain an invalid value.
51072 with error type UnknownError, if the call failed due to an unknown error.
51079 <Interface name="TZDate" id="::Time::TZDate">
51080 <webidl> [Constructor(optional Date? datetime, optional DOMString? timezone),
51081 Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)]
51086 void setDate(long date);
51090 long getFullYear();
51092 void setFullYear(long year);
51096 void setHours(long hours);
51098 long getMilliseconds();
51100 void setMilliseconds(long ms);
51104 void setMinutes(long minutes);
51108 void setMonth(long month);
51112 void setSeconds(long seconds);
51116 void setUTCDate(long date);
51120 long getUTCFullYear();
51122 void setUTCFullYear(long year);
51124 long getUTCHours();
51126 void setUTCHours(long hours);
51128 long getUTCMilliseconds();
51130 void setUTCMilliseconds(long ms);
51132 long getUTCMinutes();
51134 void setUTCMinutes(long minutes);
51136 long getUTCMonth();
51138 void setUTCMonth(long month);
51140 long getUTCSeconds();
51142 void setUTCSeconds(long seconds);
51144 DOMString getTimezone();
51146 <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);
51148 <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);
51150 <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);
51152 <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51154 boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51156 boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51158 boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);
51160 <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);
51162 DOMString toLocaleDateString();
51164 DOMString toLocaleTimeString();
51166 DOMString toLocaleString();
51168 DOMString toDateString();
51170 DOMString toTimeString();
51172 DOMString toString();
51174 DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);
51176 long secondsFromUTC() raises(<ref>WebAPIException</ref>);
51178 boolean isDST() raises(<ref>WebAPIException</ref>);
51180 <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);
51182 <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);
51186 The TZDate object represents information regarding a given
51187 date / time in a predefined timezone.
51188 If its date / time is exceed the platform limit, TZDate will be invalid.
51194 <ExtendedAttributeList>
51195 <ExtendedAttribute name="Constructor">
51196 <webidl>Constructor(optional Date? datetime, optional DOMString? timezone)</webidl>
51198 <Argument optional="optional" name="datetime">
51199 <Type type="Date" nullable="nullable"/>
51201 <Argument optional="optional" name="timezone">
51202 <Type type="DOMString" nullable="nullable"/>
51205 </ExtendedAttribute>
51206 <ExtendedAttribute name="Constructor">
51207 <webidl> Constructor(long year, long month, long day, optional long? hours, optional long? minutes, optional long? seconds, optional long? milliseconds, optional DOMString? timezone)</webidl>
51212 <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>
51217 <Argument name="year">
51218 <Type type="long"/>
51220 <Argument name="month">
51221 <Type type="long"/>
51223 <Argument name="day">
51224 <Type type="long"/>
51226 <Argument optional="optional" name="hours">
51227 <Type type="long" nullable="nullable"/>
51229 <Argument optional="optional" name="minutes">
51230 <Type type="long" nullable="nullable"/>
51232 <Argument optional="optional" name="seconds">
51233 <Type type="long" nullable="nullable"/>
51235 <Argument optional="optional" name="milliseconds">
51236 <Type type="long" nullable="nullable"/>
51238 <Argument optional="optional" name="timezone">
51239 <Type type="DOMString" nullable="nullable"/>
51242 </ExtendedAttribute>
51243 </ExtendedAttributeList>
51244 <Operation name="getDate" id="::Time::TZDate::getDate">
51245 <webidl> long getDate();</webidl>
51248 Returns the day of the month (from 1-31).
51257 long The day of the month.
51263 <Operation name="setDate" id="::Time::TZDate::setDate">
51264 <webidl> void setDate(long date);</webidl>
51267 Sets the day of the month (from 1-31).
51271 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51272 For example, if TZDate's month is May and parameter is 32, it will be June 1.
51279 <Type type="void"/>
51281 <Argument name="date">
51287 <Type type="long"/>
51291 <Operation name="getDay" id="::Time::TZDate::getDay">
51292 <webidl> long getDay();</webidl>
51295 Returns the day of the week (from 0-6).
51304 long The day of the week.
51310 <Operation name="getFullYear" id="::Time::TZDate::getFullYear">
51311 <webidl> long getFullYear();</webidl>
51318 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51319 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51335 <Operation name="setFullYear" id="::Time::TZDate::setFullYear">
51336 <webidl> void setFullYear(long year);</webidl>
51345 <Type type="void"/>
51347 <Argument name="year">
51353 <Type type="long"/>
51357 <Operation name="getHours" id="::Time::TZDate::getHours">
51358 <webidl> long getHours();</webidl>
51361 Returns the hour (0-23).
51376 <Operation name="setHours" id="::Time::TZDate::setHours">
51377 <webidl> void setHours(long hours);</webidl>
51380 Sets the hour (0-23).
51384 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51385 For example, if hours is 24, it will set 0 and add to a date.
51392 <Type type="void"/>
51394 <Argument name="hours">
51400 <Type type="long"/>
51404 <Operation name="getMilliseconds" id="::Time::TZDate::getMilliseconds">
51405 <webidl> long getMilliseconds();</webidl>
51408 Returns the milliseconds (from 0-999).
51417 long The milliseconds.
51423 <Operation name="setMilliseconds" id="::Time::TZDate::setMilliseconds">
51424 <webidl> void setMilliseconds(long ms);</webidl>
51427 Sets the milliseconds (from 0-999).
51431 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51432 For example, if ms is 1000, it will set 0 and add to a second.
51439 <Type type="void"/>
51441 <Argument name="ms">
51444 Milliseconds to set.
51447 <Type type="long"/>
51451 <Operation name="getMinutes" id="::Time::TZDate::getMinutes">
51452 <webidl> long getMinutes();</webidl>
51455 Returns the minutes (from 0-59).
51470 <Operation name="setMinutes" id="::Time::TZDate::setMinutes">
51471 <webidl> void setMinutes(long minutes);</webidl>
51478 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51479 For example, if minutes is 60, it will set 0 and add to an hour.
51486 <Type type="void"/>
51488 <Argument name="minutes">
51494 <Type type="long"/>
51498 <Operation name="getMonth" id="::Time::TZDate::getMonth">
51499 <webidl> long getMonth();</webidl>
51502 Returns the month (from 0-11).
51517 <Operation name="setMonth" id="::Time::TZDate::setMonth">
51518 <webidl> void setMonth(long month);</webidl>
51521 Sets the month (from 0-11).
51525 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51526 For example, if month is 12, it will set 0 and add to a year.
51533 <Type type="void"/>
51535 <Argument name="month">
51541 <Type type="long"/>
51545 <Operation name="getSeconds" id="::Time::TZDate::getSeconds">
51546 <webidl> long getSeconds();</webidl>
51549 Returns the seconds (from 0-59).
51564 <Operation name="setSeconds" id="::Time::TZDate::setSeconds">
51565 <webidl> void setSeconds(long seconds);</webidl>
51568 Sets the seconds (from 0-59).
51572 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51573 For example, if seconds is 60, it will set 0 and add to a minute.
51580 <Type type="void"/>
51582 <Argument name="seconds">
51588 <Type type="long"/>
51592 <Operation name="getUTCDate" id="::Time::TZDate::getUTCDate">
51593 <webidl> long getUTCDate();</webidl>
51596 Returns the day of the month, according to universal time (from 1-31).
51605 long The day of the month, according to universal time.
51611 <Operation name="setUTCDate" id="::Time::TZDate::setUTCDate">
51612 <webidl> void setUTCDate(long date);</webidl>
51615 Sets the day of the month, according to universal time (from 1-31).
51619 If it tries to set the day bigger than the last day of the month or smaller than 1, it will be calculated automatically.
51620 For example, if TZDate's month is May and date is 32, it will be June 1.
51627 <Type type="void"/>
51629 <Argument name="date">
51635 <Type type="long"/>
51639 <Operation name="getUTCDay" id="::Time::TZDate::getUTCDay">
51640 <webidl> long getUTCDay();</webidl>
51643 Returns the day of the week, according to universal time (from 0-6).
51652 long The day of the week, according to universal time.
51658 <Operation name="getUTCFullYear" id="::Time::TZDate::getUTCFullYear">
51659 <webidl> long getUTCFullYear();</webidl>
51662 Returns the year, according to universal time.
51666 Positive values indicate AD(Anno Domini) years. 0 and negative values indicate BC(Before Christ) years.
51667 For example, 1 = AD 1, 0 = BC 1, -1 = BC 2.
51677 long The year, according to universal time.
51683 <Operation name="setUTCFullYear" id="::Time::TZDate::setUTCFullYear">
51684 <webidl> void setUTCFullYear(long year);</webidl>
51687 Sets the year, according to universal time.
51693 <Type type="void"/>
51695 <Argument name="year">
51701 <Type type="long"/>
51705 <Operation name="getUTCHours" id="::Time::TZDate::getUTCHours">
51706 <webidl> long getUTCHours();</webidl>
51709 Returns the hour, according to universal time (0-23).
51718 long The hour, according to universal time.
51724 <Operation name="setUTCHours" id="::Time::TZDate::setUTCHours">
51725 <webidl> void setUTCHours(long hours);</webidl>
51728 Sets the hour, according to universal time (0-23).
51732 If it tries to set the hour bigger than 23 or smaller than 0, it will be calculated automatically.
51733 For example, if hours is 24, it will set 0 and add to a date.
51740 <Type type="void"/>
51742 <Argument name="hours">
51748 <Type type="long"/>
51752 <Operation name="getUTCMilliseconds" id="::Time::TZDate::getUTCMilliseconds">
51753 <webidl> long getUTCMilliseconds();</webidl>
51756 Returns the milliseconds, according to universal time (from 0-999).
51765 long The milliseconds, according to universal time.
51771 <Operation name="setUTCMilliseconds" id="::Time::TZDate::setUTCMilliseconds">
51772 <webidl> void setUTCMilliseconds(long ms);</webidl>
51775 Sets the milliseconds, according to universal time (from 0-999).
51779 If it tries to set the millisecond bigger than 999 or smaller than 0, it will be calculated automatically.
51780 For example, if ms is 1000, it will set 0 and add to a second.
51787 <Type type="void"/>
51789 <Argument name="ms">
51792 Milliseconds to set.
51795 <Type type="long"/>
51799 <Operation name="getUTCMinutes" id="::Time::TZDate::getUTCMinutes">
51800 <webidl> long getUTCMinutes();</webidl>
51803 Returns the minutes, according to universal time (from 0-59).
51812 long The minutes, according to universal time.
51818 <Operation name="setUTCMinutes" id="::Time::TZDate::setUTCMinutes">
51819 <webidl> void setUTCMinutes(long minutes);</webidl>
51822 Sets the minutes, according to universal time (from 0-59).
51826 If it tries to set the minute bigger than 59 or smaller than 0, it will be calculated automatically.
51827 For example, if minutes is 60, it will set 0 and add to an hour.
51834 <Type type="void"/>
51836 <Argument name="minutes">
51842 <Type type="long"/>
51846 <Operation name="getUTCMonth" id="::Time::TZDate::getUTCMonth">
51847 <webidl> long getUTCMonth();</webidl>
51850 Returns the month, according to universal time (from 0-11).
51859 long The month, according to universal time.
51865 <Operation name="setUTCMonth" id="::Time::TZDate::setUTCMonth">
51866 <webidl> void setUTCMonth(long month);</webidl>
51869 Sets the month, according to universal time (from 0-11).
51873 If it tries to set the month bigger than 11 or smaller than 0, it will be calculated automatically.
51874 For example, if month is 12, it will set 0 and add to a year.
51881 <Type type="void"/>
51883 <Argument name="month">
51889 <Type type="long"/>
51893 <Operation name="getUTCSeconds" id="::Time::TZDate::getUTCSeconds">
51894 <webidl> long getUTCSeconds();</webidl>
51897 Returns the seconds, according to universal time (from 0-59).
51906 long The seconds, according to universal time.
51912 <Operation name="setUTCSeconds" id="::Time::TZDate::setUTCSeconds">
51913 <webidl> void setUTCSeconds(long seconds);</webidl>
51916 Sets the seconds, according to universal time (from 0-59).
51920 If it tries to set the second bigger than 59 or smaller than 0, it will be calculated automatically.
51921 For example, if seconds is 60, it will set 0 and add to a minute.
51928 <Type type="void"/>
51930 <Argument name="seconds">
51936 <Type type="long"/>
51940 <Operation name="getTimezone" id="::Time::TZDate::getTimezone">
51941 <webidl> DOMString getTimezone();</webidl>
51944 Returns timezone identifier.
51948 Zero or more slashes separate different components, with the most general
51949 descriptor first and the most specific one last. For example,
51950 'Europe/Berlin', 'America/Argentina/Buenos_Aires'.
51953 This attribute uniquely identifies the timezone.
51960 <Type type="DOMString">
51963 DOMString String timezone identifier. If TZDate is invalid, it will return 'Invalid Date'.
51969 <Operation name="toTimezone" id="::Time::TZDate::toTimezone">
51970 <webidl> <ref>TZDate</ref> toTimezone(DOMString tzid) raises(<ref>WebAPIException</ref>);</webidl>
51973 Returns a copy of the TZDate converted to a given time zone.
51979 <Type name="TZDate">
51982 TZDate New TZDate in given Timezone.
51987 <Argument name="tzid">
51990 Timezone identifier to set.
51993 <Type type="DOMString"/>
51997 <RaiseException name="WebAPIException">
52000 with error type TypeMismatchError, if the input parameter
52001 is not compatible with the expected type for that parameter.
52004 with error type InvalidValuesError, if the provided TZID
52005 is not recognized as a valid timezone identifier.
52008 with error type UnknownError, if the call failed due to an unknown error.
52014 <Operation name="toLocalTimezone" id="::Time::TZDate::toLocalTimezone">
52015 <webidl> <ref>TZDate</ref> toLocalTimezone() raises(<ref>WebAPIException</ref>);</webidl>
52018 Returns a copy of the TZDate converted to the local time zone.
52024 <Type name="TZDate">
52027 TZDate The new TZDate in local Timezone.
52033 <RaiseException name="WebAPIException">
52036 with error type UnknownError, if the call failed due to an unknown error.
52042 <Operation name="toUTC" id="::Time::TZDate::toUTC">
52043 <webidl> <ref>TZDate</ref> toUTC() raises(<ref>WebAPIException</ref>);</webidl>
52046 Returns a copy of the TZDate converted to Coordinated Universal Time (UTC).
52052 <Type name="TZDate">
52055 TZDate Date/Time in UTC.
52061 <RaiseException name="WebAPIException">
52064 with error type UnknownError, if the call failed due to an unknown error.
52070 <Operation name="difference" id="::Time::TZDate::difference">
52071 <webidl> <ref>TimeDuration</ref> difference(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52074 Calculates the difference with another TZDate object.
52078 Calculates the difference in time between <em>this</em> and other.
52079 This comparison method takes timezones into consideration for the comparison.
52082 The TimeDuration that is returned is effectively <em>this</em> - other.
52083 The return value is a duration in milliseconds both TZDate objects have a time component, in days, otherwise.
52084 The result value will be:
52088 Negative, if other is in the future </li>
52090 0 if the two date / times are equal </li>
52092 Positive, if other is in the past </li>
52099 <Type name="TimeDuration">
52102 TimeDuration Duration in milliseconds between the two date / time objects
52103 (or in days for comparison between dates with no time component).
52108 <Argument name="other">
52111 Other Date/Time to compare to.
52114 <Type name="TZDate"/>
52118 <RaiseException name="WebAPIException">
52121 with error type TypeMismatchError, if the input parameter
52122 is not compatible with the expected type for that parameter.
52125 with error type UnknownError, if the call failed due to an unknown error.
52131 <Operation name="equalsTo" id="::Time::TZDate::equalsTo">
52132 <webidl> boolean equalsTo(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52135 Checks if the TZDate is equal to another.
52139 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.
52146 <Type type="boolean">
52149 boolean <em>true</em> if the 2 date/times are the same.
52154 <Argument name="other">
52157 Other Date/Time to compare to.
52160 <Type name="TZDate"/>
52164 <RaiseException name="WebAPIException">
52167 with error type TypeMismatchError, if the input parameter
52168 is not compatible with the expected type for that parameter.
52171 with error type UnknownError, if the call failed due to an unknown error.
52177 <Operation name="earlierThan" id="::Time::TZDate::earlierThan">
52178 <webidl> boolean earlierThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52181 Checks if the TZDate is earlier than another.
52185 This method takes the timezones into consideration.
52192 <Type type="boolean">
52195 boolean <em>true</em>, if the Date/Time is earlier than the one passed in argument.
52200 <Argument name="other">
52203 Other Date/Time to compare to.
52206 <Type name="TZDate"/>
52210 <RaiseException name="WebAPIException">
52213 with error type TypeMismatchError, if the input parameter
52214 is not compatible with the expected type for that parameter.
52217 with error type UnknownError, if the call failed due to an unknown error.
52223 <Operation name="laterThan" id="::Time::TZDate::laterThan">
52224 <webidl> boolean laterThan(<ref>TZDate</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52227 Checks if the TZDate is later than another.
52231 This method takes the timezones into consideration.
52238 <Type type="boolean">
52241 boolean <em>true</em>, if the Date/Time is later than the one passed in argument.
52246 <Argument name="other">
52249 Other Date/Time to compare to.
52252 <Type name="TZDate"/>
52256 <RaiseException name="WebAPIException">
52259 with error type TypeMismatchError, if the input parameter
52260 is not compatible with the expected type for that parameter.
52263 with error type UnknownError, if the call failed due to an unknown error.
52269 <Operation name="addDuration" id="::Time::TZDate::addDuration">
52270 <webidl> <ref>TZDate</ref> addDuration(<ref>TimeDuration</ref> duration) raises(<ref>WebAPIException</ref>);</webidl>
52273 Returns a new date by adding a duration to the current TZDate object.
52277 If the length of duration is negative, the new date / time will be
52278 earlier than it used to.
52281 Note that calling this method does not alter the current object.
52287 <Code> var now = tizen.time.getCurrentDateTime();
52288 var in_one_week = now.addDuration(new tizen.TimeDuration(7, "DAYS"));
52291 <Type name="TZDate">
52294 TZDate The new TZDate by adding a duration.
52299 <Argument name="duration">
52302 TimeDuration to add.
52305 <Type name="TimeDuration"/>
52309 <RaiseException name="WebAPIException">
52312 with error type TypeMismatchError, if the input parameter
52313 is not compatible with the expected type for that parameter.
52316 with error type UnknownError, if the call failed due to an unknown error.
52322 <Operation name="toLocaleDateString" id="::Time::TZDate::toLocaleDateString">
52323 <webidl> DOMString toLocaleDateString();</webidl>
52326 Returns the date portion of a TZDate object as a string, using locale conventions.
52332 <Type type="DOMString">
52335 DOMString Date portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52341 <Operation name="toLocaleTimeString" id="::Time::TZDate::toLocaleTimeString">
52342 <webidl> DOMString toLocaleTimeString();</webidl>
52345 Returns the time portion of a TZDate object as a string, using locale conventions.
52351 <Type type="DOMString">
52354 DOMString Time portion of the TZDate object as a string, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52360 <Operation name="toLocaleString" id="::Time::TZDate::toLocaleString">
52361 <webidl> DOMString toLocaleString();</webidl>
52364 Converts a TZDate object to a string, using locale conventions.
52370 <Type type="DOMString">
52373 DOMString String representation of the TZDate object, using locale conventions. If TZDate is invalid, it will return 'Invalid Date'.
52379 <Operation name="toDateString" id="::Time::TZDate::toDateString">
52380 <webidl> DOMString toDateString();</webidl>
52383 Returns the date portion of a TZDate object as a string.
52389 <Type type="DOMString">
52392 DOMString Date portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52398 <Operation name="toTimeString" id="::Time::TZDate::toTimeString">
52399 <webidl> DOMString toTimeString();</webidl>
52402 Returns the time portion of a TZDate object as a string.
52408 <Type type="DOMString">
52411 DOMString Time portion of the TZDate object as a string. If TZDate is invalid, it will return 'Invalid Date'.
52417 <Operation name="toString" id="::Time::TZDate::toString">
52418 <webidl> DOMString toString();</webidl>
52421 Converts a TZDate object to a string.
52427 <Type type="DOMString">
52430 DOMString String representation of the TZDate object. If TZDate is invalid, it will return 'Invalid Date'.
52436 <Operation name="getTimezoneAbbreviation" id="::Time::TZDate::getTimezoneAbbreviation">
52437 <webidl> DOMString getTimezoneAbbreviation() raises(<ref>WebAPIException</ref>);</webidl>
52440 Determines the time zone abbreviation to be used at a particular date in the time zone.
52444 For example, in Toronto this is currently "EST" during the winter months and "EDT" during the
52445 summer months when daylight savings time is in effect.
52452 Some timezones return "GMT[+-]hh:mm". It is inconsistent.
52455 <Type type="DOMString">
52458 DOMString Abbreviation of the time zone (such as "EST"). If TZDate is invalid, it will return 'Invalid Date'.
52464 <RaiseException name="WebAPIException">
52467 with error type UnknownError, if the call failed due to an unknown error.
52473 <Operation name="secondsFromUTC" id="::Time::TZDate::secondsFromUTC">
52474 <webidl> long secondsFromUTC() raises(<ref>WebAPIException</ref>);</webidl>
52477 Gets the number of seconds from Coordinated Universal Time (UTC) offset for the timezone.
52481 Returns the offset (in seconds) from UTC of the timezone, accounting for daylight
52482 savings if in effect in the timezone. For example, if time zone is GMT+8, it will return -32,400.
52488 <Code> var offset = tizen.time.getCurrentDateTime().secondsFromUTC();
52489 var myDate = new Date();
52490 var exp_offset = myDate.getTimezoneOffset()*60;
52491 //offset is equals to exp_offset.
52497 long Offset from UTC in seconds.
52503 <RaiseException name="WebAPIException">
52506 with error type UnknownError, if the call failed due to an unknown error.
52512 <Operation name="isDST" id="::Time::TZDate::isDST">
52513 <webidl> boolean isDST() raises(<ref>WebAPIException</ref>);</webidl>
52516 Indicates if Daylight Saving Time(DST) is active for this TZDate.
52520 Indicates if daylight savings are in effect for the time zone and instant
52521 identified by the TZDate object.
52528 <Type type="boolean">
52531 boolean Flag indicating if daylight saving are in effect.
52537 <RaiseException name="WebAPIException">
52540 with error type UnknownError, if the call failed due to an unknown error.
52546 <Operation name="getPreviousDSTTransition" id="::Time::TZDate::getPreviousDSTTransition">
52547 <webidl> <ref>TZDate</ref>? getPreviousDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52550 Returns the date of the previous daylight saving time transition for the timezone.
52556 <Type name="TZDate" nullable="nullable">
52559 TZDate The date of the previous daylight saving transition (before the instant identified by the TZDate).
52565 <RaiseException name="WebAPIException">
52568 with error type UnknownError, if the call failed due to an unknown error.
52574 <Operation name="getNextDSTTransition" id="::Time::TZDate::getNextDSTTransition">
52575 <webidl> <ref>TZDate</ref>? getNextDSTTransition() raises(<ref>WebAPIException</ref>);</webidl>
52578 Returns the date of the next daylight saving time transition for the timezone.
52584 <Type name="TZDate" nullable="nullable">
52587 TZDate The date of the next daylight saving transition (after the instant identified by the TZDate).
52593 <RaiseException name="WebAPIException">
52596 with error type UnknownError, if the call failed due to an unknown error.
52603 <Interface name="TimeDuration" id="::Time::TimeDuration">
52604 <webidl> [Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)]
52605 interface TimeDuration
52607 attribute long long length;
52609 attribute <ref>TimeDurationUnit</ref> unit;
52611 <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52613 boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52615 boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52617 boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);
52621 The TimeDuration object that contains the length and its associated
52627 <Code> var now = tizen.time.getCurrentDateTime();
52628 var tomorrow = now.addDuration(new tizen.TimeDuration(1, "DAYS")); // Becomes tomorrow, same time.
52631 <ExtendedAttributeList>
52632 <ExtendedAttribute name="Constructor">
52633 <webidl>Constructor(long long length, optional <ref>TimeDurationUnit</ref>? unit)</webidl>
52635 <Argument name="length">
52636 <Type type="long long"/>
52638 <Argument optional="optional" name="unit">
52639 <Type name="TimeDurationUnit" nullable="nullable"/>
52642 </ExtendedAttribute>
52643 </ExtendedAttributeList>
52644 <Attribute name="length" id="::Time::TimeDuration::length">
52645 <webidl> attribute long long length;</webidl>
52652 The unit of the duration length (milliseconds, seconds, minutes, hours, or days)
52653 is determined by the duration unit attribute.
52660 <Type type="long long"/>
52662 <Attribute name="unit" id="::Time::TimeDuration::unit">
52663 <webidl> attribute <ref>TimeDurationUnit</ref> unit;</webidl>
52666 Duration unit (milliseconds, seconds, minutes, hours, or days).
52670 The default value is "MSECS" (milliseconds unit).
52677 <Type name="TimeDurationUnit"/>
52679 <Operation name="difference" id="::Time::TimeDuration::difference">
52680 <webidl> <ref>TimeDuration</ref> difference(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52683 Calculates the difference between two TimeDuration objects.
52687 Calculates the difference in time between <em>this</em> and <em>other</em>.
52688 The TimeDuration that is returned is effectively <em>first</em> - <em>other</em> (that is: positive if the first parameter is larger).
52691 The returned TimeDuration is the biggest possible unit without losing the precision.
52697 <Code> // Compute event1.duration - event2.duration
52698 var diff = event1.duration.difference(event2.duration);
52699 if (diff.length > 0)
52700 console.log("event 1's duration is longer than event 2's");
52701 else if (diff.length == 0)
52702 console.log("event 1's duration is as long as event 2's");
52704 console.log("event 1's duration is shorter than event 2's");
52707 <Type name="TimeDuration">
52710 New TimeDuration object corresponding to the result of <em>this</em> - <em>other</em>.
52715 <Argument name="other">
52718 Other TimeDuration object to compare to.
52721 <Type name="TimeDuration"/>
52725 <RaiseException name="WebAPIException">
52728 with error type TypeMismatchError, if the input parameter
52729 is not compatible with the expected type for that parameter.
52732 with error type UnknownError, if the call failed due to an unknown error.
52738 <Operation name="equalsTo" id="::Time::TimeDuration::equalsTo">
52739 <webidl> boolean equalsTo(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52742 Checks if the TimeDuration is equal to another.
52746 This method takes the units into consideration and will return true
52747 if the two TimeDuration objects represent the same duration in different units.
52753 <Code> var d1 = new tizen.TimeDuration(60, "MINS"); // 60 minutes
52754 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52755 var ret = d1.equalsTo(d2); // Returns true
52758 <Type type="boolean">
52761 boolean <em>true</em> if the two TimeDuration object represent the same duration.
52766 <Argument name="other">
52769 Other TimeDuration object to compare to.
52772 <Type name="TimeDuration"/>
52776 <RaiseException name="WebAPIException">
52779 with error type TypeMismatchError, if the input parameter
52780 is not compatible with the expected type for that parameter.
52783 with error type UnknownError, if the call failed due to an unknown error.
52789 <Operation name="lessThan" id="::Time::TimeDuration::lessThan">
52790 <webidl> boolean lessThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52793 Checks if the TimeDuration is lower than another.
52797 This method takes the units into consideration when doing the comparison.
52803 <Code> var d1 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52804 var d2 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52805 var ret = d1.lessThan(d2); // Returns true
52808 <Type type="boolean">
52811 boolean <em>true</em> if the TimeDuration is less than <em>other</em>.
52816 <Argument name="other">
52819 Other TimeDuration object to compare to.
52822 <Type name="TimeDuration"/>
52826 <RaiseException name="WebAPIException">
52829 with error type TypeMismatchError, if the input parameter is not compatible with the expected type for that parameter.
52832 with error type UnknownError, if the call failed due to an unknown error.
52838 <Operation name="greaterThan" id="::Time::TimeDuration::greaterThan">
52839 <webidl> boolean greaterThan(<ref>TimeDuration</ref> other) raises(<ref>WebAPIException</ref>);</webidl>
52842 Checks if the TimeDuration is greater than another.
52846 This method takes the units into consideration when doing the comparison.
52852 <Code> var d1 = new tizen.TimeDuration(120, "MINS"); // 120 minutes
52853 var d2 = new tizen.TimeDuration(1, "HOURS"); // 1 hour
52854 var ret = d1.greaterThan(d2); // Returns true
52857 <Type type="boolean">
52860 boolean <em>true</em> if the TimeDuration is greater than <em>other</em>.
52865 <Argument name="other">
52868 Other TimeDuration object to compare to.
52871 <Type name="TimeDuration"/>
52875 <RaiseException name="WebAPIException">
52878 with error type TypeMismatchError, if the input parameter
52879 is not compatible with the expected type for that parameter.
52882 with error type UnknownError, if the call failed due to an unknown error.
52890 <Module name="Tizen" id="::Tizen">
52891 <webidl>module Tizen {
52892 enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };
52894 enum SortModeOrder { "ASC", "DESC" };
52896 enum CompositeFilterType { "UNION", "INTERSECTION" };
52898 [NoInterfaceObject] interface TizenObject {
52899 readonly attribute <ref>Tizen</ref> tizen;
52901 <ref>Window</ref> implements <ref>TizenObject</ref>;
52903 [NoInterfaceObject] interface Tizen {
52906 [NoInterfaceObject] interface AbstractFilter {
52909 [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
52910 interface AttributeFilter : <ref>AbstractFilter</ref> {
52911 attribute DOMString attributeName;
52913 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
52915 attribute any matchValue;
52918 [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
52919 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
52920 attribute DOMString attributeName;
52922 attribute any initialValue;
52924 attribute any endValue;
52927 [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
52928 interface CompositeFilter : <ref>AbstractFilter</ref> {
52930 attribute <ref>CompositeFilterType</ref> type;
52932 attribute <ref>AbstractFilter</ref>[] filters;
52935 [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
52936 interface SortMode {
52937 attribute DOMString attributeName;
52939 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
52942 [Constructor(double latitude, double longitude)]
52943 interface SimpleCoordinates {
52944 attribute double latitude setraises(<ref>WebAPIException</ref>);
52946 attribute double longitude setraises(<ref>WebAPIException</ref>);
52949 [NoInterfaceObject]
52950 interface WebAPIException {
52951 readonly attribute unsigned short code;
52953 readonly attribute DOMString name;
52955 readonly attribute DOMString message;
52957 const unsigned short INDEX_SIZE_ERR = 1;
52958 const unsigned short DOMSTRING_SIZE_ERR = 2;
52959 const unsigned short HIERARCHY_REQUEST_ERR = 3;
52960 const unsigned short WRONG_DOCUMENT_ERR = 4;
52961 const unsigned short INVALID_CHARACTER_ERR = 5;
52962 const unsigned short NO_DATA_ALLOWED_ERR = 6;
52963 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
52964 const unsigned short NOT_FOUND_ERR = 8;
52965 const unsigned short NOT_SUPPORTED_ERR = 9;
52966 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
52967 const unsigned short INVALID_STATE_ERR = 11;
52968 const unsigned short SYNTAX_ERR = 12;
52969 const unsigned short INVALID_MODIFICATION_ERR = 13;
52970 const unsigned short NAMESPACE_ERR = 14;
52971 const unsigned short INVALID_ACCESS_ERR = 15;
52972 const unsigned short VALIDATION_ERR = 16;
52973 const unsigned short TYPE_MISMATCH_ERR = 17;
52974 const unsigned short SECURITY_ERR = 18;
52975 const unsigned short NETWORK_ERR = 19;
52976 const unsigned short ABORT_ERR = 20;
52977 const unsigned short URL_MISMATCH_ERR = 21;
52978 const unsigned short QUOTA_EXCEEDED_ERR = 22;
52979 const unsigned short TIMEOUT_ERR = 23;
52980 const unsigned short INVALID_NODE_TYPE_ERR = 24;
52981 const unsigned short DATA_CLONE_ERR = 25;
52984 [NoInterfaceObject]
52985 interface WebAPIError {
52986 readonly attribute unsigned short code;
52988 readonly attribute DOMString name;
52990 readonly attribute DOMString message;
52993 [Callback=FunctionOnly, NoInterfaceObject]
52994 interface SuccessCallback {
52998 [Callback=FunctionOnly, NoInterfaceObject]
52999 interface ErrorCallback {
53001 void onerror (<ref>WebAPIError</ref> error);
53006 This API provides common Tizen functionality.
53010 The API provides the basic definitions that are used in the Tizen Web Device API.
53011 These include generic callbacks that are invoked when the operations succeed or fail,
53012 WebAPIError and WebAPIException that gives information of the platform's error and
53013 filters interfaces that are used to make query for searching.
53016 Additionally, this API specifies the location in the ECMAScript hierarchy in which
53017 the Tizen Web Device API is instantiated (<em>window.tizen</em>).
53020 For more information on the Tizen features, see <a href="../../org.tizen.web.appprogramming/html/guide/tizen_guide/tizen.htm">Tizen Guide</a>.
53027 <Enum name="FilterMatchFlag" id="::Tizen::FilterMatchFlag">
53028 <webidl> enum FilterMatchFlag { "EXACTLY", "FULLSTRING", "CONTAINS", "STARTSWITH", "ENDSWITH", "EXISTS" };</webidl>
53035 These values are supported:
53039 EXACTLY - Indicates that an attribute value should match exactly with the specified default value.
53040 For strings, this type of comparison is case-sensitive. </li>
53042 FULLSTRING - Indicates String-based comparison and that the attribute value should match the whole string (case insensitive). </li>
53044 CONTAINS - Indicates that an attribute value should contain the specified string. This type of comparison works only on strings and is case insensitive. </li>
53046 STARTSWITH - Indicates that an attribute value should start with the specified string.
53047 This type of comparison works only on strings and is case insensitive. </li>
53049 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>
53051 EXISTS - Indicates that a filter comparison should match if the specified attribute exists. </li>
53058 <EnumValue stringvalue="EXACTLY">
53059 <webidl> "EXACTLY</webidl>
53061 <EnumValue stringvalue="FULLSTRING">
53062 <webidl> "FULLSTRING</webidl>
53064 <EnumValue stringvalue="CONTAINS">
53065 <webidl> "CONTAINS</webidl>
53067 <EnumValue stringvalue="STARTSWITH">
53068 <webidl> "STARTSWITH</webidl>
53070 <EnumValue stringvalue="ENDSWITH">
53071 <webidl> "ENDSWITH</webidl>
53073 <EnumValue stringvalue="EXISTS">
53074 <webidl> "EXISTS</webidl>
53077 <Enum name="SortModeOrder" id="::Tizen::SortModeOrder">
53078 <webidl> enum SortModeOrder { "ASC", "DESC" };</webidl>
53081 An enumerator that indicates the sorting order.
53085 The following values are supported:
53089 ASC - Indicates the sorting order is ascending </li>
53091 DESC - Indicates the sorting order is descending </li>
53098 <EnumValue stringvalue="ASC">
53099 <webidl> "ASC</webidl>
53101 <EnumValue stringvalue="DESC">
53102 <webidl> "DESC</webidl>
53105 <Enum name="CompositeFilterType" id="::Tizen::CompositeFilterType">
53106 <webidl> enum CompositeFilterType { "UNION", "INTERSECTION" };</webidl>
53109 An enumerator that indicates the type of composite filter.
53113 The following values are supported:
53117 UNION - Indicates that the composite is a union of filters ("OR" operator) </li>
53119 INTERSECTION - Indicates that the composite is an intersection of filters ("AND" operator) </li>
53126 <EnumValue stringvalue="UNION">
53127 <webidl> "UNION</webidl>
53129 <EnumValue stringvalue="INTERSECTION">
53130 <webidl> "INTERSECTION</webidl>
53133 <Interface name="TizenObject" id="::Tizen::TizenObject">
53134 <webidl> [NoInterfaceObject] interface TizenObject {
53135 readonly attribute <ref>Tizen</ref> tizen;
53139 Defines the tizen interface as a part of the window global object.
53143 The <em>Tizen</em> interface is always available within the <em>Window </em>object in the ECMAScript hierarchy.
53150 <ExtendedAttributeList>
53151 <ExtendedAttribute name="NoInterfaceObject">
53152 <webidl>NoInterfaceObject</webidl>
53153 </ExtendedAttribute>
53154 </ExtendedAttributeList>
53155 <Attribute readonly="readonly" name="tizen" id="::Tizen::TizenObject::tizen">
53156 <webidl> readonly attribute <ref>Tizen</ref> tizen;</webidl>
53157 <Type name="Tizen"/>
53160 <Implements name1="Window" name2="TizenObject">
53161 <webidl> <ref>Window</ref> implements <ref>TizenObject</ref>;</webidl>
53163 <Interface name="Tizen" id="::Tizen::Tizen">
53164 <webidl> [NoInterfaceObject] interface Tizen {
53168 The root of Tizen Web Device API.
53172 This is the Tizen root interface.
53173 It is a property of the ECMAScript global object, as specified by the <em>TizenObject</em> interface.
53180 <ExtendedAttributeList>
53181 <ExtendedAttribute name="NoInterfaceObject">
53182 <webidl>NoInterfaceObject</webidl>
53183 </ExtendedAttribute>
53184 </ExtendedAttributeList>
53186 <Interface name="AbstractFilter" id="::Tizen::AbstractFilter">
53187 <webidl> [NoInterfaceObject] interface AbstractFilter {
53191 This is a common interface used by different types of
53196 Never use this base interface directly, instead use <em>AbstractFilter</em> subtypes,
53197 such as <em>AttributeFilter</em>, <em>AttributeRangeFilter</em>, and <em>CompositeFilter</em>.
53204 <ExtendedAttributeList>
53205 <ExtendedAttribute name="NoInterfaceObject">
53206 <webidl>NoInterfaceObject</webidl>
53207 </ExtendedAttribute>
53208 </ExtendedAttributeList>
53210 <Interface name="AttributeFilter" id="::Tizen::AttributeFilter">
53211 <webidl> [Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)]
53212 interface AttributeFilter : <ref>AbstractFilter</ref> {
53213 attribute DOMString attributeName;
53215 attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);
53217 attribute any matchValue;
53221 This interface represents a set of filter.
53225 It represents the query statement for the specified value of the <em>matchValue</em> by the rule of <em>matchFlag</em>.
53228 If no <em>matchValue</em> is defined, the filter will match all objects that have the attribute
53229 defined (same as the "EXISTS" filter works), otherwise, it will only match objects which have an attribute that matches
53230 the specified value.
53236 <Code> // Define success callback
53237 function successCallback(contacts) {
53238 console.log(contacts.length + " contacts found.");
53241 // Define error callback
53242 function errorCallback(error) {
53243 console.log("An error occurred: " + error.message);
53246 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53247 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53248 // Send request on contact address book.
53249 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53252 <ExtendedAttributeList>
53253 <ExtendedAttribute name="Constructor">
53254 <webidl>Constructor(DOMString attributeName, optional <ref>FilterMatchFlag</ref>? matchFlag, optional any matchValue)</webidl>
53256 <Argument name="attributeName">
53257 <Type type="DOMString"/>
53259 <Argument optional="optional" name="matchFlag">
53260 <Type name="FilterMatchFlag" nullable="nullable"/>
53262 <Argument optional="optional" name="matchValue">
53266 </ExtendedAttribute>
53267 </ExtendedAttributeList>
53268 <InterfaceInheritance>
53269 <Name name="AbstractFilter"/>
53270 </InterfaceInheritance>
53271 <Attribute name="attributeName" id="::Tizen::AttributeFilter::attributeName">
53272 <webidl> attribute DOMString attributeName;</webidl>
53275 The name of the object attribute used for filtering.
53279 This is the name of the object attribute exactly as it is defined in
53280 the object's interface. For attributes of complex type, use fully-qualified names
53281 (such as 'organizations.role' to filter on a contact's role in an organization).
53284 For attributes of an array type, the filter will match if any value in the array
53292 <Type type="DOMString"/>
53294 <Attribute name="matchFlag" id="::Tizen::AttributeFilter::matchFlag">
53295 <webidl> attribute <ref>FilterMatchFlag</ref> matchFlag setraises(<ref>WebAPIException</ref>);</webidl>
53298 The match flag used for attribute-based filtering.
53302 By default, this attribute is set to "EXACTLY".
53309 <Type name="FilterMatchFlag"/>
53311 <RaiseException name="WebAPIException"/>
53314 <Attribute name="matchValue" id="::Tizen::AttributeFilter::matchValue">
53315 <webidl> attribute any matchValue;</webidl>
53318 The value used for matching.
53322 The filter will match if the attribute value matches the given matchValue.
53325 This value is not used if the <em>matchFlag</em> is set to "EXISTS".
53326 By default, this attribute is set to null.
53336 <Interface name="AttributeRangeFilter" id="::Tizen::AttributeRangeFilter">
53337 <webidl> [Constructor(DOMString attributeName, optional any initialValue, optional any endValue)]
53338 interface AttributeRangeFilter : <ref>AbstractFilter</ref> {
53339 attribute DOMString attributeName;
53341 attribute any initialValue;
53343 attribute any endValue;
53347 <em>AttributeRangeFilter</em> represents a filter based on an object attribute
53348 which has values that are within a particular range.
53352 Range filters, where only one boundary is set, are available.
53358 <Code> // Define success callback
53359 function successCallback(events) {
53360 console.log(events.length + " events today.");
53363 // Define error callback
53364 function errorCallback(error) {
53365 console.log("An error occurred: " + error.message);
53368 // Create an attribute range filter based on event start date: "All events occurring today".
53369 var now_dt = tizen.time.getCurrentDateTime();
53370 var today_begin = new tizen.TZDate(now_dt.getFullYear(), now_dt.getMonth(), now_dt.getDate());
53371 var today_end = today_begin.addDuration(new tizen.TimeDuration(1, "DAYS"));
53372 var filter = new tizen.AttributeRangeFilter("startDate", today_begin, today_end);
53374 // Send a search request to default event calendar.
53375 tizen.calendar.getDefaultCalendar("EVENT").find(successCallback, errorCallback, filter);
53378 <ExtendedAttributeList>
53379 <ExtendedAttribute name="Constructor">
53380 <webidl>Constructor(DOMString attributeName, optional any initialValue, optional any endValue)</webidl>
53382 <Argument name="attributeName">
53383 <Type type="DOMString"/>
53385 <Argument optional="optional" name="initialValue">
53388 <Argument optional="optional" name="endValue">
53392 </ExtendedAttribute>
53393 </ExtendedAttributeList>
53394 <InterfaceInheritance>
53395 <Name name="AbstractFilter"/>
53396 </InterfaceInheritance>
53397 <Attribute name="attributeName" id="::Tizen::AttributeRangeFilter::attributeName">
53398 <webidl> attribute DOMString attributeName;</webidl>
53401 The name of the object attribute used for filtering.
53405 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
53406 (such as 'organizations.role' to filter on a contact's role in an organization).
53409 For attributes of array type, the filter will match if any value in the array
53417 <Type type="DOMString"/>
53419 <Attribute name="initialValue" id="::Tizen::AttributeRangeFilter::initialValue">
53420 <webidl> attribute any initialValue;</webidl>
53423 Objects with an attribute that is greater than or equal to <em>initialValue</em> will match.
53427 By default, this attribute is set to <var>null</var>.
53436 <Attribute name="endValue" id="::Tizen::AttributeRangeFilter::endValue">
53437 <webidl> attribute any endValue;</webidl>
53440 Objects with an attribute that is strictly lower than to <em>endValue</em> will match.
53444 By default, this attribute is set to <var>null</var>.
53454 <Interface name="CompositeFilter" id="::Tizen::CompositeFilter">
53455 <webidl> [Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)]
53456 interface CompositeFilter : <ref>AbstractFilter</ref> {
53458 attribute <ref>CompositeFilterType</ref> type;
53460 attribute <ref>AbstractFilter</ref>[] filters;
53464 <em>CompositeFilter</em> represents a set of filters.
53468 The composite filters can be one of the 2 types:
53472 The union - used to filter objects that match any of the filters it includes. </li>
53474 The intersection - used to filter objects that match all filters it includes. </li>
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 firstNameFilter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53493 // Create an attribute filter based on last name: "Last name should be exactly 'Smith' (case insensitive)
53494 var lastNameFilter = new tizen.AttributeFilter("name.lastName", "EXACTLY", "Smith"};
53496 // Create a filter based on the intersection of these two filter:
53497 // "First name should contain 'Chris' AND last name should be 'Smith'".
53498 var filter = new tizen.CompositeFilter("INTERSECTION", [firstNameFilter, lastNameFilter]);
53500 // Send request on contact address book.
53501 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter);
53504 <ExtendedAttributeList>
53505 <ExtendedAttribute name="Constructor">
53506 <webidl>Constructor(<ref>CompositeFilterType</ref> type, optional <ref>AbstractFilter</ref>[]? filters)</webidl>
53508 <Argument name="type">
53509 <Type name="CompositeFilterType"/>
53511 <Argument optional="optional" name="filters">
53512 <Type type="array" nullable="nullable">
53513 <Type name="AbstractFilter"/>
53517 </ExtendedAttribute>
53518 </ExtendedAttributeList>
53519 <InterfaceInheritance>
53520 <Name name="AbstractFilter"/>
53521 </InterfaceInheritance>
53522 <Attribute name="type" id="::Tizen::CompositeFilter::type">
53523 <webidl> attribute <ref>CompositeFilterType</ref> type;</webidl>
53526 The composite filter type.
53532 <Type name="CompositeFilterType"/>
53534 <Attribute name="filters" id="::Tizen::CompositeFilter::filters">
53535 <webidl> attribute <ref>AbstractFilter</ref>[] filters;</webidl>
53538 The list of filters in the composite filter.
53544 <Type type="array">
53545 <Type name="AbstractFilter"/>
53549 <Interface name="SortMode" id="::Tizen::SortMode">
53550 <webidl> [Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)]
53551 interface SortMode {
53552 attribute DOMString attributeName;
53554 attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);
53558 <em>SortMode</em> is a common interface used for sorting of queried data.
53562 Note that the sorting result of list type attributes is not determined.
53568 <Code> // Define a success callback
53569 function successCallback(contacts) {
53570 // The returned contacts are sorted by first name (ascending)
53571 console.log(contacts.length + " contacts found.");
53574 // Define an error callback
53575 function errorCallback(error) {
53576 console.log("An error occurred: " + error.message);
53579 // Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)"
53580 var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris");
53581 // Sort by first name, ascending
53582 var sortMode = new tizen.SortMode("name.firstName", "ASC");
53583 // Send request on contact address book.
53584 tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter, sortMode);
53587 <ExtendedAttributeList>
53588 <ExtendedAttribute name="Constructor">
53589 <webidl>Constructor(DOMString attributeName, optional <ref>SortModeOrder</ref>? order)</webidl>
53591 <Argument name="attributeName">
53592 <Type type="DOMString"/>
53594 <Argument optional="optional" name="order">
53595 <Type name="SortModeOrder" nullable="nullable"/>
53598 </ExtendedAttribute>
53599 </ExtendedAttributeList>
53600 <Attribute name="attributeName" id="::Tizen::SortMode::attributeName">
53601 <webidl> attribute DOMString attributeName;</webidl>
53604 The name of the object attribute used for sorting.
53610 <Type type="DOMString"/>
53612 <Attribute name="order" id="::Tizen::SortMode::order">
53613 <webidl> attribute <ref>SortModeOrder</ref> order setraises(<ref>WebAPIException</ref>);</webidl>
53616 The type of the sorting.
53620 By default, this attribute is set to <var>ASC</var>.
53627 <Type name="SortModeOrder"/>
53629 <RaiseException name="WebAPIException"/>
53633 <Interface name="SimpleCoordinates" id="::Tizen::SimpleCoordinates">
53634 <webidl> [Constructor(double latitude, double longitude)]
53635 interface SimpleCoordinates {
53636 attribute double latitude setraises(<ref>WebAPIException</ref>);
53638 attribute double longitude setraises(<ref>WebAPIException</ref>);
53642 <em>SimpleCoordinates</em> represents a point (latitude and longitude) in map coordinate system.
53646 Latitude and longitude are of the WGS84 datum.
53653 <ExtendedAttributeList>
53654 <ExtendedAttribute name="Constructor">
53655 <webidl>Constructor(double latitude, double longitude)</webidl>
53657 <Argument name="latitude">
53658 <Type type="double"/>
53660 <Argument name="longitude">
53661 <Type type="double"/>
53664 </ExtendedAttribute>
53665 </ExtendedAttributeList>
53666 <Attribute name="latitude" id="::Tizen::SimpleCoordinates::latitude">
53667 <webidl> attribute double latitude setraises(<ref>WebAPIException</ref>);</webidl>
53676 <Type type="double"/>
53678 <RaiseException name="WebAPIException"/>
53681 <Attribute name="longitude" id="::Tizen::SimpleCoordinates::longitude">
53682 <webidl> attribute double longitude setraises(<ref>WebAPIException</ref>);</webidl>
53691 <Type type="double"/>
53693 <RaiseException name="WebAPIException"/>
53697 <Interface name="WebAPIException" id="::Tizen::WebAPIException">
53698 <webidl> [NoInterfaceObject]
53699 interface WebAPIException {
53700 readonly attribute unsigned short code;
53702 readonly attribute DOMString name;
53704 readonly attribute DOMString message;
53706 const unsigned short INDEX_SIZE_ERR = 1;
53707 const unsigned short DOMSTRING_SIZE_ERR = 2;
53708 const unsigned short HIERARCHY_REQUEST_ERR = 3;
53709 const unsigned short WRONG_DOCUMENT_ERR = 4;
53710 const unsigned short INVALID_CHARACTER_ERR = 5;
53711 const unsigned short NO_DATA_ALLOWED_ERR = 6;
53712 const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
53713 const unsigned short NOT_FOUND_ERR = 8;
53714 const unsigned short NOT_SUPPORTED_ERR = 9;
53715 const unsigned short INUSE_ATTRIBUTE_ERR = 10;
53716 const unsigned short INVALID_STATE_ERR = 11;
53717 const unsigned short SYNTAX_ERR = 12;
53718 const unsigned short INVALID_MODIFICATION_ERR = 13;
53719 const unsigned short NAMESPACE_ERR = 14;
53720 const unsigned short INVALID_ACCESS_ERR = 15;
53721 const unsigned short VALIDATION_ERR = 16;
53722 const unsigned short TYPE_MISMATCH_ERR = 17;
53723 const unsigned short SECURITY_ERR = 18;
53724 const unsigned short NETWORK_ERR = 19;
53725 const unsigned short ABORT_ERR = 20;
53726 const unsigned short URL_MISMATCH_ERR = 21;
53727 const unsigned short QUOTA_EXCEEDED_ERR = 22;
53728 const unsigned short TIMEOUT_ERR = 23;
53729 const unsigned short INVALID_NODE_TYPE_ERR = 24;
53730 const unsigned short DATA_CLONE_ERR = 25;
53734 Generic exception interface.
53738 This interface will be used by the APIs to throw errors synchronously.
53741 The attempt to set an attribute value may or may not raise WebAPIException synchronously with error type TypeMismatchError or InvalidValuesError.
53748 <ExtendedAttributeList>
53749 <ExtendedAttribute name="NoInterfaceObject">
53750 <webidl>NoInterfaceObject</webidl>
53751 </ExtendedAttribute>
53752 </ExtendedAttributeList>
53753 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIException::code">
53754 <webidl> readonly attribute unsigned short code;</webidl>
53758 For the possible values for this attribute, see <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
53764 <Type type="unsigned short"/>
53766 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIException::name">
53767 <webidl> readonly attribute DOMString name;</webidl>
53770 An error type. The name attribute must return the value it was initialized with.
53771 This attribute can have one of the following values:
53776 UnknownError - An unknown error has occurred. </li>
53778 InvalidValuesError - The content of an object does not contain valid values. </li>
53780 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
53782 ServiceNotAvailableError - The requested service is not available. </li>
53785 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>
53792 <Type type="DOMString"/>
53794 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIException::message">
53795 <webidl> readonly attribute DOMString message;</webidl>
53798 An error message that describes the details of an encountered error.
53799 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.
53805 <Type type="DOMString"/>
53807 <Const name="INDEX_SIZE_ERR" value="1" id="::Tizen::WebAPIException::INDEX_SIZE_ERR">
53808 <webidl> const unsigned short INDEX_SIZE_ERR = 1;</webidl>
53811 The index is not in the allowed range.
53817 <Type type="unsigned short"/>
53819 <Const name="DOMSTRING_SIZE_ERR" value="2" id="::Tizen::WebAPIException::DOMSTRING_SIZE_ERR">
53820 <webidl> const unsigned short DOMSTRING_SIZE_ERR = 2;</webidl>
53823 The specified range of text is too large.
53829 <Type type="unsigned short"/>
53831 <Const name="HIERARCHY_REQUEST_ERR" value="3" id="::Tizen::WebAPIException::HIERARCHY_REQUEST_ERR">
53832 <webidl> const unsigned short HIERARCHY_REQUEST_ERR = 3;</webidl>
53835 The operation would yield an incorrect node tree.
53841 <Type type="unsigned short"/>
53843 <Const name="WRONG_DOCUMENT_ERR" value="4" id="::Tizen::WebAPIException::WRONG_DOCUMENT_ERR">
53844 <webidl> const unsigned short WRONG_DOCUMENT_ERR = 4;</webidl>
53847 The object is in the wrong document.
53853 <Type type="unsigned short"/>
53855 <Const name="INVALID_CHARACTER_ERR" value="5" id="::Tizen::WebAPIException::INVALID_CHARACTER_ERR">
53856 <webidl> const unsigned short INVALID_CHARACTER_ERR = 5;</webidl>
53859 The string contains invalid characters.
53865 <Type type="unsigned short"/>
53867 <Const name="NO_DATA_ALLOWED_ERR" value="6" id="::Tizen::WebAPIException::NO_DATA_ALLOWED_ERR">
53868 <webidl> const unsigned short NO_DATA_ALLOWED_ERR = 6;</webidl>
53871 Data is specified for a node that does not support data.
53877 <Type type="unsigned short"/>
53879 <Const name="NO_MODIFICATION_ALLOWED_ERR" value="7" id="::Tizen::WebAPIException::NO_MODIFICATION_ALLOWED_ERR">
53880 <webidl> const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;</webidl>
53883 The object cannot be modified.
53889 <Type type="unsigned short"/>
53891 <Const name="NOT_FOUND_ERR" value="8" id="::Tizen::WebAPIException::NOT_FOUND_ERR">
53892 <webidl> const unsigned short NOT_FOUND_ERR = 8;</webidl>
53895 The object cannot be found here.
53901 <Type type="unsigned short"/>
53903 <Const name="NOT_SUPPORTED_ERR" value="9" id="::Tizen::WebAPIException::NOT_SUPPORTED_ERR">
53904 <webidl> const unsigned short NOT_SUPPORTED_ERR = 9;</webidl>
53907 The operation is not supported.
53913 <Type type="unsigned short"/>
53915 <Const name="INUSE_ATTRIBUTE_ERR" value="10" id="::Tizen::WebAPIException::INUSE_ATTRIBUTE_ERR">
53916 <webidl> const unsigned short INUSE_ATTRIBUTE_ERR = 10;</webidl>
53919 The specified attribute is already in use elsewhere.
53925 <Type type="unsigned short"/>
53927 <Const name="INVALID_STATE_ERR" value="11" id="::Tizen::WebAPIException::INVALID_STATE_ERR">
53928 <webidl> const unsigned short INVALID_STATE_ERR = 11;</webidl>
53931 The object is in an invalid state.
53937 <Type type="unsigned short"/>
53939 <Const name="SYNTAX_ERR" value="12" id="::Tizen::WebAPIException::SYNTAX_ERR">
53940 <webidl> const unsigned short SYNTAX_ERR = 12;</webidl>
53943 The string did not match the expected pattern.
53949 <Type type="unsigned short"/>
53951 <Const name="INVALID_MODIFICATION_ERR" value="13" id="::Tizen::WebAPIException::INVALID_MODIFICATION_ERR">
53952 <webidl> const unsigned short INVALID_MODIFICATION_ERR = 13;</webidl>
53955 The object cannot be modified in this way.
53961 <Type type="unsigned short"/>
53963 <Const name="NAMESPACE_ERR" value="14" id="::Tizen::WebAPIException::NAMESPACE_ERR">
53964 <webidl> const unsigned short NAMESPACE_ERR = 14;</webidl>
53967 The operation is not allowed by Namespaces in XML.
53973 <Type type="unsigned short"/>
53975 <Const name="INVALID_ACCESS_ERR" value="15" id="::Tizen::WebAPIException::INVALID_ACCESS_ERR">
53976 <webidl> const unsigned short INVALID_ACCESS_ERR = 15;</webidl>
53979 The object does not support the operation or argument.
53985 <Type type="unsigned short"/>
53987 <Const name="VALIDATION_ERR" value="16" id="::Tizen::WebAPIException::VALIDATION_ERR">
53988 <webidl> const unsigned short VALIDATION_ERR = 16;</webidl>
53991 The operation would cause the node to fail validation.
53997 <Type type="unsigned short"/>
53999 <Const name="TYPE_MISMATCH_ERR" value="17" id="::Tizen::WebAPIException::TYPE_MISMATCH_ERR">
54000 <webidl> const unsigned short TYPE_MISMATCH_ERR = 17;</webidl>
54003 The type of the object does not match the expected type.
54009 <Type type="unsigned short"/>
54011 <Const name="SECURITY_ERR" value="18" id="::Tizen::WebAPIException::SECURITY_ERR">
54012 <webidl> const unsigned short SECURITY_ERR = 18;</webidl>
54015 The operation is insecure.
54021 <Type type="unsigned short"/>
54023 <Const name="NETWORK_ERR" value="19" id="::Tizen::WebAPIException::NETWORK_ERR">
54024 <webidl> const unsigned short NETWORK_ERR = 19;</webidl>
54027 A network error occurred.
54033 <Type type="unsigned short"/>
54035 <Const name="ABORT_ERR" value="20" id="::Tizen::WebAPIException::ABORT_ERR">
54036 <webidl> const unsigned short ABORT_ERR = 20;</webidl>
54039 The operation was aborted.
54045 <Type type="unsigned short"/>
54047 <Const name="URL_MISMATCH_ERR" value="21" id="::Tizen::WebAPIException::URL_MISMATCH_ERR">
54048 <webidl> const unsigned short URL_MISMATCH_ERR = 21;</webidl>
54051 The given URL does not match another URL.
54057 <Type type="unsigned short"/>
54059 <Const name="QUOTA_EXCEEDED_ERR" value="22" id="::Tizen::WebAPIException::QUOTA_EXCEEDED_ERR">
54060 <webidl> const unsigned short QUOTA_EXCEEDED_ERR = 22;</webidl>
54063 The quota has been exceeded.
54069 <Type type="unsigned short"/>
54071 <Const name="TIMEOUT_ERR" value="23" id="::Tizen::WebAPIException::TIMEOUT_ERR">
54072 <webidl> const unsigned short TIMEOUT_ERR = 23;</webidl>
54075 The operation timed out.
54081 <Type type="unsigned short"/>
54083 <Const name="INVALID_NODE_TYPE_ERR" value="24" id="::Tizen::WebAPIException::INVALID_NODE_TYPE_ERR">
54084 <webidl> const unsigned short INVALID_NODE_TYPE_ERR = 24;</webidl>
54087 The supplied node is incorrect or has an incorrect ancestor for this operation.
54093 <Type type="unsigned short"/>
54095 <Const name="DATA_CLONE_ERR" value="25" id="::Tizen::WebAPIException::DATA_CLONE_ERR">
54096 <webidl> const unsigned short DATA_CLONE_ERR = 25;</webidl>
54099 The object cannot be cloned.
54105 <Type type="unsigned short"/>
54108 <Interface name="WebAPIError" id="::Tizen::WebAPIError">
54109 <webidl> [NoInterfaceObject]
54110 interface WebAPIError {
54111 readonly attribute unsigned short code;
54113 readonly attribute DOMString name;
54115 readonly attribute DOMString message;
54119 Generic error interface.
54123 This interface will be used by the APIs in order to return them in the error callback of asynchronous methods.
54130 <ExtendedAttributeList>
54131 <ExtendedAttribute name="NoInterfaceObject">
54132 <webidl>NoInterfaceObject</webidl>
54133 </ExtendedAttribute>
54134 </ExtendedAttributeList>
54135 <Attribute readonly="readonly" name="code" id="::Tizen::WebAPIError::code">
54136 <webidl> readonly attribute unsigned short code;</webidl>
54140 Possible values are defined in <a href="http://www.w3.org/TR/dom/#domexception">DOMException</a>.
54146 <Type type="unsigned short"/>
54148 <Attribute readonly="readonly" name="name" id="::Tizen::WebAPIError::name">
54149 <webidl> readonly attribute DOMString name;</webidl>
54152 An error type. The name attribute must return the value it was initialized with.
54153 This attribute can have one of the following values:
54158 UnknownError - An unknown error has occurred. </li>
54160 InvalidValuesError - The content of an object does not contain valid values. </li>
54162 IOError - An error occurred in communication with the underlying implementation and so the requested method cannot be completed. </li>
54164 ServiceNotAvailableError - The requested service is not available. </li>
54167 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>
54174 <Type type="DOMString"/>
54176 <Attribute readonly="readonly" name="message" id="::Tizen::WebAPIError::message">
54177 <webidl> readonly attribute DOMString message;</webidl>
54180 An error message that describes the details of the error encountered. This attribute is not intended
54181 to be used directly in the user interfaces as it is mainly intended to be useful for developers rather than end users.
54187 <Type type="DOMString"/>
54190 <Interface name="SuccessCallback" id="::Tizen::SuccessCallback">
54191 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54192 interface SuccessCallback {
54197 This interface is used in methods that do not require any return value in the success callback.
54198 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.
54203 <Code> function onSuccess() {
54204 console.log("Application launched successfully");
54206 tizen.application.launch('0pnxz8hbsr.MyFiles', onSuccess);
54209 <ExtendedAttributeList>
54210 <ExtendedAttribute name="Callback" value="FunctionOnly">
54211 <webidl>Callback</webidl>
54212 </ExtendedAttribute>
54213 <ExtendedAttribute name="NoInterfaceObject">
54214 <webidl> NoInterfaceObject</webidl>
54215 </ExtendedAttribute>
54216 </ExtendedAttributeList>
54217 <Operation name="onsuccess" id="::Tizen::SuccessCallback::onsuccess">
54218 <webidl> void onsuccess ();</webidl>
54221 Method invoked when the asynchronous call completes successfully.
54227 <Type type="void"/>
54231 <Interface name="ErrorCallback" id="::Tizen::ErrorCallback">
54232 <webidl> [Callback=FunctionOnly, NoInterfaceObject]
54233 interface ErrorCallback {
54235 void onerror (<ref>WebAPIError</ref> error);
54239 This interface is used in methods that require only an error as input parameter in the error callback.
54240 If an invalid function (such as null) is passed to the API that accepts ErrorCallback,
54241 it silently fails and there is no further action.
54246 <Code> // Define the error callback.
54247 function onError(error) {
54248 console.log(error.message);
54251 // Define the success callback.
54252 function onSuccess(services) {
54253 //send a message using the found service
54255 tizen.messaging.getMessageServices("messaging.sms", onSuccess, onError);
54258 <ExtendedAttributeList>
54259 <ExtendedAttribute name="Callback" value="FunctionOnly">
54260 <webidl>Callback</webidl>
54261 </ExtendedAttribute>
54262 <ExtendedAttribute name="NoInterfaceObject">
54263 <webidl> NoInterfaceObject</webidl>
54264 </ExtendedAttribute>
54265 </ExtendedAttributeList>
54266 <Operation name="onerror" id="::Tizen::ErrorCallback::onerror">
54267 <webidl> void onerror (<ref>WebAPIError</ref> error);</webidl>
54270 Method that is invoked when the error occurs.
54276 <Type type="void"/>
54278 <Argument name="error">
54284 <Type name="WebAPIError"/>
54290 <Module name="WebSetting" id="::WebSetting">
54291 <webidl>module WebSetting {
54293 [NoInterfaceObject] interface WebSettingObject {
54294 readonly attribute <ref>WebSettingManager</ref> websetting;
54296 <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;
54298 [NoInterfaceObject] interface WebSettingManager {
54300 void setUserAgentString(DOMString userAgent,
54301 optional <ref>SuccessCallback</ref>? successCallback,
54302 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54304 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54305 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54311 This Web setting API defines a set of APIs that manages the setting states of the Web view in your Web application.
54315 A Tizen Web application includes a web view and the properties below of the web view can be managed via the Web setting API:
54319 Delete all the cookies saved for the web view in the Web application. </li>
54321 Set a custom user agent string of the web view in the Web application. </li>
54324 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.
54331 <Interface name="WebSettingObject" id="::WebSetting::WebSettingObject">
54332 <webidl> [NoInterfaceObject] interface WebSettingObject {
54333 readonly attribute <ref>WebSettingManager</ref> websetting;
54337 This interface defines what is instantiated for the Web setting API by the <em>Tizen</em> object from the Tizen Platform.
54341 <em>tizen.websetting</em> object is available to manage the settings of the Web view in your Web application.
54348 <ExtendedAttributeList>
54349 <ExtendedAttribute name="NoInterfaceObject">
54350 <webidl>NoInterfaceObject</webidl>
54351 </ExtendedAttribute>
54352 </ExtendedAttributeList>
54353 <Attribute readonly="readonly" name="websetting" id="::WebSetting::WebSettingObject::websetting">
54354 <webidl> readonly attribute <ref>WebSettingManager</ref> websetting;</webidl>
54355 <Type name="WebSettingManager"/>
54358 <Implements name1="Tizen" name2="WebSettingObject">
54359 <webidl> <ref>Tizen</ref> implements <ref>WebSettingObject</ref>;</webidl>
54361 <Interface name="WebSettingManager" id="::WebSetting::WebSettingManager">
54362 <webidl> [NoInterfaceObject] interface WebSettingManager {
54364 void setUserAgentString(DOMString userAgent,
54365 optional <ref>SuccessCallback</ref>? successCallback,
54366 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54368 void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54369 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);
54374 This is the top-level interface for the WebSetting API that managed the settings of the Web view in your Web application.
54377 <ExtendedAttributeList>
54378 <ExtendedAttribute name="NoInterfaceObject">
54379 <webidl>NoInterfaceObject</webidl>
54380 </ExtendedAttribute>
54381 </ExtendedAttributeList>
54382 <Operation name="setUserAgentString" id="::WebSetting::WebSettingManager::setUserAgentString">
54383 <webidl> void setUserAgentString(DOMString userAgent,
54384 optional <ref>SuccessCallback</ref>? successCallback,
54385 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54388 Sets the custom user agent string for your Web application.
54392 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
54393 has the same user agent string as the Tizen browser on the device.
54396 The <em>ErrorCallback</em> is launched with these error types:
54400 UnknownError - If any error occurs while setting the user agent string. </li>
54402 InvalidValuesError - If any of the input parameters contain an invalid value. </li>
54408 <Code> function successCallback() {
54409 console.log("The requested user agent string has just been set successfully.");
54412 tizen.websetting.setUserAgentString("the new user agent string to set", successCallback);
54416 <Type type="void"/>
54418 <Argument name="userAgent">
54421 User agent to set for the Web view in your Web application.
54424 <Type type="DOMString"/>
54426 <Argument optional="optional" name="successCallback">
54429 To be invoked if the requested setting operation succeeds.
54432 <Type name="SuccessCallback" nullable="nullable"/>
54434 <Argument optional="optional" name="errorCallback">
54437 To be invoked if the requested setting operation fails.
54440 <Type name="ErrorCallback" nullable="nullable"/>
54444 <RaiseException name="WebAPIException">
54447 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54453 <Operation name="removeAllCookies" id="::WebSetting::WebSettingManager::removeAllCookies">
54454 <webidl> void removeAllCookies(optional <ref>SuccessCallback</ref>? successCallback,
54455 optional <ref>ErrorCallback</ref>? errorCallback) raises (<ref>WebAPIException</ref>);</webidl>
54458 Removes all the cookies saved for the Web view in your Web application.
54462 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.
54465 The <em>ErrorCallback</em> is launched with these error types:
54469 UnknownError - If any error occurs while deleting the cookies. </li>
54479 http://tizen.org/privilege/websetting
54481 <Code> function successCallback() {
54482 console.log("The cookies saved for your application have just been removed.");
54485 tizen.websetting.removeAllCookies(successCallback);
54489 <Type type="void"/>
54491 <Argument optional="optional" name="successCallback">
54494 To be invoked if the requested delete operation succeeds.
54497 <Type name="SuccessCallback" nullable="nullable"/>
54499 <Argument optional="optional" name="errorCallback">
54502 To be invoked if the requested delete operation fails.
54505 <Type name="ErrorCallback" nullable="nullable"/>
54509 <RaiseException name="WebAPIException">
54512 with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
54515 with error type SecurityError, if the application does not have the privilege to call this method.