93{
94
95
98 return false;
99 }
100 if (!
m_d->detstore) {
102 return false;
103 }
104 if (!
m_d->svclocator) {
106 return false;
107 }
110 return false;
111 }
112
113
114
115
116
117
118 if (
m_d->initialCruiseMode!=
"NONE"&&
m_d->initialCruiseMode!=
"EVENT"&&
m_d->initialCruiseMode!=
"TAB"&&
m_d->initialCruiseMode!=
"BOTH") {
119 VP1Msg::message(
"WARNING: unknown initial cruise mode "+
m_d->initialCruiseMode+
" (valid are NONE/EVENT/TAB/BOTH). Assuming NONE.");
120 m_d->initialCruiseMode =
"NONE";
121 }
122
123
124 if (!
m_d->singleEventSource.isEmpty()&&!
m_d->singleEventLocalTmpDir.isEmpty()) {
125 const bool httpmode =
m_d->singleEventSource.startsWith(
"http://") ||
m_d->singleEventSource.startsWith(
"https://") ;
126 if (httpmode) {
127 QUrl
url(
m_d->singleEventSource);
128 if (!
url.isValid()||
url.path().isEmpty()) {
129
130 VP1Msg::message(
"VP1ExecutionScheduler::init ERROR: Source URL ("+
m_d->singleEventSource+
") incorrect format!");
131 return false;
132 }
133
134
135 if(
m_d->singleEventSource.startsWith(
"https://")
136#ifndef QT_NO_SSL
137 && ! (QSslSocket::supportsSsl()) ) {
138#else
139 ) {
140#endif
141 VP1Msg::message(
"VP1ExecutionScheduler::init ERROR: Unable to retrieve events over Https. The platform does not support SSL");
142 return false;
143 }
144 } else {
145 QFileInfo fi_s(
m_d->singleEventSource), fi_l(
m_d->singleEventLocalTmpDir);
146 if (!fi_s.exists()||!fi_s.isDir()||!fi_s.isReadable()) {
147 VP1Msg::message(
"ERROR: Source directory ("+
m_d->singleEventSource+
") does not exist, is not readable, or is not a directory!");
148 return false;
149 }
150 if (!fi_l.exists()||!fi_l.isDir()||!fi_l.isReadable()||!fi_l.isWritable()) {
151 VP1Msg::message(
"ERROR: Local tmp directory ("+
m_d->singleEventLocalTmpDir+
") does not exist, had incorrect permissions, or is not a directory!");
152 return false;
153 }
154 if (fi_l.canonicalFilePath()==fi_s.canonicalFilePath()) {
155 VP1Msg::message(
"ERROR: Local tmp directory ("+
m_d->singleEventLocalTmpDir+
") is the same the source directory ("+
m_d->singleEventSource+
")");
156 return false;
157 }
158 }
159 } else {
160 if (!
m_d->singleEventSource.isEmpty()||!
m_d->singleEventLocalTmpDir.isEmpty()) {
161 VP1Msg::message(
"ERROR: Only one of SourceDir and LocalCopyDir set. Set either both or none.");
162 return false;
163 }
164 }
165
166 if (
m_d->localFileCacheLimit==1||
m_d->localFileCacheLimit==2) {
167 VP1Msg::message(
"WARNING: Too low value of localFileCacheLimit. Setting to 3. (Set to 0 to disable removal of locally cached files.");
168 m_d->localFileCacheLimit=3;
169 }
170
171 return true;
172}
static void message(const QString &, IVP1System *sys=0)