2017-11-06 16:17:11 +00:00
|
|
|
// (C) Copyright 2015 Martin Dougiamas
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Static class to contain all the core constants.
|
|
|
|
*/
|
|
|
|
export class CoreConstants {
|
|
|
|
public static secondsYear = 31536000;
|
2018-01-11 12:18:17 +00:00
|
|
|
public static secondsWeek = 604800;
|
2017-11-06 16:17:11 +00:00
|
|
|
public static secondsDay = 86400;
|
|
|
|
public static secondsHour = 3600;
|
|
|
|
public static secondsMinute = 60;
|
|
|
|
public static wifiDownloadThreshold = 104857600; // 100MB.
|
|
|
|
public static downloadThreshold = 10485760; // 10MB.
|
|
|
|
public static dontShowError = 'CoreDontShowError';
|
2017-11-21 15:35:41 +00:00
|
|
|
public static noSiteId = 'NoSite';
|
2017-11-14 14:43:03 +00:00
|
|
|
|
|
|
|
// Settings constants.
|
2017-11-06 16:17:11 +00:00
|
|
|
public static settingsRichTextEditor = 'CoreSettingsRichTextEditor';
|
2017-11-14 14:43:03 +00:00
|
|
|
public static settingsNotificationSound = 'CoreSettingsNotificationSound';
|
2017-11-15 13:51:18 +00:00
|
|
|
public static settingsSyncOnlyOnWifi = 'mmCoreSyncOnlyOnWifi';
|
2017-11-14 07:58:20 +00:00
|
|
|
|
|
|
|
// WS constants.
|
2017-11-09 12:00:08 +00:00
|
|
|
public static wsTimeout = 30000;
|
2017-11-13 12:35:44 +00:00
|
|
|
public static wsPrefix = 'local_mobile_';
|
2017-11-14 07:58:20 +00:00
|
|
|
|
|
|
|
// Login constants.
|
|
|
|
public static loginSSOCode = 2; // SSO in browser window is required.
|
|
|
|
public static loginSSOInAppCode = 3; // SSO in embedded browser is required.
|
|
|
|
public static loginLaunchData = 'mmLoginLaunchData';
|
2017-11-20 15:19:21 +00:00
|
|
|
|
|
|
|
// Download status constants.
|
|
|
|
public static downloaded = 'downloaded';
|
|
|
|
public static downloading = 'downloading';
|
|
|
|
public static notDownloaded = 'notdownloaded';
|
|
|
|
public static outdated = 'outdated';
|
|
|
|
public static notDownloadable = 'notdownloadable';
|
2017-11-06 16:17:11 +00:00
|
|
|
}
|