libzypp  13.10.6
DownloadMode.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 
14 #include "zypp/base/String.h"
15 #include "zypp/DownloadMode.h"
16 
17 using std::endl;
18 
20 namespace zypp
21 {
22 
23  bool deserialize( const std::string & str_r, DownloadMode & result_r )
24  {
25 #define OUTS(VAL) if ( str::compareCI( str_r, #VAL ) == 0 ) { result_r = VAL; return true; }
26  OUTS( DownloadOnly );
30 #undef OUTS
31  return false;
32  }
33 
34  std::ostream & operator<<( std::ostream & str, DownloadMode obj )
35  {
36  switch ( obj )
37  {
38 #define OUTS(VAL) case VAL: return str << #VAL; break
40  OUTS( DownloadOnly );
44 #undef OUTS
45  }
46  return str << "DownloadMode(" << int(obj) << ")";
47  }
48 
49 
51 } // namespace zypp
Alternating download and install.
Definition: DownloadMode.h:32
First download all packages to the local cache.
Definition: DownloadMode.h:27
#define OUTS(V)
Similar to DownloadInAdvance, but try to split the transaction into heaps, where at the end of each h...
Definition: DownloadMode.h:29
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:120
Just download all packages to the local cache.
Definition: DownloadMode.h:25
libzypp will decide what to do.
Definition: DownloadMode.h:24
bool deserialize(const std::string &str_r, DownloadMode &result_r)
Definition: DownloadMode.cc:23
DownloadMode
Supported commit download policies.
Definition: DownloadMode.h:22