UNPKG

gamelet-pixui-frame

Version:

pixui开发者框架

114 lines 8.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnsupportedGameletAPI = void 0; var utilities_1 = require("../../utilities/utilities"); // 走到这里通常意味着环境识别异常或用户用错了入口(jssdk/unity/ue 子入口本身已经会抛错, // 这里仅在 auto 入口的 fallback 兜底分支上被使用)。 // 为保持向后兼容,调用方法返回与原基类一致的"零值"语义;不抛错,避免业务突兀崩溃。 var UnsupportedGameletAPIImpl = /** @class */ (function () { function UnsupportedGameletAPIImpl() { } UnsupportedGameletAPIImpl.prototype.getRuntimeEnv = function () { return "unsupported"; }; UnsupportedGameletAPIImpl.prototype.canUsePlatformAPI = function () { return false; }; UnsupportedGameletAPIImpl.prototype.genAppScopeEventName = function (evt) { return ""; }; UnsupportedGameletAPIImpl.prototype.getAppID = function () { return 0; }; UnsupportedGameletAPIImpl.prototype.getAppKey = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getAppName = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getAppVersion = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.queryAppStatus = function (appID) { return Promise.resolve({}); }; UnsupportedGameletAPIImpl.prototype.getAppEntranceConfig = function (key) { return ""; }; UnsupportedGameletAPIImpl.prototype.getOpenArgs = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getIsProductEnvironment = function () { return false; }; UnsupportedGameletAPIImpl.prototype.getIsHitBackendWhitelist = function () { return false; }; UnsupportedGameletAPIImpl.prototype.getIsSupportCallbroker = function () { return false; }; UnsupportedGameletAPIImpl.prototype.getPlatformDesc = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getEntryInfo = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getFaasAddr = function () { return ""; }; UnsupportedGameletAPIImpl.prototype.getUserData = function () { return Promise.resolve({ openID: "", serviceType: "", appID: "", roleID: "", platID: "", accountType: "", area: "", partition: "", accessToken: "", gameVer: "", payToken: "", channelID: "", sdkVersion: "", sign: "", region: "", loginChannel: "", intlSdkParam: "", language: "", sQQInstalled: "", sWXInstalled: "", sExtend: "", sOpenId: "", sServiceType: "", sAppId: "", sRoleId: "", sPlatID: "", sAcountType: "", sArea: "", sPartition: "", sAccessToken: "", sGameVer: "", sPayToken: "", sChannelID: "", sSdkVersion: "", sSign: "", sRegion: "", sLoginChannel: "", sIntlSdkParam: "", sLanguage: "", qqInstalled: "", wxInstalled: "", extend: "" }); }; UnsupportedGameletAPIImpl.prototype.refreshUserDataTokens = function () { return Promise.resolve(); }; UnsupportedGameletAPIImpl.prototype.reportJSExceptionStringToTDM = function (content) { }; UnsupportedGameletAPIImpl.prototype.reportStringToTDM = function (content, tag) { }; UnsupportedGameletAPIImpl.prototype.reportNumberToTDM = function (tag) { }; UnsupportedGameletAPIImpl.prototype.faasReportStringToTDM = function (content, tag) { return Promise.resolve("unsupport"); }; UnsupportedGameletAPIImpl.prototype.faasReportNumberToTDM = function (tag) { return Promise.resolve("unsupport"); }; UnsupportedGameletAPIImpl.prototype.setDataStash = function (key, value) { return Promise.resolve(); }; UnsupportedGameletAPIImpl.prototype.getDataStash = function (key) { return Promise.resolve(""); }; UnsupportedGameletAPIImpl.prototype.clearDataStash = function () { return Promise.resolve(); }; UnsupportedGameletAPIImpl.prototype.writeCookie = function (c, v) { return Promise.reject('not support'); }; UnsupportedGameletAPIImpl.prototype.writeRoleCookie = function (c, v) { return Promise.reject('not support'); }; UnsupportedGameletAPIImpl.prototype.readCookie = function (c) { return Promise.reject('not support'); }; UnsupportedGameletAPIImpl.prototype.readRoleCookie = function (c) { return Promise.reject('not support'); }; UnsupportedGameletAPIImpl.prototype.deleteCookie = function (c) { return Promise.reject('not support'); }; UnsupportedGameletAPIImpl.prototype.addOnGameCommandListener = function (func) { }; UnsupportedGameletAPIImpl.prototype.removeOnGameCommandListener = function (func) { }; UnsupportedGameletAPIImpl.prototype.addOnSrvPushDataListener = function (func) { }; UnsupportedGameletAPIImpl.prototype.removeOnSrvPushDataListener = function (func) { }; UnsupportedGameletAPIImpl.prototype.addEventListener = function (evt, func) { }; UnsupportedGameletAPIImpl.prototype.removeEventListener = function (evt, func) { }; UnsupportedGameletAPIImpl.prototype.dispatchEvent = function (evt) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } }; UnsupportedGameletAPIImpl.prototype.addLocalEventListener = function (evt, func) { }; UnsupportedGameletAPIImpl.prototype.removeLocalEventListener = function (evt, func) { }; UnsupportedGameletAPIImpl.prototype.dispatchLocalEvent = function (evt) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } }; UnsupportedGameletAPIImpl.prototype.callGame = function (msg) { }; UnsupportedGameletAPIImpl.prototype.open = function (appID, extend) { }; UnsupportedGameletAPIImpl.prototype.close = function () { }; UnsupportedGameletAPIImpl.prototype.reportStats = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } }; UnsupportedGameletAPIImpl.prototype.reportStatsV2 = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } }; UnsupportedGameletAPIImpl.prototype.reportMonitorV2 = function (tag, content, itype) { }; UnsupportedGameletAPIImpl.prototype.callApplicationBroker = function (commandId, subCommandId, req, callback) { callback(JSON.stringify({ ret: "-1", netret: "-1", err_msg: "not support" })); }; UnsupportedGameletAPIImpl.prototype.gameCustomFunction = function (functionName) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } }; UnsupportedGameletAPIImpl.prototype.setGameletAppEnv = function (appInfo, isProductEnvironment) { }; UnsupportedGameletAPIImpl.prototype.getResourceAppsInfo = function () { return Promise.resolve('{}'); }; UnsupportedGameletAPIImpl.prototype.getAppDownloadPath = function () { return Promise.resolve(''); }; UnsupportedGameletAPIImpl.prototype.cacheAsset = function (url, callback) { }; UnsupportedGameletAPIImpl.prototype.isAssetCached = function (url) { return Promise.resolve(false); }; UnsupportedGameletAPIImpl.prototype.getAssetCachePath = function (url) { return Promise.resolve(''); }; UnsupportedGameletAPIImpl.prototype.storeAsset = function (url, callback) { }; UnsupportedGameletAPIImpl.prototype.isAssetStored = function (url) { return Promise.resolve(false); }; UnsupportedGameletAPIImpl.prototype.getAssetStorePath = function (url) { return Promise.resolve(''); }; UnsupportedGameletAPIImpl.prototype.getJSSDKVersion = function () { return ''; }; UnsupportedGameletAPIImpl.prototype.getServerPlatID = function () { return Promise.resolve(-1); }; UnsupportedGameletAPIImpl.prototype.md5HashFile = function (filePath) { return Promise.resolve(''); }; UnsupportedGameletAPIImpl.prototype.md5HashString = function (text) { return Promise.resolve(''); }; return UnsupportedGameletAPIImpl; }()); exports.UnsupportedGameletAPI = (0, utilities_1.singleton)(UnsupportedGameletAPIImpl); //# sourceMappingURL=unsupported_gameletapi.js.map