mobile/android/base/sync/delegates/NodeAssignmentCallback.java

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 package org.mozilla.gecko.sync.delegates;
michael@0 6
michael@0 7 import java.net.URI;
michael@0 8
michael@0 9 import org.mozilla.gecko.sync.GlobalSession;
michael@0 10
michael@0 11 public interface NodeAssignmentCallback {
michael@0 12 /**
michael@0 13 * If true, request node assignment from the server, i.e., fetch node/weave cluster URL.
michael@0 14 */
michael@0 15 public boolean wantNodeAssignment();
michael@0 16
michael@0 17 /**
michael@0 18 * Called when a new node is assigned. If there already was an old node, the
michael@0 19 * new node is different from the old node assignment, indicating node
michael@0 20 * reassignment. If there wasn't an old node, we've been freshly assigned.
michael@0 21 *
michael@0 22 * @param globalSession
michael@0 23 * @param oldClusterURL
michael@0 24 * The old node/weave cluster URL (possibly null).
michael@0 25 * @param newClusterURL
michael@0 26 * The new node/weave cluster URL (not null).
michael@0 27 */
michael@0 28 public void informNodeAssigned(GlobalSession globalSession, URI oldClusterURL, URI newClusterURL);
michael@0 29
michael@0 30 /**
michael@0 31 * Called when wantNodeAssignment() is true, and the new node assignment is
michael@0 32 * the same as the old node assignment, indicating a user authentication
michael@0 33 * error.
michael@0 34 *
michael@0 35 * @param globalSession
michael@0 36 * @param failedClusterURL
michael@0 37 * The new node/weave cluster URL.
michael@0 38 */
michael@0 39 public void informNodeAuthenticationFailed(GlobalSession globalSession, URI failedClusterURL);
michael@0 40
michael@0 41 public String nodeWeaveURL();
michael@0 42 }

mercurial