LCOV - code coverage report
Current view: top level - include/esys/repo/progress - repofailedevent.h (source / functions) Hit Total Coverage
Test: esysrepo_coverage.info Lines: 1 1 100.0 %
Date: 2026-08-01 10:43:40 Functions: 0 0 -

          Line data    Source code
       1             : /*!
       2             :  * \file esys/repo/progress/repofailedevent.h
       3             :  * \brief Event: repository failed
       4             :  *
       5             :  * \cond
       6             :  * __legal_b__
       7             :  *
       8             :  * Copyright (c) 2026 Michel Gillet
       9             :  * Distributed under the MIT License.
      10             :  * (See accompanying file LICENSE.txt or
      11             :  * copy at https://opensource.org/licenses/MIT)
      12             :  *
      13             :  * __legal_e__
      14             :  * \endcond
      15             :  *
      16             :  */
      17             : 
      18             : #pragma once
      19             : 
      20             : #include "esys/repo/esysrepo_defs.h"
      21             : 
      22             : #include <cstddef>
      23             : #include <string>
      24             : 
      25             : namespace esys::repo::progress
      26             : {
      27             : 
      28             : /*! \class RepoFailedEvent esys/repo/progress/repofailedevent.h
      29             :  * "esys/repo/progress/repofailedevent.h"
      30             :  * \brief Emitted when a repository operation fails
      31             :  */
      32           9 : class ESYSREPO_API RepoFailedEvent
      33             : {
      34             : public:
      35             :     //! Default constructor
      36             :     RepoFailedEvent();
      37             : 
      38             :     //! Constructor
      39             :     /*!
      40             :      * \param[in] repo_index index in the manifest/queue
      41             :      * \param[in] error error message
      42             :      */
      43             :     RepoFailedEvent(std::size_t repo_index, const std::string &error);
      44             : 
      45             :     //! Destructor
      46             :     ~RepoFailedEvent();
      47             : 
      48             :     void set_repo_index(std::size_t repo_index);
      49             :     std::size_t get_repo_index() const;
      50             : 
      51             :     void set_error(const std::string &error);
      52             :     const std::string &get_error() const;
      53             : 
      54             :     bool operator==(const RepoFailedEvent &other) const;
      55             :     bool operator!=(const RepoFailedEvent &other) const;
      56             : 
      57             : private:
      58             :     //!< \cond DOXY_IMPL
      59             :     std::size_t m_repo_index = 0;
      60             :     std::string m_error;
      61             :     //!< \endcond
      62             : };
      63             : 
      64             : } // namespace esys::repo::progress

Generated by: LCOV version 1.14