1 //******************************************************************
3 // Copyright 2014 MediaTek All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 package org.iotivity.base;
23 public class PlatformConfig extends NativeInstance
25 final private static String TAG = "PlatformConfig";
27 System.loadLibrary("ocstack-jni");
30 // ENUM definition. Need to match with OCApi.h
31 public class ServiceType
33 static final public int INPROC = 0;
34 static final public int OUTPROC = 1;
39 static final public int SERVER = 0;
40 static final public int CLIENT = 1;
41 static final public int BOTH = 2;
45 public class QualityOfService
47 static final public int LO_QOS = 0;
48 static final public int ME_QOS = 1;
49 static final public int HI_QOS = 2;
50 static final public int NA_QOS = 3;
53 public PlatformConfig(int serviceType,
59 super.nativeHandle = createNativeInstance(serviceType, mode, ipAddress, port, QoS);
63 protected native long createNativeInstance(int serviceType,