X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=android%2Fandroid_api%2Fbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fbase%2FPlatformConfig.java;h=70d9df38073429ce7b26f50f64a633723ae23f45;hb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;hp=7fd9ac0622db8ed28a916d9c98ca9553140dda98;hpb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/android_api/base/src/main/java/org/iotivity/base/PlatformConfig.java b/android/android_api/base/src/main/java/org/iotivity/base/PlatformConfig.java index 7fd9ac0..70d9df3 100644 --- a/android/android_api/base/src/main/java/org/iotivity/base/PlatformConfig.java +++ b/android/android_api/base/src/main/java/org/iotivity/base/PlatformConfig.java @@ -35,6 +35,8 @@ public class PlatformConfig { private String mIpAddress; private int mPort; private QualityOfService mQualityOfService; + private String mSvrDbPath; //TODO: Instead of SVRDB file, it should be Persistent Storage. + //this is only for 0.9.2 /** * @param context app context @@ -47,19 +49,44 @@ public class PlatformConfig { * if you specify 5683 : client discovery can work even if they don't * specify port * @param qualityOfService quality of service + * @param dbPath Persistant storage file for SVR Database. */ public PlatformConfig(Context context, ServiceType serviceType, ModeType modeType, String ipAddress, int port, - QualityOfService qualityOfService) { + QualityOfService qualityOfService, + String dbPath) { this.mContext = context; this.mServiceType = serviceType; this.mModeType = modeType; this.mIpAddress = ipAddress; this.mPort = port; this.mQualityOfService = qualityOfService; + this.mSvrDbPath = dbPath; + } + + /** + * @param context app context + * @param serviceType indicate IN_PROC or OUT_OF_PROC + * @param modeType indicate whether we want to do server, client or both + * @param ipAddress ip address of server + * if you specify 0.0.0.0 : it listens on any interface + * @param port port of server + * if you specifiy 0 : next available random port is used + * if you specify 5683 : client discovery can work even if they don't + * specify port + * @param qualityOfService quality of service + */ + //Avoid breaking building java samples due to persistent storage SVR DB changes. + public PlatformConfig(Context context, + ServiceType serviceType, + ModeType modeType, + String ipAddress, + int port, + QualityOfService qualityOfService) { + this(context,serviceType,modeType,ipAddress,port,qualityOfService, ""); } public Context getContext() { @@ -84,5 +111,9 @@ public class PlatformConfig { public QualityOfService getQualityOfService() { return mQualityOfService; + } + + public String getSvrDbPath() { + return mSvrDbPath; } }