]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- move more functions to snapper namespace 950/head
authorArvin Schnell <aschnell@suse.de>
Mon, 4 Nov 2024 15:20:56 +0000 (16:20 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 4 Nov 2024 15:20:56 +0000 (16:20 +0100)
14 files changed:
client/cleanup.cc
client/cleanup.h
client/misc.cc
client/misc.h
client/proxy/commands.cc
client/proxy/commands.h
client/proxy/proxy-dbus.cc
client/proxy/proxy-dbus.h
client/proxy/proxy-lib.cc
client/proxy/proxy-lib.h
client/proxy/proxy.cc
client/proxy/proxy.h
client/proxy/types.h
zypp-plugin/snapper-zypp-plugin.cc

index 33151fd11655ebe7961443dfa2147245a8ef02db..ded455c42643a7e8cf2ab87caf0c7a9e1f1e776b 100644 (file)
@@ -37,6 +37,9 @@
 #include "cleanup.h"
 
 
+namespace snapper
+{
+
 using namespace std;
 
 
@@ -887,3 +890,5 @@ do_cleanup_empty_pre_post(ProxySnapper* snapper, bool verbose, std::function<boo
     EmptyPrePostCleaner cleaner(snapper, verbose, parameters);
     cleaner.cleanup(condition, report);
 }
+
+}
index 764d85159c4bc6fb26cd41ce71ac6060db001a9c..dd99d6882173115a715da40a80a4516cf66a27f4 100644 (file)
@@ -26,6 +26,9 @@
 #include "proxy/proxy.h"
 
 
+namespace snapper
+{
+
 /*
  * The following three functions do the cleanup based on the conditionals defined in the
  * config, that are hard limit, quota and free space.
@@ -57,3 +60,5 @@ do_cleanup_timeline(ProxySnapper* snapper, bool verbose, std::function<bool()> c
 void
 do_cleanup_empty_pre_post(ProxySnapper* snapper, bool verbose, std::function<bool()> condition,
                          Plugins::Report& report);
+
+}
index 0dfd222a72f053620f305af99af9f50eb34a19fd..73b33b5362f6c1a5e66095cc0472ff9beea4cade 100644 (file)
@@ -36,6 +36,9 @@
 #include "misc.h"
 
 
+namespace snapper
+{
+
 unsigned int
 read_num(const string& str)
 {
@@ -213,3 +216,5 @@ Differ::run(const string& f1, const string& f2) const
     for (const string& line : cmd.get_stderr())
        cerr << line << endl;
 }
+
+}
index a87d7603345223165e48eb2078c775d878b9c141..5a62deb89b830842d7b64f9fe81c652b0f24ad7b 100644 (file)
@@ -33,9 +33,8 @@
 #include "proxy/proxy.h"
 
 
-using namespace snapper;
-using namespace std;
-
+namespace snapper
+{
 
 unsigned int
 read_num(const string& str);
@@ -67,9 +66,6 @@ struct Differ
 };
 
 
-namespace snapper
-{
-
     /**
      * Return a string listing the possible enum values. E.g. "Use auto, classic or
      * transactional." for possible_enum_values<Ambit>().
index 3aece4aca138c76daf0e3cd555c6e41e591d77c8..4fbe863ec773bc44b31fe80813762130f07c5e7d 100644 (file)
 #include "dbus/DBusPipe.h"
 #include "snapper/AppUtil.h"
 
-using namespace std;
-
 
 #define SERVICE "org.opensuse.Snapper"
 #define OBJECT "/org/opensuse/Snapper"
 #define INTERFACE "org.opensuse.Snapper"
 
 
+namespace snapper
+{
+
+using namespace std;
+
+
 vector<XConfigInfo>
 command_list_xconfigs(DBus::Connection& conn)
 {
@@ -744,3 +748,5 @@ command_debug(DBus::Connection& conn)
 
     return lines;
 }
+
+}
index f5139be74f260d3d0cada804ecebb25cde814e0d..7c7a63a6487e86c75822b14643bc3f5221aa3440 100644 (file)
  */
 
 
-#include <string>
-#include <vector>
-#include <map>
-
-using std::string;
-using std::vector;
-using std::map;
-
 #include "types.h"
 
 
+namespace snapper
+{
+
 vector<XConfigInfo>
 command_list_xconfigs(DBus::Connection& conn);
 
@@ -163,3 +158,5 @@ command_get_plugins_report(DBus::Connection& conn);
 
 vector<string>
 command_debug(DBus::Connection& conn);
+
+}
index 2722f78d269ff43f972a0f853021fd671ee27c65..6c3a9186a7485d0b87ce75c6a63229752ac07962 100644 (file)
@@ -25,6 +25,9 @@
 #include "../utils/text.h"
 
 
+namespace snapper
+{
+
 using namespace std;
 
 
@@ -487,3 +490,5 @@ ProxySnappers::createDbus()
 {
     return ProxySnappers(new ProxySnappersDbus());
 }
+
+}
index 205fc92c726a125aabdc398499e06dfb0d3f9f53..1b0cd8a36e9c6aedb629f2fe3bf0bfb25395d172 100644 (file)
@@ -30,6 +30,9 @@
 #include "proxy.h"
 
 
+namespace snapper
+{
+
 class ProxySnapshotDbus;
 class ProxySnapshotsDbus;
 class ProxySnapperDbus;
@@ -229,5 +232,7 @@ private:
 
 };
 
+}
+
 
 #endif
index cb8f973f33385ab5e245c2bed4ce8fe14895ae04..6b8b42cc16bc761b08fe0c9fe8afb132c810689a 100644 (file)
@@ -23,6 +23,9 @@
 #include "proxy-lib.h"
 
 
+namespace snapper
+{
+
 using namespace std;
 
 
@@ -228,3 +231,5 @@ to_lib(const ProxySnapshot& proxy_snapshot)
 {
     return dynamic_cast<const ProxySnapshotLib&>(proxy_snapshot.get_impl());
 }
+
+}
index e17fd84fbb0b0105a6cd7342b4df2b1c09eec265..6fe7c1f6ae4a5ab10d9740f26c4a22c486366f57 100644 (file)
@@ -30,6 +30,9 @@
 #include <snapper/Comparison.h>
 
 
+namespace snapper
+{
+
 class ProxySnapshotLib : public ProxySnapshot::Impl
 {
 
@@ -203,5 +206,6 @@ private:
 const ProxySnapshotLib&
 to_lib(const ProxySnapshot& proxy_snapshot);
 
+}
 
 #endif
index 08a6a5e62d9a36996cc91516ee8d8bfde1ac3f94..de1213e951702ad24130406e369ef44beb6059ff 100644 (file)
@@ -31,6 +31,9 @@
 #include "proxy.h"
 
 
+namespace snapper
+{
+
 using namespace std;
 
 
@@ -207,3 +210,5 @@ ProxySnapshots::findPost(const_iterator pre) const
 
     return end();
 }
+
+}
index 1b070f1e77578bacec1d7dfc41b4179d71dd8b16..3f24358f8d7e22faf1a4de931298d43e6fca96d6 100644 (file)
@@ -34,8 +34,8 @@
 #include <snapper/File.h>
 
 
-using namespace snapper;
-
+namespace snapper
+{
 
 /**
  * The proxy classes here allow clients, so far only the snapper command line
@@ -360,5 +360,7 @@ private:
 
 };
 
+}
+
 
 #endif
index 585f57b281b85f7da30d358354ea38ba5d75cbc6..dad283beca3a11611e439c1884e5bca14691b971 100644 (file)
 #include <vector>
 #include <map>
 
-using std::string;
-using std::vector;
-using std::map;
-
 #include "dbus/DBusMessage.h"
 #include "dbus/DBusConnection.h"
 #include "snapper/Snapshot.h"
@@ -36,7 +32,13 @@ using std::map;
 #include "snapper/SnapperTmpl.h"
 #include "snapper/Snapper.h"
 
-using namespace snapper;
+
+namespace snapper
+{
+
+using std::string;
+using std::vector;
+using std::map;
 
 
 struct XConfigInfo
@@ -102,6 +104,8 @@ struct XReport
     int exit_status;
 };
 
+}
+
 
 namespace DBus
 {
index 2909a301b4f6a31c462462a157c0f9d80bf27746..230548a78e12df14ed6c36db37ffb5683ec11882 100644 (file)
@@ -31,7 +31,7 @@
 #include <boost/algorithm/string.hpp>
 
 #include <json.h>
-// a collision with client/errors.h
+// a collision with client/proxy/errors.h
 #ifdef error_description
 #undef error_description
 #endif