21dc8a7936eef7d87547fc7e727781ab96817b49
[platform/upstream/libzypp.git] / devel / devel.dmacvicar / RepositoryManager_tp.cc
1
2 #include <sys/time.h>
3
4 #include <iostream>
5 #include <fstream>
6
7 #include <zypp/base/Logger.h>
8 #include <zypp/ZYpp.h>
9 #include <zypp/ZYppFactory.h>
10
11 #include "zypp/Product.h"
12 #include "zypp/detail/PackageImplIf.h"
13 #include "zypp/Package.h"
14 #include "zypp2/RepositoryFactory.h"
15 #include "zypp2/RepoInfo.h"
16
17 #include "zypp2/repo/cached/RepoImpl.h"
18 #include "zypp/data/ResolvableData.h"
19
20 #include "zypp2/RepoManager.h"
21 #include "zypp2/RepoInfo.h"
22
23
24 using namespace std;
25 using namespace zypp;
26 using namespace zypp::source;
27
28
29 int main(int argc, char **argv)
30 {
31     try
32     {
33       ZYpp::Ptr z = getZYpp();
34     
35       Pathname dbpath = Pathname(getenv("PWD"));
36       
37       RepoManager manager;
38       RepoInfoList repos = manager.knownRepositories();
39
40       for ( RepoInfoList::const_iterator it = repos.begin(); it != repos.end(); ++it )
41       {
42         cout << *it << endl;
43       }
44     }
45     catch ( const Exception &e )
46     {
47       ZYPP_CAUGHT(e);
48       cout << e.msg() << endl;
49     }
50     
51     return 0;
52 }