2012-11-19 Sergio Martin <sergio.martin@artica.es>

* pandora_windows_service.cc: Added new fields of 
	agent in XML header like custom_id and url_address.
	Added coordinates data (not gis_exec yet)



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7157 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-11-19 15:57:56 +00:00
parent 699a99b4bd
commit ee34a103ce
2 changed files with 43 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2012-11-19 Sergio Martin <sergio.martin@artica.es>
* pandora_windows_service.cc: Added new fields of
agent in XML header like custom_id and url_address.
Added coordinates data (not gis_exec yet)
2012-11-19 Sergio Martin <sergio.martin@artica.es>
* modules/pandora_module.h

View File

@ -369,6 +369,7 @@ string
Pandora_Windows_Service::getXmlHeader () {
char timestamp[20];
string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name;
string custom_id, url_address, latitude, longitude, altitude, position_description;
time_t ctime;
struct tm *ctime_tm = NULL;
@ -425,6 +426,42 @@ Pandora_Windows_Service::getXmlHeader () {
xml += address;
}
}
// Get Custom ID
custom_id = conf->getValue ("custom_id");
if (custom_id != "") {
xml += "\" custom_id=\"";
xml += custom_id;
}
// Get Url Address
url_address = conf->getValue ("url_address");
if (url_address != "") {
xml += "\" url_address=\"";
xml += url_address;
}
// Get Coordinates
latitude = conf->getValue ("latitude");
longitude = conf->getValue ("longitude");
if(latitude != "" && longitude != "") {
xml += "\" latitude=\"";
xml += latitude;
xml += "\" longitude=\"";
xml += longitude;
altitude = conf->getValue ("altitude");
if(altitude != "") {
xml += "\" altitude=\"";
xml += altitude;
}
position_description = conf->getValue ("position_description");
if(position_description != "") {
xml += "\" position_description=\"";
xml += position_description;
}
}
xml += "\" interval=\"" + conf->getValue ("interval") +
"\" os_name=\"" + os_name +