- Timestamp:
- 01/03/07 15:31:25 (16 years ago)
- Files:
-
- trunk/libfreebob/src/devicemanager.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libfreebob/src/devicemanager.cpp
r366 r367 1 1 /* devicemanager.cpp 2 * Copyright (C) 2005,06 by Daniel Wagner2 * Copyright (C) 2005,06,07 by Daniel Wagner 3 3 * 4 4 * This file is part of FreeBoB. … … 34 34 35 35 #include <iostream> 36 #include <sstream> 37 36 38 #include <unistd.h> 37 39 … … 369 371 BeBoB::AvDevice* pBeBoBDevice = reinterpret_cast< BeBoB::AvDevice* >( pAvDevice ); 370 372 if ( pBeBoBDevice ) { 373 // Let's use a very simple path to find the devices later. 374 // Since under hood there will an xml node name this should 375 // adhere the needed naming rules. Of course we could give it 376 // a good node name and add an attribute but that would mean 377 // we have to expose a bigger interface from IOSerialize/IODesialize, 378 // which is just not needed. KISS. 379 ostringstream strstrm; 380 strstrm << "id" << i; 381 Glib::ustring basePath = "BeBoB/" + strstrm.str() + "/"; 382 371 383 Util::XMLSerialize ser( fileName ); 372 std::string idx = "id" + i;373 Glib::ustring basePath = "BeBoB/" + idx + "/"; 384 pBeBoBDevice->serialize( basePath, ser ); 385 374 386 i++; 375 pBeBoBDevice->serialize( basePath, ser );376 387 std::cout << "a bebob device serialized" << std::endl; 377 return true;378 388 } 379 389 } … … 413 423 414 424 do { 415 std::string idx = "id" + i; 425 ostringstream strstrm; 426 strstrm << "id" << i; 416 427 pBeBoBDevice = BeBoB::AvDevice::deserialize( 417 "BeBoB/" + idx+ "/",428 "BeBoB/" + strstrm.str() + "/", 418 429 *m_1394Service, 419 430 deser );