#include "KernelBasis.hxx"
+#include <sstream>
+
static bool DEFAULT_SSL_MODE = true;
static bool GUI_MODE = false;
SALOME_BIG_OBJ_ON_DISK_THRES = newThresholdInByte;
}
+enum class BigObjTransferProtocol : char
+{
+ SharedFileSystem = 0,
+ SSDCopyFileSystem = 1
+};
+
+constexpr char SALOME_FILE_BIG_OBJ_DIR_SEP = '@';
+
static std::string SALOME_FILE_BIG_OBJ_DIR;
+/*!
+ * This method returns the protocol of proxy transfert and the directory
+ */
+int SALOME::GetBigObjOnDiskProtocolAndDirectory(std::string& directory)
+{
+ if(SALOME_FILE_BIG_OBJ_DIR.size() < 3)
+ {
+ directory = SALOME_FILE_BIG_OBJ_DIR;
+ return static_cast<char>( BigObjTransferProtocol::SharedFileSystem );
+ }
+ std::string protocol = SALOME_FILE_BIG_OBJ_DIR.substr(0,3);
+ directory = SALOME_FILE_BIG_OBJ_DIR.substr(3);
+ if( protocol[0]!=SALOME_FILE_BIG_OBJ_DIR_SEP || protocol[2]!=SALOME_FILE_BIG_OBJ_DIR_SEP)
+ {
+ directory = SALOME_FILE_BIG_OBJ_DIR;
+ return static_cast<char>( BigObjTransferProtocol::SharedFileSystem );
+ }
+ std::istringstream iss(protocol.substr(1,1)); iss.exceptions(std::istringstream::failbit | std::istringstream::badbit);
+ char iproxyprot = 0;
+ iss >> iproxyprot;
+ return iproxyprot;
+}
+
std::string SALOME::GetBigObjOnDiskDirectory()
{
return SALOME_FILE_BIG_OBJ_DIR;
PyExecutionMode BASICS_EXPORT GetPyExecutionMode();
int BASICS_EXPORT GetBigObjOnDiskThreshold();
void BASICS_EXPORT SetBigObjOnDiskThreshold(int newThresholdInByte);
+ int BASICS_EXPORT GetBigObjOnDiskProtocolAndDirectory(std::string& directory);
std::string BASICS_EXPORT GetBigObjOnDiskDirectory();
void BASICS_EXPORT SetBigObjOnDiskDirectory(const std::string& directory);
bool BASICS_EXPORT BigObjOnDiskDirectoryDefined();
%rename (GetBigObjOnDiskThreshold) GetBigObjOnDiskThresholdSwig;
%rename (SetBigObjOnDiskThreshold) SetBigObjOnDiskThresholdSwig;
%rename (GetBigObjOnDiskDirectory) GetBigObjOnDiskDirectorySwig;
+%rename (GetBigObjOnDiskProtocolAndDirectory) GetBigObjOnDiskProtocolAndDirectorySwig;
%rename (SetBigObjOnDiskDirectory) SetBigObjOnDiskDirectorySwig;
%rename (BigObjOnDiskDirectoryDefined) BigObjOnDiskDirectoryDefinedSwig;
return SALOME::BigObjOnDiskDirectoryDefined();
}
+PyObject *GetBigObjOnDiskProtocolAndDirectorySwig()
+{
+ std::string directory;
+ int ret0 = SALOME::GetBigObjOnDiskProtocolAndDirectory(directory);
+ PyObject *ret(PyTuple_New(2));
+ PyTuple_SetItem(ret,0,PyInt_FromLong(ret0));
+ PyTuple_SetItem(ret,1,PyUnicode_FromString(directory.c_str()));
+ return ret;
+}
+
void SetVerbosityLevelSwig(const std::string& level)
{
SetVerbosityLevelStr(level);