Bump to 17.31.23
[platform/upstream/libzypp.git] / zypp-curl / curlconfig.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file zypp-curl/CurlConfig
10 */
11 #ifndef ZYPP_CURL_CURLCONFIG_H_INCLUDED
12 #define ZYPP_CURL_CURLCONFIG_H_INCLUDED
13
14 //#include <zypp/base/NonCopyable.h>
15 #include <zypp-core/base/String.h>
16
17 namespace zypp
18 {
19   namespace media
20   {
21
22
23   /**
24    * Structure holding values of curlrc options.
25    */
26   struct CurlConfig
27   {
28   public:
29     /**
30      * Parse a curlrc file and store the result in the \a config structure.
31      *
32      * \param config   a CurlConfig structure
33      * \param filename path to the curlrc file. If empty, ~/.curlrc is used.
34      * \return         0 on success, 1 if problem occurs.
35      */
36     static int parseConfig(CurlConfig & config, const std::string & filename = "");
37
38     /**
39      * Stores the \a value of the \a option in the \a config structure or
40      * logs an unknown option.
41      *
42      * \return         0 on success, 1 if problem occurs.
43      */
44     static int setParameter(CurlConfig & config,
45                             const std::string & option,
46                             const std::string & value);
47
48   public:
49     std::string proxyuserpwd;
50     // add more curl config data here as they become needed
51   };
52
53
54   } // namespace media
55 } // namespace zypp
56
57 #endif /*ZYPP_CURL_CURLCONFIG_H_INCLUDED*/