Barry debian version 0.18.5-1
[barry.git] / desktop / src / blistevo.cc
blob9c0d10dc99b1a91354f12c91f8d12fc80bac93ca
1 ///
2 /// \file blistevo.cc
3 /// Command line test tool for EvoSources
4 ///
6 /*
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"
23 #include <iostream>
24 #include "i18n.h"
26 using namespace std;
28 void DumpItems(const EvoSources::List &list)
30 EvoSources::List::const_iterator i;
31 for( i = list.begin(); i != list.end(); ++i ) {
32 cout << " "
33 << i->m_GroupName << ", "
34 << i->m_SourceName << ", "
35 << i->m_SourcePath << endl;
39 int main()
41 setlocale(LC_ALL, "");
42 INIT_I18N();
44 const char *separator = "\n-----------------------------------------\n";
46 EvoSources es;
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)"))
52 << endl;
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());