mobile/android/base/sync/setup/Constants.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.setup;
michael@0 6
michael@0 7 import android.content.Intent;
michael@0 8
michael@0 9 public class Constants {
michael@0 10 // Constants for Firefox Sync SyncAdapter Accounts.
michael@0 11 public static final String OPTION_SYNCKEY = "option.synckey";
michael@0 12 public static final String OPTION_USERNAME = "option.username";
michael@0 13 public static final String AUTHTOKEN_TYPE_PLAIN = "auth.plain";
michael@0 14 public static final String OPTION_SERVER = "option.serverUrl";
michael@0 15 public static final String DATA_ENABLE_ON_UPGRADE = "data.enableOnUpgrade";
michael@0 16
michael@0 17 public static final String DEFAULT_PROFILE = "default";
michael@0 18
michael@0 19 /**
michael@0 20 * Name of file to pickle current account preferences to each sync.
michael@0 21 * <p>
michael@0 22 * Must not contain path separators!
michael@0 23 */
michael@0 24 public static final String ACCOUNT_PICKLE_FILENAME = "sync.account.json";
michael@0 25
michael@0 26 /**
michael@0 27 * Key in sync extras bundle specifying stages to sync this sync session.
michael@0 28 * <p>
michael@0 29 * Corresponding value should be a String JSON-encoding an object, the keys of
michael@0 30 * which are the stage names to sync. For example:
michael@0 31 * <code>"{ \"stageToSync\": 0 }"</code>.
michael@0 32 */
michael@0 33 public static final String EXTRAS_KEY_STAGES_TO_SYNC = "sync";
michael@0 34
michael@0 35 /**
michael@0 36 * Key in sync extras bundle specifying stages to skip this sync session.
michael@0 37 * <p>
michael@0 38 * Corresponding value should be a String JSON-encoding an object, the keys of
michael@0 39 * which are the stage names to skip. For example:
michael@0 40 * <code>"{ \"stageToSkip\": 0 }"</code>.
michael@0 41 */
michael@0 42 public static final String EXTRAS_KEY_STAGES_TO_SKIP = "skip";
michael@0 43
michael@0 44 // Constants for Activities.
michael@0 45 public static final String INTENT_EXTRA_IS_SETUP = "isSetup";
michael@0 46 public static final String INTENT_EXTRA_IS_PAIR = "isPair";
michael@0 47 public static final String INTENT_EXTRA_IS_ACCOUNTERROR = "isAccountError";
michael@0 48
michael@0 49 public static final int FLAG_ACTIVITY_REORDER_TO_FRONT_NO_ANIMATION =
michael@0 50 Intent.FLAG_ACTIVITY_REORDER_TO_FRONT |
michael@0 51 Intent.FLAG_ACTIVITY_NO_ANIMATION;
michael@0 52
michael@0 53 // Constants for Account Authentication.
michael@0 54 public static final String AUTH_SERVER_VERSION = "1.1/";
michael@0 55 public static final String AUTH_SERVER_SUFFIX = "info/collections/";
michael@0 56
michael@0 57 // Account Authentication Errors.
michael@0 58 public static final String AUTH_ERROR_NOUSER = "auth.error.badcredentials";
michael@0 59
michael@0 60 // Links for J-PAKE setup help pages.
michael@0 61 public static final String LINK_FIND_CODE = "https://support.mozilla.org/kb/find-code-to-add-device-to-firefox-sync";
michael@0 62 public static final String LINK_FIND_ADD_DEVICE = "https://support.mozilla.org/kb/add-a-device-to-firefox-sync";
michael@0 63
michael@0 64 // Constants for JSON payload.
michael@0 65 public static final String JSON_KEY_PAYLOAD = "payload";
michael@0 66 public static final String JSON_KEY_CIPHERTEXT = "ciphertext";
michael@0 67 public static final String JSON_KEY_HMAC = "hmac";
michael@0 68 public static final String JSON_KEY_IV = "IV";
michael@0 69 public static final String JSON_KEY_TYPE = "type";
michael@0 70 public static final String JSON_KEY_VERSION = "version";
michael@0 71 public static final String JSON_KEY_ETAG = "etag";
michael@0 72
michael@0 73 public static final String JSON_KEY_ACCOUNT = "account";
michael@0 74 public static final String JSON_KEY_PASSWORD = "password";
michael@0 75 public static final String JSON_KEY_SYNCKEY = "synckey";
michael@0 76 public static final String JSON_KEY_SERVER = "serverURL";
michael@0 77 public static final String JSON_KEY_CLUSTER = "clusterURL";
michael@0 78 public static final String JSON_KEY_CLIENT_NAME = "clientName";
michael@0 79 public static final String JSON_KEY_CLIENT_GUID = "clientGUID";
michael@0 80 public static final String JSON_KEY_SYNC_AUTOMATICALLY = "syncAutomatically";
michael@0 81 public static final String JSON_KEY_TIMESTAMP = "timestamp";
michael@0 82
michael@0 83 public static final String CRYPTO_KEY_GR1 = "gr1";
michael@0 84 public static final String CRYPTO_KEY_GR2 = "gr2";
michael@0 85
michael@0 86 public static final String ZKP_KEY_GX1 = "gx1";
michael@0 87 public static final String ZKP_KEY_GX2 = "gx2";
michael@0 88
michael@0 89 public static final String ZKP_KEY_ZKP_X1 = "zkp_x1";
michael@0 90 public static final String ZKP_KEY_ZKP_X2 = "zkp_x2";
michael@0 91 public static final String ZKP_KEY_B = "b";
michael@0 92 public static final String ZKP_KEY_GR = "gr";
michael@0 93 public static final String ZKP_KEY_ID = "id";
michael@0 94
michael@0 95 public static final String ZKP_KEY_A = "A";
michael@0 96 public static final String ZKP_KEY_ZKP_A = "zkp_A";
michael@0 97
michael@0 98 // J-PAKE errors.
michael@0 99 public static final String JPAKE_ERROR_CHANNEL = "jpake.error.channel";
michael@0 100 public static final String JPAKE_ERROR_NETWORK = "jpake.error.network";
michael@0 101 public static final String JPAKE_ERROR_SERVER = "jpake.error.server";
michael@0 102 public static final String JPAKE_ERROR_TIMEOUT = "jpake.error.timeout";
michael@0 103 public static final String JPAKE_ERROR_INTERNAL = "jpake.error.internal";
michael@0 104 public static final String JPAKE_ERROR_INVALID = "jpake.error.invalid";
michael@0 105 public static final String JPAKE_ERROR_NODATA = "jpake.error.nodata";
michael@0 106 public static final String JPAKE_ERROR_KEYMISMATCH = "jpake.error.keymismatch";
michael@0 107 public static final String JPAKE_ERROR_WRONGMESSAGE = "jpake.error.wrongmessage";
michael@0 108 public static final String JPAKE_ERROR_USERABORT = "jpake.error.userabort";
michael@0 109 public static final String JPAKE_ERROR_DELAYUNSUPPORTED = "jpake.error.delayunsupported";
michael@0 110 }

mercurial