/*
- * //******************************************************************
- * //
- * // Copyright 2015 Intel Corporation.
- * //
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- * //
- * // Licensed under the Apache License, Version 2.0 (the "License");
- * // you may not use this file except in compliance with the License.
- * // You may obtain a copy of the License at
- * //
- * // http://www.apache.org/licenses/LICENSE-2.0
- * //
- * // Unless required by applicable law or agreed to in writing, software
- * // distributed under the License is distributed on an "AS IS" BASIS,
- * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * // See the License for the specific language governing permissions and
- * // limitations under the License.
- * //
- * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ *******************************************************************
+ *
+ * Copyright 2015 Intel Corporation.
+ *
+ *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/
package org.iotivity.base;
import org.iotivity.ca.CaInterface;
+import org.iotivity.base.BuildConfig;
import java.util.EnumSet;
import java.util.Iterator;
System.loadLibrary("octbstack");
System.loadLibrary("connectivity_abstraction");
System.loadLibrary("oc");
+ if (0 != BuildConfig.SECURED)
+ {
+ System.loadLibrary("ocprovision");
+ }
System.loadLibrary("ocstack-jni");
}
public static final String PRESENCE_URI = "/oic/ad";
private static volatile boolean sIsPlatformInitialized = false;
+ private static QualityOfService sPlatformQualityOfService = QualityOfService.NA;
private OcPlatform() {
}
*/
public synchronized static void Configure(PlatformConfig platformConfig) {
if (!sIsPlatformInitialized) {
- CaInterface.initialize(platformConfig.getContext());
+ CaInterface.initialize(platformConfig.getActivity(), platformConfig.getContext());
+
+ sPlatformQualityOfService = platformConfig.getQualityOfService();
OcPlatform.configure(
platformConfig.getServiceType().getValue(),
/**
* This API registers a resource with the server
- * <P>
+ * <p/>
* Note: This API applies to server & client side.
* </P>
*
/**
* This API registers a resource with the server NOTE: This API applies to server side only.
- * <P>
+ * <p/>
* Note: This API applies to server side only.
* </P>
+ *
* @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).
"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;
+ }
}