1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2 // -*- Mode: C++ -*-
3 //
4 // Copyright (C) 2013-2020 Red Hat, Inc.
5 
6 /// @file
7 
8 #ifndef __ABG_CONFIG_H__
9 #define __ABG_CONFIG_H__
10 
11 #include <string>
12 
13 namespace abigail
14 {
15 
16 /// This type abstracts the configuration information of the library.
17 class config
18 {
19   std::string	m_format_minor;
20   std::string	m_format_major;
21   unsigned	m_xml_element_indent;
22   std::string	m_tu_instr_suffix;
23   std::string	m_tu_instr_archive_suffix;
24 
25 public:
26   config();
27 
28   const std::string&
29   get_format_minor_version_number() const;
30 
31   void
32   set_format_minor_version_number(const std::string& v);
33 
34   const std::string&
35   get_format_major_version_number() const;
36 
37   void
38   set_format_major_version_number(const std::string& v);
39 
40   unsigned
41   get_xml_element_indent() const;
42 
43   void
44   set_xml_element_indent(unsigned);
45 
46   const std::string&
47   get_tu_instr_suffix() const;
48 
49   void
50   set_tu_instr_suffix(const std::string&);
51 
52   const std::string&
53   get_tu_instr_archive_suffix() const;
54 
55   void
56   set_tu_instr_archive_suffix(const std::string&);
57 };
58 
59 extern "C"
60 {
61   /// Return the relevant version numbers of the library.
62   ///
63   /// \param maj the major version number of the library.
64   ///
65   /// \param min the minor version number of the library.
66   ///
67   /// \param rev the revision version number of the library.
68   ///
69   /// \param suf the version suffix of the library.
70   void
71   abigail_get_library_version(std::string& maj,
72 			      std::string& min,
73 			      std::string& rev,
74 			      std::string& suf);
75 }
76 
77 }//end namespace abigail
78 
79 #endif //__ABG_CONFIG_H__
80