[IOT-1538] Add support for Protocol-Independent ID
[platform/upstream/iotivity.git] / service / simulator / java / sdk / src / org / oic / simulator / SimulatorManager.java
index ed20a9c..a3351d5 100644 (file)
@@ -153,6 +153,8 @@ public class SimulatorManager {
     /**
      * API to set the device information.
      *
+     * @deprecated Use setDeviceInfo2 instead.
+     *
      * @param deviceInfo
      *            Device information.
      *
@@ -167,6 +169,24 @@ public class SimulatorManager {
     }
 
     /**
+     * API to set the device information.
+     *
+     * @param deviceInfo
+     *            Device information.
+     * @param protocolIndependentID
+     *            Protocol-independent UUID of the device.
+     *
+     * @throws InvalidArgsException
+     *             Thrown if the input parameter is empty.
+     * @throws SimulatorException
+     *             Thrown for other errors.
+     */
+    public static void setDeviceInfo2(String deviceInfo, String protocolIndependentID)
+            throws InvalidArgsException, SimulatorException {
+        nativeSetDeviceInfo2(deviceInfo, protocolIndependentID);
+    }
+
+    /**
      * API to search for devices on the given host in the network.
      *
      * @param hostUri
@@ -248,6 +268,8 @@ public class SimulatorManager {
             FindResourceListener listener);
 
     private static native void nativeSetDeviceInfo(String deviceInfo);
+    private static native void nativeSetDeviceInfo2(String deviceInfo,
+            String protocolIndependentID);
 
     private static native void nativeFindDevices(String hostUri,
             DeviceListener listener);