3 /// Command line test tool for EvoSources
7 Copyright (C) 2011-2013, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #include "EvoSources.h"
28 void DumpItems(const EvoSources::List
&list
)
30 EvoSources::List::const_iterator i
;
31 for( i
= list
.begin(); i
!= list
.end(); ++i
) {
33 << i
->m_GroupName
<< ", "
34 << i
->m_SourceName
<< ", "
35 << i
->m_SourcePath
<< endl
;
41 setlocale(LC_ALL
, "");
44 const char *separator
= "\n-----------------------------------------\n";
47 cout
<< _C("Defaultable: ") << (es
.IsDefaultable() ?
48 _C("Yes") : _C("No")) << endl
;
49 cout
<< _C("Error during detect: ")
50 << (es
.GetErrorMsg().size() ?
51 es
.GetErrorMsg().c_str() : _C("(none)"))
53 cout
<< _C("Results:") << "\n";
55 cout
<< "\n" << _C("Addressbook:") << separator
;
56 DumpItems(es
.GetAddressBook());
57 cout
<< "\n" << _C("Events:") << separator
;
58 DumpItems(es
.GetEvents());
59 cout
<< "\n" << _C("Tasks:") << separator
;
60 DumpItems(es
.GetTasks());
61 cout
<< "\n" << _C("Memos:") << separator
;
62 DumpItems(es
.GetMemos());