Process an update of the SERVICE_LIST service of the given DimInfo
All services found are stored in the fServiceList map to be accessible through the server name. Their format is format is stored in the fFormatList. Note, that the list if only updated. So it will also contain services which are not available anymore. For an up-to-date list of service use fServiceList
Only entries matching the fType data member are stored.
- Todo:
- Make sure that we do not receive +/- updates on the SERVICE_LIST like on the SERVER_LIST
Definition at line 256 of file ServiceList.cc.
References buffer, fDescriptionList, fDescriptionMap, fFormatList, fServiceList, fType, DimInfo::getName(), DimInfo::getString(), Description::SplitDescription(), str, and type.
Referenced by CreateFMT(), and infoHandler().
265 if (buffer.find(
"SERVICE_DESC")!=buffer.length()-12)
268 const string server = buffer.substr(0, buffer.find_first_of(
'/'));
278 stringstream stream(str);
279 while (getline(stream, buffer,
'\n'))
285 const string type = buffer.substr(buffer.find_last_of(
'|')+1);
290 const string fmt = buffer.substr(buffer.find_first_of(
'|')+1, buffer.find_last_of(
'|')-buffer.find_first_of(
'|')-1);
291 const string name = buffer.substr(buffer.find_first_of(
'/')+1, buffer.find_first_of(
'|')-buffer.find_first_of(
'/')-1);
292 const string cmd = buffer.substr(0, buffer.find_first_of(
'|'));
295 list.push_back(name);
305 stringstream stream(str);
306 while (getline(stream, buffer,
'\n'))
313 const string svc = v[0].name;
StringMap fFormatList
A map storing server names and vector with all their available commands.
ServiceMap fServiceList
A map storing server names and a DimInfo for their SERVICE_LIST.
const std::string fType
A DimInfo to retrieve the SERVER_LIST from teh DNS server.
DescriptionMap fDescriptionList
A map storing all descriptions for commands and services.
static std::vector< Description > SplitDescription(const std::string &buffer)
StringMap fDescriptionMap
A map storing all commands and their format strings.