jigdo API

JigdoConfig Class Reference

Representation for config data in a .jigdo file - based on ConfigFile. More...

#include <jigdoconfig.hh>

List of all members.


Public Member Functions

 JigdoConfig (const char *jigdoFile, ProgressReporter &pr)
 Open file for input and create a ConfigFile object.
 JigdoConfig (const string &jigdoFile, ProgressReporter &pr)
 JigdoConfig (const char *jigdoFile, ConfigFile *configFile, ProgressReporter &pr)
 Take over possession of existing ConfigFile - configFile will be deleted in ~JigdoConfig()! jigdoFile argument is not used except for error messages.
 JigdoConfig (const string &jigdoFile, ConfigFile *configFile, ProgressReporter &pr)
 ~JigdoConfig ()
ConfigFileconfigFile ()
void rescan ()
 Prepare internal map from label name to URIs.
void setReporter (ProgressReporter &pr)
 Change reporter for error messages.

Friends

class Lookup

Classes

struct  ForwardReporter
class  Lookup
 Given an URI-style string like "MyServer:dir/foo/file.gz", do label lookup (looking for [Servers] entries like "MyServer=...") and return the resulting strings, e.g. More...
class  ProgressReporter
 To be implemented by anyone who is interested in errors/info from the JigdoConfig. More...
struct  ServerLine

Detailed Description

Representation for config data in a .jigdo file - based on ConfigFile.

Constructor & Destructor Documentation

JigdoConfig::JigdoConfig ( const char *  jigdoFile,
ProgressReporter pr 
)

Open file for input and create a ConfigFile object.

References _, debug, rescan(), and subst.

JigdoConfig::JigdoConfig ( const string &  jigdoFile,
ProgressReporter pr 
)

JigdoConfig::JigdoConfig ( const char *  jigdoFile,
ConfigFile configFile,
ProgressReporter pr 
)

Take over possession of existing ConfigFile - configFile will be deleted in ~JigdoConfig()! jigdoFile argument is not used except for error messages.

References rescan(), and ConfigFile::setReporter().

JigdoConfig::JigdoConfig ( const string &  jigdoFile,
ConfigFile configFile,
ProgressReporter pr 
)

JigdoConfig::~JigdoConfig (  )  [inline]


Member Function Documentation

ConfigFile& JigdoConfig::configFile (  )  [inline]

void JigdoConfig::rescan (  ) 

Prepare internal map from label name to URIs.

Is called automatically during JigdoConfig(), but must be called manually afterwards whenever any entry in the ConfigFile's "[Servers]" section changes. May throw an Error if the jigdo file format version is not supported.

References debug, ConfigFile::end(), end, ConfigFile::firstSection(), ConfigFile::iterator::nextLabel(), ConfigFile::iterator::nextSection(), SECTION_NAME, and ConfigFile::iterator::setLabelOffsets().

Referenced by JigdoConfig().

void JigdoConfig::setReporter ( ProgressReporter pr  )  [inline]

Change reporter for error messages.


Friends And Related Function Documentation

friend class Lookup [friend]


The documentation for this class was generated from the following files:

Generated on Tue Sep 23 14:27:42 2008 for jigdo by  doxygen 1.5.6