3 /// Command line test tool for EvoSources
7 Copyright (C) 2011-2012, 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
<< "\n" << _C("Addressbook:") << separator
;
48 DumpItems(es
.GetAddressBook());
49 cout
<< "\n" << _C("Events:") << separator
;
50 DumpItems(es
.GetEvents());
51 cout
<< "\n" << _C("Tasks:") << separator
;
52 DumpItems(es
.GetTasks());
53 cout
<< "\n" << _C("Memos:") << separator
;
54 DumpItems(es
.GetMemos());
56 cout
<< "Defaultable: " << (es
.IsDefaultable() ? "Yes" : "No") << endl
;
57 if( es
.GetErrorMsg().size() ) {
58 cout
<< "Error during detect: " << es
.GetErrorMsg() << endl
;