| 567 | } |
| 568 | |
| 569 | vProfile FTPProfile::LoadProfiles(const TiXmlElement * profilesElem) { |
| 570 | vProfile profiles; |
| 571 | |
| 572 | if (!profilesElem) |
| 573 | return profiles; |
| 574 | |
| 575 | if ( strcmp(FTPProfile::ProfilesElement, profilesElem->Value()) ) |
| 576 | return profiles; |
| 577 | |
| 578 | const TiXmlElement* child = profilesElem->FirstChildElement("Profile"); |
| 579 | |
| 580 | for( ; child; child = child->NextSiblingElement("Profile") ) |
| 581 | { |
| 582 | FTPProfile * profile = FTPProfile::LoadProfile(child); |
| 583 | if (profile) { |
| 584 | profiles.push_back(profile); |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | SortVector(profiles); |
| 589 | |
| 590 | return profiles; |
| 591 | } |
| 592 | |
| 593 | TiXmlElement* FTPProfile::SaveProfiles(const vProfile profiles) { |
| 594 | TiXmlElement * profilesElem = new TiXmlElement(FTPProfile::ProfilesElement); |
nothing calls this directly
no test coverage detected