This file is indexed.

/usr/include/x86_64-linux-gnu/zypp/RepoInfo.h is in libzypp-dev 14.29.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
/*---------------------------------------------------------------------\
|                          ____ _   __ __ ___                          |
|                         |__  / \ / / . \ . \                         |
|                           / / \ V /|  _/  _/                         |
|                          / /__ | | | | | |                           |
|                         /_____||_| |_| |_|                           |
|                                                                      |
\---------------------------------------------------------------------*/
/** \file	zypp/RepoInfo.h
 *
*/
#ifndef ZYPP2_REPOSITORYINFO_H
#define ZYPP2_REPOSITORYINFO_H

#include <list>
#include <set>

#include "zypp/base/Iterator.h"
#include "zypp/APIConfig.h"

#include "zypp/Url.h"
#include "zypp/Locale.h"
#include "zypp/repo/RepoType.h"
#include "zypp/repo/RepoVariables.h"

#include "zypp/repo/RepoInfoBase.h"

///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////

  ///////////////////////////////////////////////////////////////////
  //
  //	CLASS NAME : RepoInfo
  //
  /**
   * \short What is known about a repository
   *
   * The class RepoInfo represents everything that
   * is known about a software repository.
   *
   * It can be used to store information about known
   * sources.
   *
   * This class tries to be compatible with the
   * concept of a .repo file used by YUM and
   * also available in the openSUSE build service.
   * See <tt>man yum.conf</tt>.
   *
   * Example file
   *
   * \code
   * [ruby]
   * name=Ruby repository (openSUSE_10.2)
   * type=rpm-md
   * baseurl=http://software.opensuse.org/download/ruby/openSUSE_10.2/
   * gpgcheck=1
   * gpgkey=http://software.opensuse.org/openSUSE-Build-Service.asc
   * enabled=1
   * priority=10
   * \endcode
   *
   * \note A RepoInfo is a hint about how
   * to create a Repository.
   */
  class RepoInfo : public repo::RepoInfoBase
  {
    friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );

    public:
      RepoInfo();
      virtual ~RepoInfo();

      /** Represents no Repository (one with an empty alias). */
      static const RepoInfo noRepo;

    public:
      /**
       * The default priority (\c 99).
       */
      static unsigned defaultPriority();
      /**
       * Repository priority for solver.
       * Some number between \c 1 (highest priority) and \c 99 (\ref defaultPriority).
       */
      unsigned priority() const;
      /**
       * Set repository priority for solver.
       * A \c newval_r of \c 0 sets the default priority.
       * \see \ref priority.
       */
      void setPriority( unsigned newval_r );

      typedef std::set<Url>           url_set;
      typedef url_set::size_type      urls_size_type;
      typedef transform_iterator<repo::RepoVariablesUrlReplacer, url_set::const_iterator> urls_const_iterator;
      /**
       * whether repository urls are available
       */
      bool baseUrlsEmpty() const;
      /**
       * whether there are manualy configured repository urls
       */
      bool baseUrlSet() const;
      /**
       * number of repository urls
       */
      urls_size_type baseUrlsSize() const;
      /**
       * iterator that points at begin of repository urls
       */
      urls_const_iterator baseUrlsBegin() const;
      /**
       * iterator that points at end of repository urls
       */
      urls_const_iterator baseUrlsEnd() const;
      /**
       * Pars pro toto: The first repository url
       */
      Url url() const
      { return( baseUrlsEmpty() ? Url() : *baseUrlsBegin()); }
      /**
       * A Url under which the metadata are located, or a set of mirrors.
       *
       * This can't be empty in order the repository to be valid
       * unless the download of the mirror list succeeds and it
       * contains a valid url.
       *
       * \deprecated IMO superfluous as we provide begin/end iterator.
       */
      std::set<Url> baseUrls() const;
      /**
       * Add a base url. \see baseUrls
       * \param url The base url for the repository.
       *
       * To recreate the base URLs list, use \ref setBaseUrl(const Url &) followed
       * by addBaseUrl().
       */
      void addBaseUrl( const Url &url );
      /**
       * Clears current base URL list and adds \a url.
       */
      void setBaseUrl( const Url &url );

      /**
       * \short Repository path
       *
       * Pathname relative to the base Url where the product/repository
       * is located
       *
       * For media containing more than one product, or repositories not
       * located at the root of the media it is important to know the path
       * to the product directory relative to the media root. So a media
       * verifier can be set for that media. You may also read it as
       * <tt>baseUrl = url to mount</tt> and <tt>path = path on the
       * mounted media</tt>.
       *
       * It is not mandatory, and the default is \c /.
       *
       * \note As a repository can have multiple Urls, the path is unique and
       * the same for all Urls, so it is assumed all the Urls have the
       * same media layout.
       *
       */
      Pathname path() const;
      /**
       * set the product path. \see path()
       * \param path the path to the product
       */
      void setPath( const Pathname &path );

      /**
       * Url of a file which contains a list of Urls
       * If empty, the base url will be used.
       */
      Url mirrorListUrl() const;
      /**
       * Set mirror list url. \see mirrorListUrl
       * \param url The base url for the list
       */
      void setMirrorListUrl( const Url &url );

      /**
       * Type of repository,
       *
       */
      repo::RepoType type() const;
      /**
       * This allows to adjust the \ref  RepoType lazy, from \c NONE to
       * some probed value, even for const objects.
       *
       * This is a NOOP if the current type is not \c NONE.
       */
      void setProbedType( const repo::RepoType &t ) const;
      /**
       * set the repository type \see type
       * \param t
       */
      void setType( const repo::RepoType &t );

      /**
       * \short Path where this repo metadata was read from
       *
       * \note could be an empty pathname for repo
       * infos created in memory.
       */
      Pathname metadataPath() const;
      /**
       * \short set the path where the local metadata is stored
       *
       * The path to the metadata of this repository
       * was defined, or empty if nowhere.
       *
       * \param path directory path
       */
      void setMetadataPath( const Pathname &path );

      /**
       * \short Path where this repo packages are cached
       */
      Pathname packagesPath() const;
      /**
       * \short set the path where the local packages are stored
       *
       * \param path directory path
       */
      void setPackagesPath( const Pathname &path );

      /**
       * \short Whether to check or not this repository with gpg
       *
       * \note This is a just a hint to the application and can
       * be ignored.
       *
       */
      bool gpgCheck() const;
      /**
       * \short Whether to check or not this repository with gpg
       *
       * \param check true (check) or false (dont'check)
       *
       * \note This is a just a hint to the application and can
       * be ignored.
       *
       */
      void setGpgCheck( bool check );

      /**
       * \short Key to use for gpg checking of this repository
       *
       * \param url Url to the key in ASCII armored format
       *
       * \note This is a just a hint to the application and can
       * be ignored.
       *
       */
      Url gpgKeyUrl() const;
      /**
       * \short Key to use for gpg checking of this repository
       *
       * \param url Url to the key in ASCII armored format
       *
       * \note This is a just a hint to the application and can
       * be ignored.
       *
       */
      void setGpgKeyUrl( const Url &gpgkey );

      /**
       * \short Whether packages downloaded from this repository will be kept in local cache
       */
      bool keepPackages() const;
      /**
       * \short Set if packaqes downloaded from this repository will be kept in local cache
       *
       * If the setting is true, all downloaded packages from this repository will be
       * copied to the local raw cache.
       *
       * \param keep true (keep the downloaded packages) or false (delete them after installation)
       *
       */
      void setKeepPackages( bool keep );

      /**
       * Gets name of the service to which this repository belongs or empty string
       * if it has been added manually.
       */
      std::string service() const;
      /**
       * sets service which added this repository
       */
      void setService( const std::string& name );

      /**
       * Distribution for which is this repository meant.
       */
      std::string targetDistribution() const;
      /**
       * Sets the distribution for which is this repository meant. This is
       * an in-memory value only, does not get written to the .repo file upon
       * saving.
       */
      void setTargetDistribution(const std::string & targetDistribution);

      /** Add content keywords */
      void addContent( const std::string & keyword_r );
      /** \overload add keywords from container */
      template <class _Iterator>
      void addContentFrom( _Iterator begin_r, _Iterator end_r )
      { for_( it, begin_r, end_r ) addContent( *it ); }
      /** \overload  */
      template <class _Container>
      void addContentFrom( const _Container & container_r )
      { addContentFrom( container_r.begin(), container_r.end() ); }

      /** Check for content keywords.
       * Checking for an empty string returns whether content kewords are
       * known at all. They may be missing due to missing metadata in disabled
       * repos.
       */
      bool hasContent( const std::string & keyword_r = std::string() ) const;
      /** \overload check for \b all keywords being present */
      template <class _Iterator>
      bool hasContentAll( _Iterator begin_r, _Iterator end_r ) const
      { for_( it, begin_r, end_r ) if ( ! hasContent( *it ) ) return false; return true; }
      /** \overload  */
      template <class _Container>
      bool hasContentAll( const _Container & container_r ) const
      { return hasContentAll( container_r.begin(), container_r.end() ); }
      /** \overload check for \b any keyword being present */
      template <class _Iterator>
      bool hasContentAny( _Iterator begin_r, _Iterator end_r ) const
      { for_( it, begin_r, end_r ) if ( hasContent( *it ) ) return true; return false; }
      /** \overload  */
      template <class _Container>
      bool hasContentAny( const _Container & container_r ) const
      { return hasContentAny( container_r.begin(), container_r.end() ); }

    public:
      /** \name Repository license
      */
      //@{
      /** Whether there is a license associated with the repo. */
      bool hasLicense() const;

      /** Whether the repo license has to be accepted, e.g. there is no
       * no acceptance needed for openSUSE.
       */
      bool needToAcceptLicense() const;

      /** Return the best license for the current (or a specified) locale. */
      std::string getLicense( const Locale & lang_r = Locale() );

      /** Return the locales the license is available for.
       * \ref Locale::noCode is included in case of \c license.txt which does
       * not specify a specific locale.
       */
      LocaleSet getLicenseLocales() const;
      //@}

      /** \name Repository global unique id
       *
       *
       */
      //@{
      //@}

    public:
      /**
       * Write a human-readable representation of this RepoInfo object
       * into the \a str stream. Useful for logging.
       */
      virtual std::ostream & dumpOn( std::ostream & str ) const;

      /**
       * Write this RepoInfo object into \a str in a <tr>.repo</tt> file format.
       */
      virtual std::ostream & dumpAsIniOn( std::ostream & str ) const;

      /**
       * Write an XML representation of this RepoInfo object.
       *
       * \param str
       * \param content this argument is ignored (used in other classed derived
       *                from RepoInfoBase.
       */
      virtual std::ostream & dumpAsXmlOn( std::ostream & str, const std::string & content = "" ) const;

      /** \deprecated Use camel cased dumpAsXmlOn */
      ZYPP_DEPRECATED std::ostream & dumpAsXMLOn( std::ostream & str, const std::string & content = "" ) const { return dumpAsXmlOn( str, content ); }

      class Impl;
    private:
      /** Pointer to implementation */
      RWCOW_pointer<Impl> _pimpl;
  };
  ///////////////////////////////////////////////////////////////////

  /** \relates RepoInfo */
  typedef shared_ptr<RepoInfo> RepoInfo_Ptr;
  /** \relates RepoInfo */
  typedef shared_ptr<const RepoInfo> RepoInfo_constPtr;
  /** \relates RepoInfo */
  typedef std::list<RepoInfo> RepoInfoList;

  /** \relates RepoInfo Stream output */
  std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );


  /////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP2_REPOSITORYINFO_H