Imported Upstream version 15.0.0
[platform/upstream/libzypp.git] / zypp / media / CredentialFileReader.h
index f9a3574..fba8e60 100644 (file)
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
-{
+{ /////////////////////////////////////////////////////////////////
   ///////////////////////////////////////////////////////////////////
   namespace media
+  { /////////////////////////////////////////////////////////////////
+
+
+  //////////////////////////////////////////////////////////////////////
+  //
+  // CLASS NAME : CredentialFileReader 
+  //
+  class CredentialFileReader
   {
-    //////////////////////////////////////////////////////////////////////
-    /// \class CredentialFileReader
-    /// \brief Parse credentials files and catalogs
-    class CredentialFileReader
-    {
-    public:
-      /** Callback invoked for each entry found in the file.
-       * Return \c false to abort parsing.
-       */
-      typedef function<bool(AuthData_Ptr &)> ProcessCredentials;
-
-      CredentialFileReader( const Pathname & crfile_r, const ProcessCredentials & callback_r );
-      ~CredentialFileReader();
-    private:
-      ProcessCredentials _callback;
-    };
-    //////////////////////////////////////////////////////////////////////
-
-  } // namespace media
+  public:
+    /**
+      * Callback definition.
+      * First parameter is the \ref Url with which the credentials are
+      * associated, the second are the credentials.
+      *
+      * Return false from the callback to get a \ref AbortRequestException
+      * to be thrown and the processing to be cancelled.
+      */
+    typedef function<bool(AuthData_Ptr &)> ProcessCredentials;
+
+    CredentialFileReader(const Pathname & crfile,
+                         const ProcessCredentials & callback);
+    ~CredentialFileReader();
+  private:
+    ProcessCredentials _callback;
+  };
+  //////////////////////////////////////////////////////////////////////
+
+
+    /////////////////////////////////////////////////////////////////
+  } // media
   ///////////////////////////////////////////////////////////////////
-} // namespace zypp
+  /////////////////////////////////////////////////////////////////
+} // zypp
 ///////////////////////////////////////////////////////////////////
 
 #endif /* ZYPP_MEDIA_CREDENTIALFILEREADER_H */