22 #undef ZYPP_BASE_LOGGER_LOGGROUP
23 #define ZYPP_BASE_LOGGER_LOGGROUP "parser"
54 struct StopParsing {};
56 CredentialFileReaderImpl(
const Pathname & input_r,
const ProcessCredentials & callback_r )
69 virtual void beginParse()
73 virtual void consume(
const std::string & section_r )
83 ERR <<
"Ignore invalid URL '" << section_r <<
"' in file " <<
_input << endl;
88 virtual void consume(
const std::string & section_r,
const std::string & key_r,
const std::string & value_r )
90 if ( !
_secret && section_r.empty() )
95 if ( key_r ==
"username" )
96 _secret->setUsername( value_r );
97 else if ( key_r ==
"password" )
98 _secret->setPassword( value_r );
100 WAR <<
"Ignore unknown attribute '" << key_r <<
"=" << value_r <<
"' in file " <<
_input << endl;
106 virtual void endParse()
113 throw( StopParsing() );
116 ERR <<
"Ignore invalid credentials for URL '" <<
_secret->url() <<
"' in file " <<
_input << endl;
135 { CredentialFileReaderImpl( crfile_r, callback_r ); }
Base class for all URL exceptions.
const ProcessCredentials & _callback