2 * //******************************************************************
\r
4 * // Copyright 2015 Intel Corporation.
\r
6 * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
8 * // Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * // you may not use this file except in compliance with the License.
\r
10 * // You may obtain a copy of the License at
\r
12 * // http://www.apache.org/licenses/LICENSE-2.0
\r
14 * // Unless required by applicable law or agreed to in writing, software
\r
15 * // distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * // See the License for the specific language governing permissions and
\r
18 * // limitations under the License.
\r
20 * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
23 package org.iotivity.base;
\r
25 import android.content.Context;
\r
28 * Data structure to provide the configuration.
\r
30 public class PlatformConfig {
\r
32 private Context mContext;
\r
33 private ServiceType mServiceType;
\r
34 private ModeType mModeType;
\r
35 private String mIpAddress;
\r
37 private QualityOfService mQualityOfService;
\r
40 * @param context app context
\r
41 * @param serviceType indicate IN_PROC or OUT_OF_PROC
\r
42 * @param modeType indicate whether we want to do server, client or both
\r
43 * @param ipAddress ip address of server
\r
44 * if you specify 0.0.0.0 : it listens on any interface
\r
45 * @param port port of server
\r
46 * if you specifiy 0 : next available random port is used
\r
47 * if you specify 5683 : client discovery can work even if they don't
\r
49 * @param qualityOfService quality of service
\r
51 public PlatformConfig(Context context,
\r
52 ServiceType serviceType,
\r
56 QualityOfService qualityOfService) {
\r
57 this.mContext = context;
\r
58 this.mServiceType = serviceType;
\r
59 this.mModeType = modeType;
\r
60 this.mIpAddress = ipAddress;
\r
62 this.mQualityOfService = qualityOfService;
\r
65 public Context getContext() {
\r
69 public ServiceType getServiceType() {
\r
70 return mServiceType;
\r
73 public ModeType getModeType() {
\r
77 public String getIpAddress() {
\r
81 public int getPort() {
\r
85 public QualityOfService getQualityOfService() {
\r
86 return mQualityOfService;
\r