private String mIpAddress;\r
private int mPort;\r
private QualityOfService mQualityOfService;\r
+ private String mSvrDbPath; //TODO: Instead of SVRDB file, it should be Persistent Storage.
+ //this is only for 0.9.2
\r
/**\r
* @param context app context\r
* if you specify 5683 : client discovery can work even if they don't\r
* specify port\r
* @param qualityOfService quality of service\r
+ * @param dbPath Persistant storage file for SVR Database.
*/\r
public PlatformConfig(Context context,\r
ServiceType serviceType,\r
ModeType modeType,\r
String ipAddress,\r
int port,\r
- QualityOfService qualityOfService) {\r
+ QualityOfService qualityOfService,
+ String dbPath) {
this.mContext = context;\r
this.mServiceType = serviceType;\r
this.mModeType = modeType;\r
this.mIpAddress = ipAddress;\r
this.mPort = port;\r
this.mQualityOfService = qualityOfService;\r
+ 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, "");
}\r
\r
public Context getContext() {\r
\r
public QualityOfService getQualityOfService() {\r
return mQualityOfService;\r
+ }
+
+ public String getSvrDbPath() {
+ return mSvrDbPath;
}\r
}\r