diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-10 21:18:50 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-10-11 03:50:21 +0200 |
commit | e6a7960b8f3c838c66ef8cdaed5faf11a8d1ab26 (patch) | |
tree | 95cc2910ca9066cc1eb3ab91ea3bfed90e4c0569 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java | |
parent | fe981e54989c47ae252a4dfdc2aa41aab295cc7e (diff) | |
download | open-keychain-e6a7960b8f3c838c66ef8cdaed5faf11a8d1ab26.tar.gz open-keychain-e6a7960b8f3c838c66ef8cdaed5faf11a8d1ab26.tar.bz2 open-keychain-e6a7960b8f3c838c66ef8cdaed5faf11a8d1ab26.zip |
move delete into operation class
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java new file mode 100644 index 000000000..1dce8f89e --- /dev/null +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/DeleteResult.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2014 Dominik Schürmann <dominik@dominikschuermann.de> + * Copyright (C) 2014 Vincent Breitmoser <v.breitmoser@mugenguild.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package org.sufficientlysecure.keychain.operations.results; + +import android.os.Parcel; + +public class DeleteResult extends OperationResult { + + final public int mOk, mFail; + + public DeleteResult(int result, OperationLog log, int ok, int fail) { + super(result, log); + mOk = ok; + mFail = fail; + } + + /** Construct from a parcel - trivial because we have no extra data. */ + public DeleteResult(Parcel source) { + super(source); + mOk = source.readInt(); + mFail = source.readInt(); + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + super.writeToParcel(dest, flags); + dest.writeInt(mOk); + dest.writeInt(mFail); + } + + public static Creator<DeleteResult> CREATOR = new Creator<DeleteResult>() { + public DeleteResult createFromParcel(final Parcel source) { + return new DeleteResult(source); + } + + public DeleteResult[] newArray(final int size) { + return new DeleteResult[size]; + } + }; + +} |