summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-11-14 21:41:08 +0100
committerasanoaozora <fifitaneki@hotmail.com>2016-11-14 21:41:08 +0100
commit88cedd35fcc2c493115f01a9bae20ce7a6b1cce2 (patch)
treed1a60faf58a42096e17c16aa5568afb01f47b9c8
parente599b957799ba65a1512711c0e2617f8fd3c0d2b (diff)
downloadpoi-service-88cedd35fcc2c493115f01a9bae20ce7a6b1cce2.tar.gz
GT-3328 GT-3432: Update of mapviewer
-rwxr-xr-xapi/franca/navigation/mapviewer/MapViewerControl.fidl22
-rw-r--r--api/map-viewer/genivi-mapviewer-mapviewercontrol.xml18
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx26
3 files changed, 21 insertions, 45 deletions
diff --git a/api/franca/navigation/mapviewer/MapViewerControl.fidl b/api/franca/navigation/mapviewer/MapViewerControl.fidl
index c773ff8..64c8676 100755
--- a/api/franca/navigation/mapviewer/MapViewerControl.fidl
+++ b/api/franca/navigation/mapviewer/MapViewerControl.fidl
@@ -836,7 +836,7 @@ interface MapViewerControl {
<**
@description : mapViewScaleChanged = This signal is emitted when the mapview scale changes
**>
- broadcast mapViewScaleChanged {
+ broadcast mapViewScaleChanged selective {
out {
<**
@@ -873,18 +873,6 @@ interface MapViewerControl {
}
<**
- @description : addMapViewScaleChangedListener = This method adds a listener which is notified when map view scale changes.
- **>
- method addMapViewScaleChangedListener {
- }
-
- <**
- @description : removeMapViewScaleChangedListener = This method removes a listener which is notified when map view scale changes.
- **>
- method removeMapViewScaleChangedListener {
- }
-
- <**
@description : setCameraHeight = This method sets the camera height
**>
method setCameraHeight {
@@ -1837,6 +1825,10 @@ interface MapViewerControl {
out {
Coordinate2D [] geoCoordinates
}
+ error {
+ OK
+ MAPVIEWERCONTROL_ERROR_INVALID_INPUT // wrong input coordinates
+ }
}
<**
@@ -1862,6 +1854,10 @@ interface MapViewerControl {
Pixel [] pixelCoordinates
}
+ error {
+ OK
+ MAPVIEWERCONTROL_ERROR_INVALID_INPUT // wrong input coordinates
+ }
}
<**
diff --git a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml
index 1104ead..621e2a6 100644
--- a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml
+++ b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml
@@ -607,16 +607,6 @@
</doc>
</arg>
</signal>
- <method name="AddMapViewScaleChangedListener">
- <doc>
- <line>AddMapViewScaleChangedListener = This method adds a listener which is notified when map view scale changes.</line>
- </doc>
- </method>
- <method name="RemoveMapViewScaleChangedListener">
- <doc>
- <line>RemoveMapViewScaleChangedListener = This method removes a listener which is notified when map view scale changes.</line>
- </doc>
- </method>
<method name="SetCameraHeight">
<doc>
<line>SetCameraHeight = This method sets the camera height</line>
@@ -1559,7 +1549,9 @@ cover with other windows or user interface elements</line>
<line>y = y-coordinate (y=0 indicates the first top pixel of the map view)</line>
</doc>
</arg>
- <arg name="geoCoordinates" type="a(dd)" direction="out">
+ <arg name="error" type="i" direction="out">
+ </arg>
+ <arg name="geoCoordinates" type="a(dd)" direction="out">
<doc>
<line>geoCoordinates = array[struct(lat,lon)]</line>
<line>lat = latitude in format %3.6f. Range[-90:+90]</line>
@@ -1588,7 +1580,9 @@ cover with other windows or user interface elements</line>
<line>lon = longitude in format %3.6f. Range[-180:+180]</line>
</doc>
</arg>
- <arg name="pixelCoordinates" type="a(qq)" direction="out">
+ <arg name="error" type="i" direction="out">
+ </arg>
+ <arg name="pixelCoordinates" type="a(qq)" direction="out">
<doc>
<line>pixelCoordinates = array[struct(x,y)]</line>
<line>x = x-coordinate (x=0 indicates the first left pixel of the map view)</line>
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
index 2914746..e538be1 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -608,22 +608,6 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
}
/**
- * description: addMapViewScaleChangedListener = This method adds a listener which is notified
- * when map view scale changes.
- */
- void addMapViewScaleChangedListener(const std::shared_ptr<CommonAPI::ClientId> _client, addMapViewScaleChangedListenerReply_t _reply){
- throw DBus::ErrorNotSupported("Not yet supported");
- }
-
- /**
- * description: removeMapViewScaleChangedListener = This method removes a listener which is
- * notified when map view scale changes.
- */
- void removeMapViewScaleChangedListener(const std::shared_ptr<CommonAPI::ClientId> _client, removeMapViewScaleChangedListenerReply_t _reply){
- throw DBus::ErrorNotSupported("Not yet supported");
- }
-
- /**
* description: setCameraHeight = This method sets the camera height
*/
void setCameraHeight(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, uint32_t _height, setCameraHeightReply_t _reply){
@@ -726,7 +710,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
uint8_t current_scale;
MapViewerControl::MapScaleType is_min_max;
obj->GetMapViewScale(current_scale,is_min_max);
- fireMapViewScaleChangedEvent(_mapViewInstanceHandle,current_scale,is_min_max);
+ fireMapViewScaleChangedSelective(_mapViewInstanceHandle,current_scale,is_min_max);
}
_reply();
}
@@ -744,7 +728,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
uint8_t current_scale;
MapViewerControl::MapScaleType is_min_max;
obj->GetMapViewScale(current_scale,is_min_max);
- fireMapViewScaleChangedEvent(_mapViewInstanceHandle,current_scale,is_min_max);
+ fireMapViewScaleChangedSelective(_mapViewInstanceHandle,current_scale,is_min_max);
}
_reply();
}
@@ -1030,10 +1014,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
void convertPixelCoordsToGeoCoords(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, std::vector<MapViewerControl::Pixel> _pixelCoordinates, convertPixelCoordsToGeoCoordsReply_t _reply){
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
std::vector< ::v4::org::genivi::navigation::NavigationTypes::Coordinate2D> _geoCoordinates;
+ MapViewerControl::convertPixelCoordsToGeoCoordsError _error = MapViewerControl::convertPixelCoordsToGeoCoordsError::OK;
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
else obj->ConvertPixelCoordsToGeoCoords(_sessionHandle, _pixelCoordinates, _geoCoordinates);
- _reply(_geoCoordinates);
+ _reply(_error,_geoCoordinates);
}
/**
@@ -1043,10 +1028,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
void convertGeoCoordsToPixelCoords(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, std::vector< ::v4::org::genivi::navigation::NavigationTypes::Coordinate2D> _geoCoordinates, convertGeoCoordsToPixelCoordsReply_t _reply){
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
std::vector<MapViewerControl::Pixel> _pixelCoordinates;
+ MapViewerControl::convertGeoCoordsToPixelCoordsError _error = MapViewerControl::convertGeoCoordsToPixelCoordsError::OK;
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
else obj->ConvertGeoCoordsToPixelCoords(_sessionHandle, _geoCoordinates, _pixelCoordinates);
- _reply(_pixelCoordinates);
+ _reply(_error,_pixelCoordinates);
}
/**