diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java deleted file mode 100644 index de0597da7..000000000 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/DownloadStatus.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.equinox.internal.p2.repository; - -import org.eclipse.core.runtime.Status; - -/** - * A status object that optionally reports additional information about the - * result of a download. - */ -public class DownloadStatus extends Status { - public static final long UNKNOWN_RATE = -1; - public static final long UNKNOWN_SIZE = -1; - - private long speed = UNKNOWN_RATE; - private long fileSize = UNKNOWN_SIZE; - private long lastModified = 0; - - /** - * Constructs a new DownloadStatus with the given attributes. - */ - public DownloadStatus(int severity, String pluginId, String message) { - super(severity, pluginId, message); - } - - /** - * Constructs a new DownloadStatus with the given attributes. - */ - public DownloadStatus(int severity, String pluginId, String message, Throwable exception) { - super(severity, pluginId, message, exception); - } - - public DownloadStatus(int severity, String pluginId, int code, String message, Throwable exception) { - super(severity, pluginId, code, message, exception); - } - - /** - * Returns the download rate in bytes per second. If the rate is unknown, - * @{link {@link #UNKNOWN_RATE}} is returned. - * @return the download rate in bytes per second - */ - public long getTransferRate() { - return speed; - } - - /** - * Sets the download rate of the transfer in bytes per second. - * @param rate The download rate in bytes per second - */ - public void setTransferRate(long rate) { - this.speed = rate; - } - - public void setFileSize(long aFileSize) { - fileSize = aFileSize; - } - - public long getFileSize() { - return fileSize; - } - - public void setLastModified(long timestamp) { - lastModified = timestamp; - } - - public long getLastModified() { - return lastModified; - } -} |