File: curlconfig.h

package info (click to toggle)
libzypp 17.36.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 26,380 kB
  • sloc: cpp: 132,576; xml: 2,587; sh: 486; makefile: 26; python: 23
file content (57 lines) | stat: -rw-r--r-- 1,815 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*---------------------------------------------------------------------\
|                          ____ _   __ __ ___                          |
|                         |__  / \ / / . \ . \                         |
|                           / / \ V /|  _/  _/                         |
|                          / /__ | | | | | |                           |
|                         /_____||_| |_| |_|                           |
|                                                                      |
\---------------------------------------------------------------------*/
/** \file zypp-curl/CurlConfig
*/
#ifndef ZYPP_CURL_CURLCONFIG_H_INCLUDED
#define ZYPP_CURL_CURLCONFIG_H_INCLUDED

//#include <zypp/base/NonCopyable.h>
#include <zypp-core/base/String.h>

namespace zypp
{
  namespace media
  {


  /**
   * Structure holding values of curlrc options.
   */
  struct CurlConfig
  {
  public:
    /**
     * Parse a curlrc file and store the result in the \a config structure.
     *
     * \param config   a CurlConfig structure
     * \param filename path to the curlrc file. If empty, ~/.curlrc is used.
     * \return         0 on success, 1 if problem occurs.
     */
    static int parseConfig(CurlConfig & config, const std::string & filename = "");

    /**
     * Stores the \a value of the \a option in the \a config structure or
     * logs an unknown option.
     *
     * \return         0 on success, 1 if problem occurs.
     */
    static int setParameter(CurlConfig & config,
                            const std::string & option,
                            const std::string & value);

  public:
    std::string proxyuserpwd;
    // add more curl config data here as they become needed
  };


  } // namespace media
} // namespace zypp

#endif /*ZYPP_CURL_CURLCONFIG_H_INCLUDED*/