From: Arvin Schnell Date: Mon, 16 Feb 2015 10:51:41 +0000 (+0100) Subject: - removed deprecated functions X-Git-Tag: v0.2.6~1^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=942332f5a9eff01096e86767bee8fc957686158c;p=thirdparty%2Fsnapper.git - removed deprecated functions --- diff --git a/snapper/Snapper.cc b/snapper/Snapper.cc index e132bdb7..25858e7d 100644 --- a/snapper/Snapper.cc +++ b/snapper/Snapper.cc @@ -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()); - } - - - Snapshots::iterator - Snapper::createPreSnapshot(string description) - { - return snapshots.createPreSnapshot(0, description, "", map()); - } - - - Snapshots::iterator - Snapper::createPostSnapshot(string description, Snapshots::const_iterator pre) - { - return snapshots.createPostSnapshot(pre, 0, description, "", map()); - } - - Snapshots::iterator Snapper::createSingleSnapshot(uid_t uid, const string& description, const string& cleanup, const map& userdata) diff --git a/snapper/Snapper.h b/snapper/Snapper.h index e7d9f2c2..c05640c3 100644 --- a/snapper/Snapper.h +++ b/snapper/Snapper.h @@ -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, diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index aead9cb4..52d93dea 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -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& val) - { - if (isCurrent()) - throw IllegalSnapshotException(); - - for (map::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()); - } - - - Snapshots::iterator - Snapshots::createPreSnapshot(string description) - { - return createPreSnapshot(0, description, "", map()); - } - - - Snapshots::iterator - Snapshots::createPostSnapshot(string description, Snapshots::const_iterator pre) - { - return createPostSnapshot(pre, 0, description, "", map()); - } - - Snapshots::iterator Snapshots::createSingleSnapshot(uid_t uid, const string& description, const string& cleanup, const map& userdata) diff --git a/snapper/Snapshot.h b/snapper/Snapshot.h index b3890572..c942d5f3 100644 --- a/snapper/Snapshot.h +++ b/snapper/Snapshot.h @@ -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& userdata) __attribute__ ((deprecated)); map getUserdata() const { return userdata; } - void flushInfo() __attribute__ ((deprecated)); string snapshotDir() const; @@ -143,8 +138,6 @@ namespace snapper map 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& 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& userdata); iterator createSingleSnapshot(const_iterator parent, bool read_only, uid_t uid,