/**
* Copyright© 2016, Oracle and/or its affiliates. All rights reserved.
*/
"use strict";
/**
* MCS module.
* @namespace mcs
*/
var mcs = {};
mcs._utils = new Utils();
mcs._logger = new Logger();
var sync = g.mcs && g.mcs._sync ? g.mcs._sync : undefined;
/**
* The entry-point into the Oracle Mobile Cloud Service SDK. The MobileBackendManager has a singleton from which MobileBackend
* objects can be accessed, which in turn provide access to Analytics, Storage, Auth and other capabilities.
* @memberof mcs
* @type {MobileBackendManager}
*/
mcs.mobileBackendManager = new MobileBackendManager(mcs._logger, mcs._utils, sync);
mcs.mobileBackendManager.platform = new BrowserPlatform(mcs.mobileBackendManager, mcs._logger, mcs._utils);
/**
* The entry-point into the Oracle Mobile Cloud Service SDK. The MobileBackendManager has a singleton from which MobileBackend
* objects can be accessed, which in turn provide access to Analytics, Storage, Auth and other capabilities.
* @deprecated Replaced with {@link mcs.mobileBackendManager}
* @memberof mcs
* @type {MobileBackendManager}
*/
mcs.MobileBackendManager = mcs.mobileBackendManager;
/**
* Class that holds an analytics event.
* @type {AnalyticsEvent}
*/
mcs.AnalyticsEvent = AnalyticsEvent;
/**
* Platform class for browser applications. Derives from [Platform]{@link Platform}.
* @type {BrowserPlatform}
*/
mcs.BrowserPlatform = BrowserPlatform;
if(typeof CordovaPlatform !== 'undefined') {
/**
* Platform class for Cordova applications. Derives from [BrowserPlatform]{@link BrowserPlatform}.
* @type {CordovaPlatform}
*/
mcs.CordovaPlatform = CordovaPlatform;
}
/**
* Class that provides network response details.
* @type {NetworkResponse}
*/
mcs.NetworkResponse = NetworkResponse;
/**
* Class that provides network response details.
* @memberof mcs
* @type {NetworkResponse}
*/
mcs.NetworkStorageObject = NetworkStorageObject;
/**
* Class that represents a storage object resource that can be used to store data.
* @memberof mcs
* @type {StorageObject}
*/
mcs.StorageObject = StorageObject;
mcs.LOG_LEVEL = LOG_LEVEL;
mcs.AUTHORIZATION_TYPES = AUTHORIZATION_TYPES;
mcs.logLevel = LOG_LEVEL;
if (typeof define === 'function' && define.amd) {
// AMD
define([], mcs);
} else if (typeof exports === 'object') {
// CommonJS
module.exports = mcs;
} else {
// Browser globals
g.mcs = mcs;
}