2012-02-27 10:23:33 -08:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-24 13:17:46 -07:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-12-21 08:44:08 -08:00
|
|
|
|
|
|
|
package org.mozilla.gecko.sync.setup;
|
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
import android.content.Intent;
|
|
|
|
|
2011-12-21 08:44:08 -08:00
|
|
|
public class Constants {
|
2012-01-14 09:20:31 -08:00
|
|
|
// Constants for Firefox Sync SyncAdapter Accounts.
|
|
|
|
public static final String ACCOUNTTYPE_SYNC = "org.mozilla.firefox_sync";
|
|
|
|
public static final String OPTION_SYNCKEY = "option.synckey";
|
|
|
|
public static final String OPTION_USERNAME = "option.username";
|
2011-12-21 08:44:08 -08:00
|
|
|
public static final String AUTHTOKEN_TYPE_PLAIN = "auth.plain";
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String OPTION_SERVER = "option.serverUrl";
|
2012-03-05 20:53:14 -08:00
|
|
|
public static final String ACCOUNT_GUID = "account.guid";
|
|
|
|
public static final String CLIENT_NAME = "account.clientName";
|
|
|
|
public static final String NUM_CLIENTS = "account.numClients";
|
2012-05-04 17:25:34 -07:00
|
|
|
public static final String DATA_ENABLE_ON_UPGRADE = "data.enableOnUpgrade";
|
2012-03-05 20:53:14 -08:00
|
|
|
|
2012-06-25 13:31:42 -07:00
|
|
|
/**
|
|
|
|
* Key in sync extras bundle specifying stages to sync this sync session.
|
|
|
|
* <p>
|
|
|
|
* Corresponding value should be a String JSON-encoding an object, the keys of
|
|
|
|
* which are the stage names to sync. For example:
|
|
|
|
* <code>"{ \"stageToSync\": 0 }"</code>.
|
|
|
|
*/
|
|
|
|
public static final String EXTRAS_KEY_STAGES_TO_SYNC = "sync";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Key in sync extras bundle specifying stages to skip this sync session.
|
|
|
|
* <p>
|
|
|
|
* Corresponding value should be a String JSON-encoding an object, the keys of
|
|
|
|
* which are the stage names to skip. For example:
|
|
|
|
* <code>"{ \"stageToSkip\": 0 }"</code>.
|
|
|
|
*/
|
|
|
|
public static final String EXTRAS_KEY_STAGES_TO_SKIP = "skip";
|
|
|
|
|
2011-12-21 08:44:08 -08:00
|
|
|
// Constants for Activities.
|
|
|
|
public static final String INTENT_EXTRA_IS_SETUP = "isSetup";
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String INTENT_EXTRA_IS_PAIR = "isPair";
|
|
|
|
|
|
|
|
public static final int FLAG_ACTIVITY_REORDER_TO_FRONT_NO_ANIMATION =
|
|
|
|
Intent.FLAG_ACTIVITY_REORDER_TO_FRONT |
|
|
|
|
Intent.FLAG_ACTIVITY_NO_ANIMATION;
|
2011-12-21 08:44:08 -08:00
|
|
|
|
2012-06-05 16:35:26 -07:00
|
|
|
// Constants for Account Authentication.
|
|
|
|
public static final String AUTH_NODE_DEFAULT = "https://auth.services.mozilla.com/";
|
|
|
|
public static final String AUTH_NODE_PATHNAME = "user/";
|
|
|
|
public static final String AUTH_NODE_VERSION = "1.0/";
|
|
|
|
public static final String AUTH_NODE_SUFFIX = "node/weave";
|
|
|
|
public static final String AUTH_SERVER_VERSION = "1.1/";
|
|
|
|
public static final String AUTH_SERVER_SUFFIX = "info/collections/";
|
|
|
|
|
|
|
|
// Account Authentication Errors.
|
|
|
|
public static final String AUTH_ERROR_NOUSER = "auth.error.badcredentials";
|
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
// Links for J-PAKE setup help pages.
|
|
|
|
public static final String LINK_FIND_CODE = "https://support.mozilla.org/kb/find-code-to-add-device-to-firefox-sync";
|
|
|
|
public static final String LINK_FIND_ADD_DEVICE = "https://support.mozilla.org/kb/add-a-device-to-firefox-sync";
|
|
|
|
|
|
|
|
// Constants for JSON payload.
|
|
|
|
public static final String JSON_KEY_PAYLOAD = "payload";
|
2011-12-21 08:44:08 -08:00
|
|
|
public static final String JSON_KEY_CIPHERTEXT = "ciphertext";
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String JSON_KEY_HMAC = "hmac";
|
|
|
|
public static final String JSON_KEY_IV = "IV";
|
|
|
|
public static final String JSON_KEY_TYPE = "type";
|
|
|
|
public static final String JSON_KEY_VERSION = "version";
|
|
|
|
public static final String JSON_KEY_ETAG = "etag";
|
2011-12-21 08:44:08 -08:00
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String JSON_KEY_ACCOUNT = "account";
|
|
|
|
public static final String JSON_KEY_PASSWORD = "password";
|
|
|
|
public static final String JSON_KEY_SYNCKEY = "synckey";
|
|
|
|
public static final String JSON_KEY_SERVER = "serverURL";
|
2011-12-21 08:44:08 -08:00
|
|
|
|
|
|
|
public static final String CRYPTO_KEY_GR1 = "gr1";
|
|
|
|
public static final String CRYPTO_KEY_GR2 = "gr2";
|
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String ZKP_KEY_GX1 = "gx1";
|
|
|
|
public static final String ZKP_KEY_GX2 = "gx2";
|
2011-12-21 08:44:08 -08:00
|
|
|
|
|
|
|
public static final String ZKP_KEY_ZKP_X1 = "zkp_x1";
|
|
|
|
public static final String ZKP_KEY_ZKP_X2 = "zkp_x2";
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String ZKP_KEY_B = "b";
|
|
|
|
public static final String ZKP_KEY_GR = "gr";
|
|
|
|
public static final String ZKP_KEY_ID = "id";
|
2011-12-21 08:44:08 -08:00
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
public static final String ZKP_KEY_A = "A";
|
|
|
|
public static final String ZKP_KEY_ZKP_A = "zkp_A";
|
2011-12-21 08:44:08 -08:00
|
|
|
|
2012-01-14 09:20:31 -08:00
|
|
|
// J-PAKE errors.
|
|
|
|
public static final String JPAKE_ERROR_CHANNEL = "jpake.error.channel";
|
|
|
|
public static final String JPAKE_ERROR_NETWORK = "jpake.error.network";
|
|
|
|
public static final String JPAKE_ERROR_SERVER = "jpake.error.server";
|
|
|
|
public static final String JPAKE_ERROR_TIMEOUT = "jpake.error.timeout";
|
|
|
|
public static final String JPAKE_ERROR_INTERNAL = "jpake.error.internal";
|
|
|
|
public static final String JPAKE_ERROR_INVALID = "jpake.error.invalid";
|
|
|
|
public static final String JPAKE_ERROR_NODATA = "jpake.error.nodata";
|
|
|
|
public static final String JPAKE_ERROR_KEYMISMATCH = "jpake.error.keymismatch";
|
|
|
|
public static final String JPAKE_ERROR_WRONGMESSAGE = "jpake.error.wrongmessage";
|
|
|
|
public static final String JPAKE_ERROR_USERABORT = "jpake.error.userabort";
|
2011-12-21 08:44:08 -08:00
|
|
|
public static final String JPAKE_ERROR_DELAYUNSUPPORTED = "jpake.error.delayunsupported";
|
|
|
|
}
|