X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=android%2Fandroid_api%2Fbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fbase%2FOcPlatform.java;h=8733878eaef22776a59ea225737b3607ad43b52d;hb=3e9402ad71cb3e93266a77796f44d17bab9853fd;hp=5b2388da21ffb8c08672724a7f4b4c86aa213875;hpb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java b/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java index 5b2388d..8733878 100644 --- a/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java +++ b/android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java @@ -70,6 +70,7 @@ public final class OcPlatform { public static final String PRESENCE_URI = "/oic/ad"; private static volatile boolean sIsPlatformInitialized = false; + private static QualityOfService sPlatformQualityOfService = QualityOfService.NA; private OcPlatform() { } @@ -86,6 +87,8 @@ public final class OcPlatform { if (!sIsPlatformInitialized) { CaInterface.initialize(platformConfig.getContext()); + sPlatformQualityOfService = platformConfig.getQualityOfService(); + OcPlatform.configure( platformConfig.getServiceType().getValue(), platformConfig.getModeType().getValue(), @@ -463,7 +466,7 @@ public final class OcPlatform { /** * This API registers a resource with the server - *

+ *

* Note: This API applies to server & client side. *

* @@ -482,9 +485,10 @@ public final class OcPlatform { /** * This API registers a resource with the server NOTE: This API applies to server side only. - *

+ *

* Note: This API applies to server side only. *

+ * * @param resourceUri The URI of the resource. Example: "a/light" * @param resourceTypeName The resource type. Example: "light" * @param resourceInterface The resource interface (whether it is collection etc). @@ -933,4 +937,14 @@ public final class OcPlatform { "OcPlatform.Configure before any other API calls are permitted"); } } + + /** + * Gets platform quality of service + * + * @return quality of service + */ + public static QualityOfService getPlatformQualityOfService() { + OcPlatform.initCheck(); + return sPlatformQualityOfService; + } }