ilmControl: removed deprecated function ilm_createLayer()
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 8 Mar 2013 13:47:39 +0000 (05:47 -0800)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Thu, 14 Mar 2013 12:03:39 +0000 (05:03 -0700)
was replaced with ilm_createLayerWithDimension()

Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
LayerManagerClient/ilmControl/include/ilm_control.h
LayerManagerClient/ilmControl/src/ilm_control.c
LayerManagerControl/src/commands.cpp
LayerManagerControl/src/common.cpp

index be750c8..a9c6e9f 100644 (file)
@@ -114,17 +114,6 @@ ilmErrorTypes ilm_getSurfaceIDsOnLayer(t_ilm_layer layer,t_ilm_int* pLength,t_il
 
 /**
  * \brief Create a layer which should be managed by the service
- * \deprecated Will be removed in later version please use ilm_layerCreateWithDimension
- * \ingroup ilmControl
- * \param[out] pLayerId pointer where the id should be/is stored. It is possible
- *                      to set a id from outside, 0 will create a new id.
- * \return ILM_SUCCESS if the method call was successful
- * \return ILM_FAILED if the client can not call the method on the service.
- */
-ilmErrorTypes ilm_layerCreate(t_ilm_layer* pLayerId);
-
-/**
- * \brief Create a layer which should be managed by the service
  * \ingroup ilmControl
  * \param[out] pLayerId pointer where the id should be/is stored. It is possible
  *                      to set a id from outside, 0 will create a new id.
index 7ebf56d..4405a51 100644 (file)
@@ -198,41 +198,6 @@ ilmErrorTypes ilm_getSurfaceIDsOnLayer(t_ilm_layer layer, t_ilm_int* pLength, t_
     return returnValue;
 }
 
-
-ilmErrorTypes ilm_layerCreate(t_ilm_layer* pLayerId)
-{
-    ilmErrorTypes returnValue = ILM_FAILED;
-
-    if (pLayerId && (INVALID_ID != *pLayerId))
-    {
-        t_ilm_message response = 0;
-        t_ilm_message command = gIpcModule.createMessage("CreateLayerFromId");
-        if (command
-            && gIpcModule.appendUint(command, *pLayerId)
-            && sendAndWaitForResponse(command, &response, RESPONSE_TIMEOUT_IN_MS, &returnValue)
-            && gIpcModule.getUint(response, pLayerId))
-        {
-            returnValue = ILM_SUCCESS;
-        }
-        gIpcModule.destroyMessage(response);
-        gIpcModule.destroyMessage(command);
-    }
-    else
-    {
-        t_ilm_message response = 0;
-        t_ilm_message command = gIpcModule.createMessage("CreateLayer");
-        if (command
-            && sendAndWaitForResponse(command, &response, RESPONSE_TIMEOUT_IN_MS, &returnValue)
-            && gIpcModule.getUint(response, pLayerId))
-        {
-            returnValue = ILM_SUCCESS;
-        }
-        gIpcModule.destroyMessage(response);
-        gIpcModule.destroyMessage(command);
-    }
-    return returnValue;
-}
-
 ilmErrorTypes ilm_layerCreateWithDimension(t_ilm_layer* pLayerId, t_ilm_uint width, t_ilm_uint height)
 {
     ilmErrorTypes returnValue = ILM_FAILED;
index b0c4dfd..a5ad385 100644 (file)
@@ -576,34 +576,19 @@ COMMAND("set layer|surface <id> position <x> <y>")
 }
 
 //=============================================================================
-COMMAND("create layer <layerid> [<width> <height>]")
+COMMAND("create layer <layerid> <width> <height>")
 //=============================================================================
 {
-    if (input->contains("width") && input->contains("height"))
-    {
-        unsigned int layerid = input->getUint("layerid");
-        unsigned int width = input->getUint("width");
-        unsigned int height = input->getUint("height");
+    unsigned int layerid = input->getUint("layerid");
+    unsigned int width = input->getUint("width");
+    unsigned int height = input->getUint("height");
 
-        ilmErrorTypes callResult = ilm_layerCreateWithDimension(&layerid, width, height);
-        if (ILM_SUCCESS != callResult)
-        {
-            cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n";
-            cout << "Failed to create layer with ID " << layerid << "\n";
-            return;
-        }
-    }
-    else
+    ilmErrorTypes callResult = ilm_layerCreateWithDimension(&layerid, width, height);
+    if (ILM_SUCCESS != callResult)
     {
-        unsigned int layerid = input->getUint("layerid");
-
-        ilmErrorTypes callResult = ilm_layerCreate(&layerid);
-        if (ILM_SUCCESS != callResult)
-        {
-            cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n";
-            cout << "Failed to create layer with ID " << layerid << "\n";
-            return;
-        }
+        cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n";
+        cout << "Failed to create layer with ID " << layerid << "\n";
+        return;
     }
 }
 
index 65b1ee0..ae859a7 100644 (file)
@@ -544,7 +544,16 @@ t_scene_data cloneToUniLayerScene(t_scene_data* pScene)
         extraLayer = pScene->layers[0];
     }
 
-    ilmErrorTypes callResult = ilm_layerCreate(&extraLayer);
+    t_ilm_uint screenWidth;
+    t_ilm_uint screenHeight;
+    ilmErrorTypes callResult = ilm_getScreenResolution(0, &screenWidth, &screenHeight);
+    if (ILM_SUCCESS != callResult)
+    {
+        cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n";
+        cout << "Failed to create layer\n";
+    }
+
+    callResult = ilm_layerCreateWithDimension(&extraLayer, screenWidth, screenHeight);
     if (ILM_SUCCESS != callResult)
     {
         cout << "LayerManagerService returned: " << ILM_ERROR_STRING(callResult) << "\n";