1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/media/CredentialFileReader.h
12 #ifndef ZYPP_MEDIA_CREDENTIALFILEREADER_H
13 #define ZYPP_MEDIA_CREDENTIALFILEREADER_H
15 #include "zypp/base/Function.h"
17 #include "zypp/Pathname.h"
19 #include "zypp/media/MediaUserAuth.h"
21 ///////////////////////////////////////////////////////////////////
24 ///////////////////////////////////////////////////////////////////
27 //////////////////////////////////////////////////////////////////////
28 /// \class CredentialFileReader
29 /// \brief Parse credentials files and catalogs
30 class CredentialFileReader
33 /** Callback invoked for each entry found in the file.
34 * Return \c false to abort parsing.
36 typedef function<bool(AuthData_Ptr &)> ProcessCredentials;
38 CredentialFileReader( const Pathname & crfile_r, const ProcessCredentials & callback_r );
39 ~CredentialFileReader();
41 ProcessCredentials _callback;
43 //////////////////////////////////////////////////////////////////////
46 ///////////////////////////////////////////////////////////////////
48 ///////////////////////////////////////////////////////////////////
50 #endif /* ZYPP_MEDIA_CREDENTIALFILEREADER_H */