]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- removed deprecated functions
authorArvin Schnell <aschnell@suse.de>
Mon, 16 Feb 2015 10:51:41 +0000 (11:51 +0100)
committerArvin Schnell <aschnell@suse.de>
Mon, 16 Feb 2015 10:51:41 +0000 (11:51 +0100)
snapper/Snapper.cc
snapper/Snapper.h
snapper/Snapshot.cc
snapper/Snapshot.h

index e132bdb761e4e936a433a7791860c4e07623502a..25858e7ddc29ba51c6848a521f2149dbdba46303 100644 (file)
@@ -114,8 +114,6 @@ namespace snapper
 
        for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); ++it)
        {
-           it->flushInfo();
-
            try
            {
                it->handleUmountFilesystemSnapshot();
@@ -183,27 +181,6 @@ namespace snapper
     }
 
 
-    Snapshots::iterator
-    Snapper::createSingleSnapshot(string description)
-    {
-       return snapshots.createSingleSnapshot(0, description, "", map<string, string>());
-    }
-
-
-    Snapshots::iterator
-    Snapper::createPreSnapshot(string description)
-    {
-       return snapshots.createPreSnapshot(0, description, "", map<string, string>());
-    }
-
-
-    Snapshots::iterator
-    Snapper::createPostSnapshot(string description, Snapshots::const_iterator pre)
-    {
-       return snapshots.createPostSnapshot(pre, 0, description, "", map<string, string>());
-    }
-
-
     Snapshots::iterator
     Snapper::createSingleSnapshot(uid_t uid, const string& description, const string& cleanup,
                                  const map<string, string>& userdata)
index e7d9f2c289c534acb3b8bd714f784fbe686ba09d..c05640c3d3fa2cc1384bbccc94aabcf3618e47a7 100644 (file)
@@ -125,9 +125,6 @@ namespace snapper
 
        Snapshots::const_iterator getSnapshotCurrent() const;
 
-       Snapshots::iterator createSingleSnapshot(string description) __attribute__ ((deprecated));
-       Snapshots::iterator createPreSnapshot(string description) __attribute__ ((deprecated));
-       Snapshots::iterator createPostSnapshot(string description, Snapshots::const_iterator pre) __attribute__ ((deprecated));
 
        Snapshots::iterator createSingleSnapshot(uid_t uid, const string& description,
                                                 const string& cleanup,
index aead9cb4171f57d6a6b869b79838b2a89481ee9e..52d93dea47d5f2c262aa4730a59cfe838e2456da 100644 (file)
@@ -75,8 +75,7 @@ namespace snapper
 
     Snapshot::Snapshot(const Snapper* snapper, SnapshotType type, unsigned int num, time_t date)
        : snapper(snapper), type(type), num(num), date(date), uid(0), pre_num(0),
-         info_modified(false), mount_checked(false), mount_user_request(false),
-         mount_use_count(0)
+         mount_checked(false), mount_user_request(false), mount_use_count(0)
     {
     }
 
@@ -132,59 +131,6 @@ namespace snapper
     }
 
 
-    void
-    Snapshot::setUid(uid_t val)
-    {
-       if (isCurrent())
-           throw IllegalSnapshotException();
-
-       uid = val;
-       info_modified = true;
-    }
-
-
-    void
-    Snapshot::setDescription(const string& val)
-    {
-       if (isCurrent())
-           throw IllegalSnapshotException();
-
-       description = val;
-       info_modified = true;
-    }
-
-
-    void
-    Snapshot::setCleanup(const string& val)
-    {
-       if (isCurrent())
-           throw IllegalSnapshotException();
-
-       cleanup = val;
-       info_modified = true;
-    }
-
-
-    void
-    Snapshot::setUserdata(const map<string, string>& val)
-    {
-       if (isCurrent())
-           throw IllegalSnapshotException();
-
-       for (map<string, string>::const_iterator it = val.begin(); it != val.end(); ++it)
-       {
-           if (it->first.empty() || it->first.find_first_of(",=") != string::npos)
-               throw InvalidUserdataException();
-
-           if (it->second.find_first_of(",=") != string::npos)
-               throw InvalidUserdataException();
-       }
-
-       userdata = val;
-       info_modified = true;
-    }
-
-
     void
     Snapshots::read()
     {
@@ -452,17 +398,6 @@ namespace snapper
     }
 
 
-    void
-    Snapshot::flushInfo()
-    {
-       if (!info_modified)
-           return;
-
-       writeInfo();
-       info_modified = false;
-    }
-
-
     void
     Snapshot::writeInfo() const
     {
@@ -595,27 +530,6 @@ namespace snapper
     }
 
 
-    Snapshots::iterator
-    Snapshots::createSingleSnapshot(string description)
-    {
-       return createSingleSnapshot(0, description, "", map<string, string>());
-    }
-
-
-    Snapshots::iterator
-    Snapshots::createPreSnapshot(string description)
-    {
-       return createPreSnapshot(0, description, "", map<string, string>());
-    }
-
-
-    Snapshots::iterator
-    Snapshots::createPostSnapshot(string description, Snapshots::const_iterator pre)
-    {
-       return createPostSnapshot(pre, 0, description, "", map<string, string>());
-    }
-
-
     Snapshots::iterator
     Snapshots::createSingleSnapshot(uid_t uid, const string& description, const string& cleanup,
                                    const map<string, string>& userdata)
index b389057276f9bc0241ef13ee18b503a4efe2b65d..c942d5f3b36d651966c33d3210880d25e8370ea8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2011-2014] Novell, Inc.
+ * Copyright (c) [2011-2015] Novell, Inc.
  *
  * All Rights Reserved.
  *
@@ -94,21 +94,16 @@ namespace snapper
 
        time_t getDate() const { return date; }
 
-       void setUid(uid_t uid) __attribute__ ((deprecated));
        uid_t getUid() const { return uid; }
 
        unsigned int getPreNum() const { return pre_num; }
 
-       void setDescription(const string& description) __attribute__ ((deprecated));
        string getDescription() const { return description; }
 
-       void setCleanup(const string& cleanup) __attribute__ ((deprecated));
        string getCleanup() const { return cleanup; }
 
-       void setUserdata(const map<string, string>& userdata) __attribute__ ((deprecated));
        map<string, string> getUserdata() const { return userdata; }
 
-       void flushInfo() __attribute__ ((deprecated));
 
        string snapshotDir() const;
 
@@ -143,8 +138,6 @@ namespace snapper
 
        map<string, string> userdata;
 
-       bool info_modified;
-
        mutable bool mount_checked;
        mutable bool mount_user_request;
        mutable unsigned int mount_use_count;
@@ -205,10 +198,6 @@ namespace snapper
 
        void checkUserdata(const map<string, string>& userdata) const;
 
-       iterator createSingleSnapshot(string description) __attribute__ ((deprecated));
-       iterator createPreSnapshot(string description) __attribute__ ((deprecated));
-       iterator createPostSnapshot(string description, const_iterator pre) __attribute__ ((deprecated));
-
        iterator createSingleSnapshot(uid_t uid, const string& description, const string& cleanup,
                                      const map<string, string>& userdata);
        iterator createSingleSnapshot(const_iterator parent, bool read_only, uid_t uid,