From 7636e42fe27e6c3f79e4a5c7ca801b38bc1b6d9c Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Tue, 6 Aug 2013 14:58:28 -0700 Subject: [PATCH] lowerCamelCase for member attributes --- packaging/wrt-plugins-ivi.spec | 2 +- src/Vehicle/JSVehicle.cpp | 3 +- src/Vehicle/Vehicle.cpp | 4 + src/Vehicle/Vehicle.h | 3 +- src/Vehicle/Vehicle.idl | 170 ++++++++++++++++++++--------------------- 5 files changed, 93 insertions(+), 89 deletions(-) diff --git a/packaging/wrt-plugins-ivi.spec b/packaging/wrt-plugins-ivi.spec index a96dc8f..20bd558 100644 --- a/packaging/wrt-plugins-ivi.spec +++ b/packaging/wrt-plugins-ivi.spec @@ -1,7 +1,7 @@ Name: wrt-plugins-ivi Summary: JavaScript plugins for WebRuntime for IVI Version: 0.4.1 -Release: 22 +Release: 23 Group: Development/Libraries License: Apache License, Version 2.0 Source0: %{name}-%{version}.tar.gz diff --git a/src/Vehicle/JSVehicle.cpp b/src/Vehicle/JSVehicle.cpp index 0096566..d73a681 100644 --- a/src/Vehicle/JSVehicle.cpp +++ b/src/Vehicle/JSVehicle.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -281,7 +282,7 @@ JSValueRef JSVehicle::set(JSContextRef context, LoggerD("Object property count: " << count); - map objectMap; + std::map objectMap; for(size_t i=0; i< count; i++) { diff --git a/src/Vehicle/Vehicle.cpp b/src/Vehicle/Vehicle.cpp index 13d0a58..c6e053f 100644 --- a/src/Vehicle/Vehicle.cpp +++ b/src/Vehicle/Vehicle.cpp @@ -303,6 +303,10 @@ void VehicleMaster::onSignalReceived(std::string objectName, std::map #include +#include #include #include #include #include -#include "EventVehiclePropertyChanged.h" - class AbstractPropertyType; namespace DeviceAPI { diff --git a/src/Vehicle/Vehicle.idl b/src/Vehicle/Vehicle.idl index 1cd223c..d1e16f0 100644 --- a/src/Vehicle/Vehicle.idl +++ b/src/Vehicle/Vehicle.idl @@ -13,14 +13,14 @@ Details. module Vehicle { partial interface Navigator { - readonly attribute Vehicle vehicle; + attribute Vehicle vehicle; }; [NoInterfaceObject] interface VehiclePropertyType: Event { /** /brief time at which the vehicle generated the property **/ - readonly attribute DOMTimeStamp time; + attribute DOMTimeStamp Time; }; [NoInterfaceObject] @@ -33,12 +33,12 @@ interface VehiclePropertyError { /** code * MUST return error code. **/ - readonly attribute unsigned short code; + attribute unsigned short code; /** message * MUST return error message **/ - readonly attribute DOMString message; + attribute DOMString message; }; callback VehiclePropertyCallback = void (VehiclePropertyType value); @@ -99,7 +99,7 @@ interface VehicleSpeed : VehiclePropertyType { /** VehicleSpeed * \brief Must return Vehicle Speed in kilometers per hour. **/ - readonly attribute unsigned long VehicleSpeed; + attribute unsigned long VehicleSpeed; }; [NoInterfaceObject] @@ -108,7 +108,7 @@ interface EngineSpeed : VehiclePropertyType { /** EngineSpeed * \brief Must return Engine Speed in rotations per minute. **/ - readonly attribute unsigned long EngineSpeed; + attribute unsigned long EngineSpeed; }; [NoInterfaceObject] @@ -121,7 +121,7 @@ interface VehiclePowerMode : VehiclePropertyType { /** VehiclePowerMode * \brief Must return Vehicle Power mode (see VEHICLEPOWERMODE) **/ - readonly attribute octet VehiclePowerMode; + attribute octet VehiclePowerMode; }; [NoInterfaceObject] @@ -139,17 +139,17 @@ interface Acceleration : VehiclePropertyType { /** X * \brief Must return acceleration on the "X" axis as 1/1000 G (gravitational force). **/ - readonly attribute unsigned long X; + attribute unsigned long X; /** Y * \brief Must return acceleration on the "Y" axis as 1/1000 G (gravitational force). **/ - readonly attribute unsigned long Y; + attribute unsigned long Y; /** Z * \brief Must return acceleration on the "Z" axis as 1/1000 G (gravitational force). **/ - readonly attribute unsigned long Z; + attribute unsigned long Z; }; [NoInterfaceObject] @@ -177,12 +177,12 @@ interface Transmission : VehiclePropertyType { /** GearPosition * \brief Must return transmission gear position (see TRANSMISSIONPOSITION) **/ - readonly attribute octet GearPosition; + attribute octet GearPosition; /** Mode * \brief Must return transmission Mode (see **/ - readonly attribute octet Mode; + attribute octet Mode; }; [NoInterfaceObject] @@ -191,12 +191,12 @@ interface CruiseControlStatus : VehiclePropertyType { /** Activated * \brief Must return whether or not the Cruise Control system is active (true) or inactive (false) **/ - readonly attribute boolean Activated; + attribute boolean Activated; /** Speed * \brief Must return target Cruise Control speed in kilometers per hour (kph). **/ - readonly attribute unsigned short Speed; + attribute unsigned short Speed; }; [NoInterfaceObject] @@ -205,7 +205,7 @@ interface WheelBrake : VehiclePropertyType { /** Engaged * \brief Must return Wheel Brake status: Engaged = true, disengaged = false **/ - readonly attribute boolean Engaged; + attribute boolean Engaged; }; [NoInterfaceObject] @@ -214,42 +214,42 @@ interface LightStatus : VehiclePropertyType { /** Head * \brief Must return headlight status: on = true, off = false. **/ - readonly attribute boolean Head; + attribute boolean Head; /** RightTurn * \brief Must return right turn signal status: on = true, off = false. **/ - readonly attribute boolean RightTurn; + attribute boolean RightTurn; /** LeftTurn * \brief Must return left turn signal status: on = true, off = false. **/ - readonly attribute boolean LeftTurn; + attribute boolean LeftTurn; /** Brake * \brief Must return brake signal light status: on = true, off = false. **/ - readonly attribute boolean Brake; + attribute boolean Brake; /** Fog * \brief Must return fog light status: on = true, off = false. **/ - readonly attribute boolean Fog; + attribute boolean Fog; /** Hazard * \brief Must return hazard light status: on = true, off = false. **/ - readonly attribute boolean Hazard; + attribute boolean Hazard; /** Parking * \brief Must return parking light status: on = true, off = false. **/ - readonly attribute boolean Parking; + attribute boolean Parking; /** HighBeam * \brief Must return high beam status: on = true, off = false. **/ - readonly attribute boolean HighBeam; + attribute boolean HighBeam; }; [NoInterfaceObject] @@ -258,17 +258,17 @@ interface InteriorLightStatus : VehiclePropertyType { /** Passenger * \brief Must return passenger interior light status: on = true, off = false **/ - readonly attribute boolean Passenger; + attribute boolean Passenger; /** Driver * \brief Must return driver interior light status: on = true, off = false **/ - readonly attribute boolean Driver; + attribute boolean Driver; /** Center * \brief Must return center interior light status: on = true, off = false **/ - readonly attribute boolean Center; + attribute boolean Center; }; [NoInterfaceObject] @@ -277,7 +277,7 @@ interface Horn : VehiclePropertyType { /** On * \brief Must return horn status: on = true, off = false **/ - readonly attribute boolean On; + attribute boolean On; }; [NoInterfaceObject] @@ -286,22 +286,22 @@ interface Fuel : VehiclePropertyType { /** Level * \brief Must return fuel level as a percentage of fullness. **/ - readonly attribute unsigned short Level; + attribute unsigned short Level; /** Range * \brief Must return estimated fuel range in kilometers. **/ - readonly attribute unsigned short Range; + attribute unsigned short Range; /** InstantConsumption * \brief Must return instant fuel consumption in milliliters of fuel per second. **/ - readonly attribute unsigned short InstantConsumption; + attribute unsigned short InstantConsumption; /** InstantEconomy * \brief Must return instant fuel 'economy' in kilometers per liter of fuel. **/ - readonly attribute unsigned short InstantEconomy; + attribute unsigned short InstantEconomy; /** AverageEconomy * \brief Must return average fuel 'economy' in kilometers per liter of fuel since last reset. Setting this to any value should reset the counter to '0' @@ -315,17 +315,17 @@ interface EngineOil : VehiclePropertyType { /** Remaining * \brief Must return remaining engine oil as percentage of fullness. **/ - readonly attribute unsigned short Remaining; + attribute unsigned short Remaining; /** Temperature * \brief Must return Engine Oil Temperature in Celcius. **/ - readonly attribute long Temperature; + attribute long Temperature; /** Pressure * \brief Must return Engine Oil Pressure in kPa. **/ - readonly attribute unsigned short Pressure; + attribute unsigned short Pressure; }; [NoInterfaceObject] @@ -334,22 +334,22 @@ interface Location : VehiclePropertyType { /** Latitude * \brief Must return latitude in Deg.Min (-180, +180) **/ - readonly attribute double Latitude; + attribute double Latitude; /** Longitude * \brief Must return longitude in Deg.Min (-90, +90) **/ - readonly attribute double Longitude; + attribute double Longitude; /** Altitude * \brief Must return altitude in meters above sea-level (0). **/ - readonly attribute double Altitude; + attribute double Altitude; /** Direction * \brief Must return direction in Degrees (0-360) **/ - readonly attribute unsigned short Direction; + attribute unsigned short Direction; }; [NoInterfaceObject] @@ -358,7 +358,7 @@ interface ExteriorBrightness : VehiclePropertyType { /** ExteriorBrightness * \brief Must return the brightness outside the vehicle in lux. **/ - readonly attribute unsigned long ExteriorBrightness; + attribute unsigned long ExteriorBrightness; }; [NoInterfaceObject] @@ -367,12 +367,12 @@ interface Temperature : VehiclePropertyType { /** Interior * \brief Must return the temperature of the interior of the vehicle in celcius. **/ - readonly attribute signed short Interior; + attribute signed short Interior; /** Exterior * \brief Must return the temperature of the exterior of the vehicle in celcius. **/ - readonly attribute signed short Exterior; + attribute signed short Exterior; }; [NoInterfaceObject] @@ -381,7 +381,7 @@ interface RainSensor : VehiclePropertyType { /** RainSensor * \brief Must return level of rain intensity 0: No Rain - 10: Heaviest Rain. **/ - readonly attribute unsigned short RainSensor; + attribute unsigned short RainSensor; }; [NoInterfaceObject] @@ -394,7 +394,7 @@ interface WindshieldWiper : VehiclePropertyType { /** WindshieldWiper * \brief Must return Level of windshield whiper speed (see WIPERSPEED) **/ - readonly attribute unsigned short WindshieldWiper; + attribute unsigned short WindshieldWiper; }; dictionary DefrostDictionary { @@ -506,12 +506,12 @@ interface VehicleId : VehiclePropertyType { * \brief MUST return World Manufacturer Identifier (WMI) * WMI is defined by SAE ISO 3780:2009. 3 characters. **/ - readonly attribute DOMString WMI; + attribute DOMString WMI; /** VIN * \brief MUST return Vehicle Identification Number (VIN) as defined by ISO 3779. 17 characters. **/ - readonly attribute DOMString VIN; + attribute DOMString VIN; }; [NoInterfaceObject] @@ -520,17 +520,17 @@ interface Size : VehiclePropertyType { /** Width * \brief MUST return width of vehicle in mm **/ - readonly attribute unsigned long Width; + attribute unsigned long Width; /** Height * \brief MUST return height of vehicle in mm **/ - readonly attribute unsigned long Height; + attribute unsigned long Height; /** Length * \brief MUST return length of vehicle in mm **/ - readonly attribute unsigned long Length; + attribute unsigned long Length; }; [NoInterfaceObject] @@ -548,12 +548,12 @@ interface FuelInfo : VehiclePropertyType { /** Type * \brief MUST return type of fuel. integer 0-4 (see **/ - readonly attribute unsigned short Type; + attribute unsigned short Type; /** RefuelPosition * \brief MUST return position of refuling (see **/ - readonly attribute unsigned short RefuelPosition; + attribute unsigned short RefuelPosition; }; [NoInterfaceObject] @@ -568,7 +568,7 @@ interface VehicleType : VehiclePropertyType { /** Type * \brief MUST return type of Vehicle. Integer 0-5 (see **/ - readonly attribute unsigned short Type; + attribute unsigned short Type; }; [NoInterfaceObject] @@ -580,7 +580,7 @@ interface Doors : VehiclePropertyType { * Example a common mini-van may have Doors[0] = 2 doors, * Doors[1] = 1 (side door), Doors[2] = 1 (trunk). **/ - readonly attribute sequence DoorsPerRow; + attribute sequence DoorsPerRow; }; [NoInterfaceObject] @@ -592,7 +592,7 @@ interface TransmissionGearType : VehiclePropertyType { /** TransmissionGearType * \brief MUST return transmission gear type of either Automatic, Manual or Constant Variable (CV). See **/ - readonly attribute unsigned short TransmissionGearType; + attribute unsigned short TransmissionGearType; }; [NoInterfaceObject] @@ -601,22 +601,22 @@ interface WheelInformation : VehiclePropertyType { /** FrontWheelRadius * \brief MUST return Radius of Front Wheel(s) in mm. **/ - readonly attribute unsigned short FrontWheelRadius; + attribute unsigned short FrontWheelRadius; /** RearWheelRadius * \brief MUST return Radius of Rear Wheel(s) in mm. **/ - readonly attribute unsigned short RearWheelRadius; + attribute unsigned short RearWheelRadius; /** WheelTrack * \brief MUST return Wheel Track in mm. **/ - readonly attribute unsigned long WheelTrack; + attribute unsigned long WheelTrack; /** ABS * \brief MUST return Antilock Brake System status: on = true, off = false. **/ - readonly attribute boolean ABS; + attribute boolean ABS; }; [NoInterfaceObject] @@ -625,7 +625,7 @@ interface Odometer : VehiclePropertyType { /** Odometer * \brief MUST return Distance traveled in km **/ - readonly attribute unsigned long Odometer; + attribute unsigned long Odometer; }; [NoInterfaceObject] @@ -634,17 +634,17 @@ interface Fluid : VehiclePropertyType { /** Transmission * \brief MUST return Transmission fluid level percentage. 0-100. **/ - readonly attribute unsigned short Transmission; + attribute unsigned short Transmission; /** Brake * \brief MUST return Brake fluid level percentage. 0-100. **/ - readonly attribute unsigned short Brake; + attribute unsigned short Brake; /** Washer * \brief MUST return Washer fluid level percentage. 0-100. **/ - readonly attribute unsigned short Washer; + attribute unsigned short Washer; }; [NoInterfaceObject] @@ -653,12 +653,12 @@ interface Battery : VehiclePropertyType { /** Voltage * \brief MUST return battery voltage. **/ - readonly attribute double Voltage; + attribute double Voltage; /** Current * \brief MUST return battery current in Amperes **/ - readonly attribute double Current; + attribute double Current; }; [NoInterfaceObject] @@ -667,22 +667,22 @@ interface TirePressure : VehiclePropertyType { /** LeftFront * \brief MUST return left front tire pressure in kPa. **/ - readonly attribute double LeftFront; + attribute double LeftFront; /** RightFront * \brief MUST return right front tire pressure in kPa. **/ - readonly attribute double RightFront; + attribute double RightFront; /** LeftRear * \brief MUST return left rear tire pressure in kPa. **/ - readonly attribute double LeftRear; + attribute double LeftRear; /** RightRear * \brief MUST return right rear tire pressure in kPa. **/ - readonly attribute double RightRear; + attribute double RightRear; }; [NoInterfaceObject] @@ -691,22 +691,22 @@ interface TireTemperature : VehiclePropertyType { /** LeftFront * \brief MUST return left front tire temperature in Celcius. **/ - readonly attribute double LeftFront; + attribute double LeftFront; /** RightFront * \brief MUST return right front tire temperature in Celcius. **/ - readonly attribute double RightFront; + attribute double RightFront; /** LeftRear * \brief MUST return left rear tire temperature in Celcius. **/ - readonly attribute double LeftRear; + attribute double LeftRear; /** RightRear * \brief MUST return right rear tire temperature in Celcius. **/ - readonly attribute double RightRear; + attribute double RightRear; }; [NoInterfaceObject] @@ -715,7 +715,7 @@ interface SecurityAlert : VehiclePropertyType { /** SecurityAlert * \brief MUST return **/ - readonly attribute boolean SecurityAlert; + attribute boolean SecurityAlert; }; [NoInterfaceObject] @@ -724,7 +724,7 @@ interface ParkingBrake : VehiclePropertyType { /** ParkingBrake * must return status of parking brake: Engaged = true, Disengaged = false. **/ - readonly attribute boolean ParkingBrake; + attribute boolean ParkingBrake; }; [NoInterfaceObject] @@ -733,7 +733,7 @@ interface ParkingLight : VehiclePropertyType { /** ParkingLight * must return status of parking light: Engaged = true, Disengaged = false. **/ - readonly attribute boolean ParkingLight; + attribute boolean ParkingLight; }; [NoInterfaceObject] @@ -742,7 +742,7 @@ interface HazardLight : VehiclePropertyType { /** HazardLight * must return status of hazard light: Engaged = true, Disengaged = false. **/ - readonly attribute boolean HazardLight; + attribute boolean HazardLight; }; [NoInterfaceObject] @@ -751,7 +751,7 @@ interface AntilockBrakingSystem : VehiclePropertyType { /** AntilockBrakingSystem * \brief MUST return whether Antilock Braking System is Idle (false) or Engaged (true) **/ - readonly attribute boolean AntilockBrakingSystem; + attribute boolean AntilockBrakingSystem; }; [NoInterfaceObject] @@ -760,7 +760,7 @@ interface TractionControlSystem : VehiclePropertyType { /** TractionControlSystem * \brief MUST return whether Traction Control System is Off (false) or On (true) **/ - readonly attribute boolean TractionControlSystem; + attribute boolean TractionControlSystem; }; [NoInterfaceObject] @@ -769,7 +769,7 @@ interface VehicleTopSpeedLimit : VehiclePropertyType { /** VehicleTopSpeedLimit * \brief MUST returns top rated speed in km/h. 0 = no limit **/ - readonly attribute unsigned short VehicleTopSpeedLimit; + attribute unsigned short VehicleTopSpeedLimit; }; [NoInterfaceObject] @@ -785,7 +785,7 @@ interface AirbagStatus : VehiclePropertyType { /** AirbagStatus * \brief MUST returns a dictionary of Airbag (byte) and Status (byte) (see **/ - readonly attribute object AirbagStatus; + attribute object AirbagStatus; }; [NoInterfaceObject] @@ -804,19 +804,19 @@ interface DoorStatus : VehiclePropertyType { /** DoorStatus * \brief MUST returns dictionary of Door (byte) and Status (byte). See **/ - readonly attribute object DoorStatus; + attribute object DoorStatus; /** DoorLockStatus * \brief MUST returns dictionary of Door (byte) and Status (bool locked = true, unlocked = false). See **/ - readonly attribute object DoorLockStatus; + attribute object DoorLockStatus; /** ChildLockStatus * \brief MUST returns Child lock status of rear doors. active = true, inactive = false. * Setting this to 'true' will prevent the rear doors from being opened * from the inside. **/ - readonly attribute boolean ChildLockStatus; + attribute boolean ChildLockStatus; }; [NoInterfaceObject] @@ -831,7 +831,7 @@ interface SeatBeltStatus : VehiclePropertyType { /** SeatBeltStatus * \brief MUST returns dictionary of Seat Belt (byte, see SEATBELTLOCATION) and Status (bool: Fasten = true, Unfastened = false) **/ - readonly attribute object SeatBeltStatus; + attribute object SeatBeltStatus; }; [NoInterfaceObject] @@ -849,7 +849,7 @@ interface OccupantStatus : VehiclePropertyType { /** OccupantStatus * \brief MUST returns dictionary of Occupant (byte see OCCUPANTLOCATION) and Status (byte, see **/ - readonly attribute object OccupantStatus; + attribute object OccupantStatus; }; [NoInterfaceObject] @@ -864,7 +864,7 @@ interface ObstacleDistance : VehiclePropertyType { /** ObstacleDistance * \brief MUST returns dictionary of Distance Sensor (byte, see DISTANCESENSORLOCATION) and distance (double) in m. **/ - readonly attribute object ObstacleDistance; + attribute object ObstacleDistance; }; }; -- 2.7.4