Commit 66899385 authored by Larry Sachs's avatar Larry Sachs

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's avatarLarry Sachs <larry.j.sachs@intel.com>
parent a9dfb509
......@@ -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
);
......
......@@ -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
);
......
......@@ -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
);
......
......@@ -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
);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment