1 /******************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
20 package org.iotivity.service;
22 public class RcsObject {
24 System.loadLibrary("gnustl_shared");
25 System.loadLibrary("oc_logger");
26 System.loadLibrary("connectivity_abstraction");
27 System.loadLibrary("ca-interface");
28 System.loadLibrary("octbstack");
29 System.loadLibrary("oc");
30 System.loadLibrary("rcs_client");
31 System.loadLibrary("rcs_server");
32 System.loadLibrary("rcs_common");
33 System.loadLibrary("rcs_jni");
36 private long mNativeHandle;
38 private native void nativeDispose();
40 protected RcsObject() {
44 protected void finalize() throws Throwable {
50 protected void dispose() {
51 if (mNativeHandle != 0L) nativeDispose();
54 protected boolean hasHandle() {
55 return mNativeHandle != 0L;