aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Sachs <larry.j.sachs@intel.com>2018-08-14 10:37:33 -0700
committerLarry Sachs <larry.j.sachs@intel.com>2018-08-14 10:37:33 -0700
commit66899385336fe99e089c43d2e1568b872a307f23 (patch)
treea1f858054762d356dca3bfa6fc51fa43eb6f3cc4
parenta9dfb509fe92662969a93c07ba1f922859b0dcc6 (diff)
Use only non-deprecated PlatformConfig ctors
With the latest release of IoTivity, PlatformConfig constructors taking an ip address and port have been deprecated. Calls to those constructors have been replaced with calls to non-deprecated constructors. Change-Id: I9a3198581be680495434d41721de50dacfe3ba44 Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
-rw-r--r--android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientActivity.java3
-rw-r--r--android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientSelectRendererActivity.java2
-rw-r--r--android/examples/upnpclient/src/main/java/org/iotivity/base/examples/OnOffCycleIntentService.java2
-rw-r--r--android/examples/upnpclient/src/main/java/org/iotivity/base/examples/UpnpClientActivity.java3
-rw-r--r--examples/Client.cpp2
-rw-r--r--examples/Observer.cpp2
-rw-r--r--examples/SimpleClient.cpp2
-rw-r--r--examples/iotApp/iotApp.cpp2
8 files changed, 4 insertions, 14 deletions
diff --git a/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientActivity.java b/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientActivity.java
index 96d328b..2dbd945 100644
--- a/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientActivity.java
+++ b/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientActivity.java
@@ -75,7 +75,6 @@ public class UpnpAvClientActivity extends Activity implements
OcResource.OnGetListener,
OcResource.OnObserveListener {
- public static final int UPDATE_REQUEST_CODE = 1;
public static final int RESOURCE_DISCOVERY_WAIT = 7; // TODO: move to settings
static private final Map<String, OcResource> mIotivityResourceLookup = new HashMap<>();
private final Map<String, Resource> mResourceLookup = new HashMap<>();
@@ -89,8 +88,6 @@ public class UpnpAvClientActivity extends Activity implements
context,
ServiceType.IN_PROC,
ModeType.CLIENT,
- "0.0.0.0", // By setting to "0.0.0.0", it binds to all available interfaces
- UPDATE_REQUEST_CODE, // Uses randomly available port
QualityOfService.LOW
);
diff --git a/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientSelectRendererActivity.java b/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientSelectRendererActivity.java
index b0c43db..2f60588 100644
--- a/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientSelectRendererActivity.java
+++ b/android/examples/upnpavclient/src/main/java/org/iotivity/base/examples/UpnpAvClientSelectRendererActivity.java
@@ -85,8 +85,6 @@ public class UpnpAvClientSelectRendererActivity extends Activity implements
context,
ServiceType.IN_PROC,
ModeType.CLIENT,
- "0.0.0.0", // By setting to "0.0.0.0", it binds to all available interfaces
- UpnpAvClientActivity.UPDATE_REQUEST_CODE, // Uses randomly available port
QualityOfService.LOW
);
diff --git a/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/OnOffCycleIntentService.java b/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/OnOffCycleIntentService.java
index 8a9d74d..1ba084d 100644
--- a/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/OnOffCycleIntentService.java
+++ b/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/OnOffCycleIntentService.java
@@ -72,8 +72,6 @@ public class OnOffCycleIntentService extends IntentService implements
context,
ServiceType.IN_PROC,
ModeType.CLIENT,
- "0.0.0.0", // By setting to "0.0.0.0", it binds to all available interfaces
- UpnpClientActivity.UPDATE_REQUEST_CODE, // Uses randomly available port
QualityOfService.LOW
);
diff --git a/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/UpnpClientActivity.java b/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/UpnpClientActivity.java
index 63bf993..0e588ce 100644
--- a/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/UpnpClientActivity.java
+++ b/android/examples/upnpclient/src/main/java/org/iotivity/base/examples/UpnpClientActivity.java
@@ -81,7 +81,6 @@ public class UpnpClientActivity extends Activity implements
OcResource.OnPutListener,
OcResource.OnObserveListener {
- public static final int UPDATE_REQUEST_CODE = 1;
private static final int AUTO_DISCOVERY_INTERVAL = 17; // TODO: move to settings
public static final int AUTO_DISCOVERY_RETRY_LIMIT = 3; // TODO: move to settings
private static final int RESOURCE_DISCOVERY_WAIT = 7; // TODO: move to settings
@@ -99,8 +98,6 @@ public class UpnpClientActivity extends Activity implements
context,
ServiceType.IN_PROC,
ModeType.CLIENT,
- "0.0.0.0", // By setting to "0.0.0.0", it binds to all available interfaces
- UPDATE_REQUEST_CODE, // Uses randomly available port
QualityOfService.LOW
);
diff --git a/examples/Client.cpp b/examples/Client.cpp
index 5c512a7..925da0e 100644
--- a/examples/Client.cpp
+++ b/examples/Client.cpp
@@ -337,7 +337,7 @@ void descoverResource()
{
PlatformConfig cfg =
{
- OC::ServiceType::InProc, OC::ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos,
+ OC::ServiceType::InProc, OC::ModeType::Both, OC_DEFAULT_ADAPTER, OC::QualityOfService::LowQos,
NULL
};
OCPlatform::Configure(cfg);
diff --git a/examples/Observer.cpp b/examples/Observer.cpp
index 86016d9..a12260a 100644
--- a/examples/Observer.cpp
+++ b/examples/Observer.cpp
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
{
PlatformConfig cfg =
{
- OC::ServiceType::InProc, OC::ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos,
+ OC::ServiceType::InProc, OC::ModeType::Both, OC_DEFAULT_ADAPTER, OC::QualityOfService::LowQos,
NULL
};
OCPlatform::Configure(cfg);
diff --git a/examples/SimpleClient.cpp b/examples/SimpleClient.cpp
index 1c37d98..aef3946 100644
--- a/examples/SimpleClient.cpp
+++ b/examples/SimpleClient.cpp
@@ -387,7 +387,7 @@ int main(int argc, char *argv[])
{
PlatformConfig cfg =
{
- OC::ServiceType::InProc, OC::ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos,
+ OC::ServiceType::InProc, OC::ModeType::Both, OC_DEFAULT_ADAPTER, OC::QualityOfService::LowQos,
NULL
};
OCPlatform::Configure(cfg);
diff --git a/examples/iotApp/iotApp.cpp b/examples/iotApp/iotApp.cpp
index acf23c1..08836b2 100644
--- a/examples/iotApp/iotApp.cpp
+++ b/examples/iotApp/iotApp.cpp
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
PlatformConfig cfg =
{
- OC::ServiceType::InProc, OC::ModeType::Both, "0.0.0.0", 0, OC::QualityOfService::LowQos,
+ OC::ServiceType::InProc, OC::ModeType::Both, OC_DEFAULT_ADAPTER, OC::QualityOfService::LowQos,
NULL
};
OCPlatform::Configure(cfg);