Ignore:
Timestamp:
08/23/16 12:10:01 (5 years ago)
Author:
Thomas Fuhrmann
Message:

Save config on target and save all locally are now working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mavlink/lib/FlairCore/src/Widget.cpp

    r59 r63  
    2020
    2121using std::string;
     22
     23//remove, for tests
     24#include <iostream>
    2225
    2326namespace flair {
     
    221224}
    222225
     226template <> void Widget::SetPersistentXmlProp(std::string prop, std::string value) {
     227  SetVolatileXmlProp(prop, value);
     228  SetVolatileXmlProp(prop, value, pimpl_->file_node);
     229}
     230
     231void Widget::UnsetPersistentXmlProp(std::string prop) {
     232  xmlNodePtr Node = pimpl_->file_node;
     233
     234  for(xmlAttrPtr attr = Node->properties; NULL != attr; attr = attr->next)
     235  {
     236      std::cout << attr->name << std::endl;
     237  }
     238
     239  int ret = xmlUnsetProp(pimpl_->file_node, (xmlChar *)prop.c_str());
     240  std::cout << "UnsetPersistentXmlProp, item= " << prop << "result = " << ret << std::endl;
     241
     242  for(xmlAttrPtr attr = Node->properties; NULL != attr; attr = attr->next)
     243  {
     244      std::cout << attr->name << std::endl;
     245  }
     246}
     247
    223248void Widget::SendXml(void) { pimpl_->SendXml(); }
    224249
Note: See TracChangeset for help on using the changeset viewer.