Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 package org.mozilla.gecko.background.healthreport.upload;
7 import java.util.Collection;
9 public interface SubmissionClient {
10 public interface Delegate {
11 /**
12 * Called in the event of a temporary failure; we should try again soon.
13 *
14 * @param localTime milliseconds since the epoch.
15 * @param id if known; may be null.
16 * @param reason for failure.
17 * @param e if there was an exception; may be null.
18 */
19 public void onSoftFailure(long localTime, String id, String reason, Exception e);
21 /**
22 * Called in the event of a failure; we should try again, but not today.
23 *
24 * @param localTime milliseconds since the epoch.
25 * @param id if known; may be null.
26 * @param reason for failure.
27 * @param e if there was an exception; may be null.
28 */
29 public void onHardFailure(long localTime, String id, String reason, Exception e);
31 /**
32 * Success!
33 *
34 * @param localTime milliseconds since the epoch.
35 * @param id is always known; not null.
36 */
37 public void onSuccess(long localTime, String id);
38 }
40 public void upload(long localTime, String id, Collection<String> oldIds, Delegate delegate);
41 public void delete(long localTime, String id, Delegate delegate);
42 }