| 246 | } |
| 247 | |
| 248 | OsImageWriter* COSImageToolApp::GetWriter(const ComboBoxControl& cb) |
| 249 | { |
| 250 | string str; |
| 251 | int sel; |
| 252 | if (cb.GetSelection(sel)) |
| 253 | { |
| 254 | debug("dstsel= %d\n", sel); |
| 255 | if (sel==m_sdcards.size()) |
| 256 | return new XDAOsImageWriter(); |
| 257 | else |
| 258 | return new SdOsImageWriter(m_sdcards[sel]); |
| 259 | } |
| 260 | |
| 261 | if (cb.GetText(str)) |
| 262 | { |
| 263 | OsImageWriter* pwriter= FileOsImageWriter::GetFileWriter(str); |
| 264 | if (pwriter==NULL) |
| 265 | g_err.Set(stringformat("don't know how to write destinationfile %s", str.c_str())); |
| 266 | return pwriter; |
| 267 | } |
| 268 | g_err.Set("no target selected"); |
| 269 | return NULL; |
| 270 | } |
| 271 | |
| 272 | OsImageReader* COSImageToolApp::GetReader(const ComboBoxControl& cb) |
| 273 | { |
nothing calls this directly
no test coverage detected