added tizen engineer mode to system
[profile/ivi/wrt-plugins-ivi.git] / src / Vehicle / Vehicle.idl
index 6b6f58f..5657799 100644 (file)
@@ -9,13 +9,18 @@ Details.
 
 */
 
-partial interface Navigator   { 
-        attribute Vehicle vehicle;
+
+[NoInterfaceObject]
+interface VehicleManagerObject {
+    readonly attribute Vehicle vehicle;
 };
+Tizen implements VehicleManagerObject;
+
 
 [NoInterfaceObject]
-interface VehiclePropertyType: Event { 
-       /** /brief time at which the vehicle generated the property
+interface VehiclePropertyType {
+       /**  Time
+        *  \brief time at which the vehicle generated the property
         **/
         attribute DOMTimeStamp time;
         attribute short zone;
@@ -53,12 +58,12 @@ callback SupportedPropertiesCallback = void (sequence<DOMString> properties);
 interface Vehicle  { 
 
        const unsigned short ZONE_None = 0;
-       const unsigned short ZONE_Front = 1;
-       const unsigned short ZONE_Middle = 0x10;
-       const unsigned short ZONE_Right = 0x100;
-       const unsigned short ZONE_Left = 0x1000;
-       const unsigned short ZONE_Rear = 0x10000;
-       const unsigned short ZONE_Center = 0x10000;
+       const unsigned short ZONE_Front = 0x01;
+       const unsigned short ZONE_Middle = 0x02;
+       const unsigned short ZONE_Right = 0x04;
+       const unsigned short ZONE_Left = 0x08;
+       const unsigned short ZONE_Rear = 0x10;
+       const unsigned short ZONE_Center = 0x20;
 
        /**
         *  \brief returns supported object types
@@ -73,32 +78,48 @@ interface Vehicle  {
         **/
        any get(DOMString objectType, optional short zone);
 
+
+        /**
+         *  \brief fetch the current value for 'objectType'
+         *  \param objectType is the requested property to be retrieved.
+         *  \param successCallback is called with the result of the call
+         *  \param errorCallback is called if there is an error
+         *  \param zone specify the zone in which this object type is in
+         **/
+        void getAsync(DOMString objectType, VehiclePropertyCallback successCallback, optional VehiclePropertyErrorCallback errorCb, optional short zone);
+
        /** \brief subscribe to the given property and get callbacks when it changes
         *  \param objectType property to set
         *  \param successCallback callback will be called when the "objectType" changes
         *  \param errorCallback callback if error has been called.
         **/
 
-       subscribe(DOMString objectType, VehiclePropertyCallback successCallback, optional unsigned short zone, optional VehiclePropertyErrorCallback errorCallback);
+       void subscribe(DOMString objectType, VehiclePropertyCallback successCallback, optional unsigned short zone, optional VehiclePropertyErrorCallback errorCallback);
 
        /**
         *  \brief set the given objectType to value
         *  \param objectType object type to set
-        *  \param value value to set, should contain zone information ie "zone" : 0
-        *  \param errorCallback callback if error has been called.
+        *  \param value value to set, should contain zone information if there is a zone ie "zone" : 0
+        *  \param errorCallback callback if error during set.
         **/
-       set(DOMString objectType, VehiclePropertyType value, optional VehiclePropertyErrorCallback errorCallback);
+       void set(DOMString objectType, object value, optional VehiclePropertyErrorCallback errorCallback);
 
        /**
         *  \brief get values for a given objectType within a certain past time period between 'startTime' and 'endTime'
         *  \param objectType object type to request
         *  \param zone in which the objectType is located or 0 if no zone.
-        *  \param startTime, starting period of time.
-        *  \param endTime, ending period of time.
+        *  \param startTime starting period of time.
+        *  \param endTime ending period of time.
         *  \param successCallback Callback with the result of the method call
         *  \param errorCallback Callback if an error has occurred.
-       **/
-       getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, VehiclePropertyListCallback successCallback, optional VehiclePropertyErrorCallback errorCallback);
+        **/
+       void getHistory(DOMString objectType, unsigned short zone, Date startTime, Date endTime, VehiclePropertyListCallback successCallback, optional VehiclePropertyErrorCallback errorCallback);
+
+       /**
+        *  \brief list zones available for a given object type
+        *  \param DOMString object type to request, ie "HVAC"
+        **/
+       sequence<unsigned short> listZones(DOMString objectType);
 };
 
 [NoInterfaceObject]
@@ -447,12 +468,6 @@ interface HVAC : VehiclePropertyType  {
         **/
        attribute boolean heater;
 
-       /**  Defrost
-        *   \brief Must return the defrost status of all windows equiped with defrosters.  This will return a dictionary of DefrostDictionary that represents    
-        *   \brief each window and its defrost status.    
-        **/
-       attribute DefrostDictionary defrost;
-
        /**  SteeringWheelHeater
         *   \brief Must return air recirculation on (true) / off (false).    
         **/
@@ -477,11 +492,16 @@ interface WindowStatus : VehiclePropertyType  {
        const unsigned short WINDOWLOCATION_RIGHTREAR = 3;    
        const unsigned short WINDOWLOCATION_REAR = 4;    
 
-       /**  WindowStatus
-        *   \brief Must return window status for each window location.  object returned is a    
-        *   dictionary { unsigned short windowlocation, unsigned short percentage opened }    
+       /**  openness
+        *   \brief Must return window openness percentage (100% fully open, 0% fully closed)
+        *  for the window location see "zone" attribute
         **/
-       attribute object WindowStatus;
+       attribute unsigned short openness;
+
+       /**  defrost
+       *   \brief Must return the defroster status of the window. On = true, Off = false.
+       **/
+       attribute boolean defrost;
 };
 
 [NoInterfaceObject]
@@ -781,43 +801,32 @@ interface VehicleTopSpeedLimit : VehiclePropertyType  {
 };
 
 [NoInterfaceObject]
-interface AirbagStatus : VehiclePropertyType  { 
-       const unsigned short AIRBAGLOCATION_DRIVER = 0;    
-       const unsigned short AIRBAGLOCATION_PASSENGER= 1;    
-       const unsigned short AIRBAGLOCATION_LEFTSIDE = 2;    
-       const unsigned short AIRBAGLOCATION_RIGHTSIDE = 3;    
+interface AirbagStatus : VehiclePropertyType  {
        const unsigned short AIRBAGSTATUS_INACTIVE = 0;    
        const unsigned short AIRBAGSTATUS_ACTIVE = 1;    
        const unsigned short AIRBAGSTATUS_DEPLOYED = 2;    
 
        /**  AirbagStatus
-        *   \brief MUST returns a dictionary of Airbag (byte) and Status (byte) (see 
+        *   \brief MUST return Airbag deployment status (see AIRBAGSTATUS*)
         **/
-        attribute object airbagStatus;
+        attribute unsigned short airbagStatus;
 };
 
 [NoInterfaceObject]
 interface DoorStatus : VehiclePropertyType  { 
-       const unsigned short DOORLOCATION_DRIVER= 0;    
-       const unsigned short DOORLOCATION_PASSENGER = 1;    
-       const unsigned short DOORLOCATION_LEFTREAR = 2;    
-       const unsigned short DOORLOCATION_RIGHTREAR = 3;    
-       const unsigned short DOORLOCATION_TRUNK = 4;    
-       const unsigned short DOORLOCATION_FUELCAP = 5;    
-       const unsigned short DOORLOCATION_HOOD = 6;    
        const unsigned short DOORSTATUS_CLOSED = 0;    
        const unsigned short DOORSTATUS_OPEN = 1;    
        const unsigned short DOORSTATUS_AJAR = 2;    
 
-       /**  DoorStatus
-        *   \brief MUST returns dictionary of Door (byte) and Status (byte).  See 
+        /**  DoorStatus
+        *   \brief MUST returns Door status (byte).  See DOORSTATUS_*
         **/
-        attribute object doorStatus;
+        attribute unsigned short doorStatus;
 
        /**  DoorLockStatus
-        *   \brief MUST returns dictionary of Door (byte) and Status (bool locked = true, unlocked = false).  See 
+        *   \brief MUST returns Door status (bool locked = true, unlocked = false).
         **/
-        attribute object doorLockStatus;
+        attribute boolean doorLockStatus;
 
        /**  ChildLockStatus
         *   \brief MUST returns Child lock status of rear doors.  active = true, inactive = false.    
@@ -829,35 +838,23 @@ interface DoorStatus : VehiclePropertyType  {
 
 [NoInterfaceObject]
 interface SeatBeltStatus : VehiclePropertyType  { 
-       const unsigned short SEATBELTLOCATION_DRIVER= 0;    
-       const unsigned short SEATBELTLOCATION_MIDDLEFRONT = 1;    
-       const unsigned short SEATBELTLOCATION_PASSENGER = 2;    
-       const unsigned short SEATBELTLOCATION_LEFTREAR = 3;    
-       const unsigned short SEATBELTLOCATION_MIDDLEREAR = 4;    
-       const unsigned short SEATBELTLOCATION_RIGHTREAR = 5;    
 
        /**  SeatBeltStatus
-        *   \brief MUST returns dictionary of Seat Belt (byte, see SEATBELTLOCATION) and Status (bool: Fasten = true, Unfastened = false)    
+        *   \brief MUST return Seat Belt status (bool: Fasten = true, Unfastened = false)
         **/
-        attribute object seatBeltStatus;
+        attribute boolean seatBeltStatus;
 };
 
 [NoInterfaceObject]
-interface OccupantStatus : VehiclePropertyType  { 
-       const unsigned short OCCUPANTLOCATION_DRIVER = 0;    
-       const unsigned short OCCUPANTLOCATION_FRONTMIDDLE = 1;    
-       const unsigned short OCCUPANTLOCATION_PASSENGER= 2;    
-       const unsigned short OCCUPANTLOCATION_LEFTREAR = 3;    
-       const unsigned short OCCUPANTLOCATION_MIDDLEREAR = 4;    
-       const unsigned short OCCUPANTLOCATION_RIGHTREAR = 5;    
+interface OccupantStatus : VehiclePropertyType  {
        const unsigned short OCCUPANTSTATUS_VACANT = 0;    
        const unsigned short OCCUPANTSTATUS_CHILD = 1;    
        const unsigned short OCCUPANTSTATUS_ADULT = 2;    
 
        /**  OccupantStatus
-        *   \brief MUST returns dictionary of Occupant (byte see OCCUPANTLOCATION) and Status (byte, see 
+        *   \brief MUST returns Occupant status (byte, see OCCUPANTSTATUS)
         **/
-        attribute object occupantStatus;
+        attribute unsigned short occupantStatus;
 };
 
 [NoInterfaceObject]
@@ -870,9 +867,28 @@ interface ObstacleDistance : VehiclePropertyType  {
        const unsigned short DISTANCESENSORLOCATION_RIGHTBLINDSPOT = 5;    
 
        /**  ObstacleDistance
-        *   \brief MUST returns dictionary of Distance Sensor (byte, see DISTANCESENSORLOCATION) and distance (double) in m.    
+        *   \brief MUST returns Distance Sensor distance (Double) in m.
         **/
-        attribute object obstacleDistance;
+        attribute double obstacleDistance;
+};
+
+[NoInterfaceObject]
+interface NightMode : VehiclePropertyType {
+
+       /*!
+       * \brief MUST return whether or not the system is in NightMode or not.  True = Night time, False = Day time
+       **/
+       attribute boolean nightMode;
 };
 
+[NoInterfaceObject]
+interface DrivingMode : VehiclePropertyType {
+
+       /**
+       * \brief MUST return whether or not the system is in DrivingMode or not.  1 = Driving, 0 = Not Driving
+       **/
+       attribute unsigned short drivingMode;
+};
+
+