New feature implemented; version up 58/22558/1
authorWenchao Wang <wenchao.wang@intel.com>
Fri, 6 Jun 2014 09:35:44 +0000 (17:35 +0800)
committerWenchao Wang <wenchao.wang@intel.com>
Fri, 6 Jun 2014 09:35:44 +0000 (17:35 +0800)
Implemented new Locale module
Updated interfaces of MediaServer

Change-Id: I5380f474277dc79307415748f14a5815ebed4d2e
Signed-off-by: Wenchao Wang <wenchao.wang@intel.com>
package/changelog
package/pkginfo.manifest
web/cache.manifest
web/ripple.js

index e8992e5..36e7201 100644 (file)
@@ -1,3 +1,7 @@
+* 2.0.36
+- New Locale module implementation
+- Bugs fixing
+== wenchao.wang <wenchao.wang@intel.com> 2014-06-06 17:20
 * 2.0.35
 - New Speech module implementation
 - Bugs fixing
index a1e5c61..efa905c 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.0.35
+Version:2.0.36
 Maintainer:hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
 
 Package:websimulator-core
index 1311ada..aa7fe76 100644 (file)
@@ -107,4 +107,4 @@ images/AboutLogo.png
 images/refreshIcon.png
 images/ui-bg-hashed.png
 images/tizen-sdk-menu.png
-# Manifest build date: Thu May 29 2014 19:06:01 GMT+0800 (CST)
\ No newline at end of file
+# Manifest build date: Fri Jun 06 2014 17:16:16 GMT+0800 (CST)
\ No newline at end of file
index c1b5df7..bdd608a 100644 (file)
@@ -1,5 +1,5 @@
 /*! 
-  Ripple Mobile Environment Emulator v0.9.8 :: Built On Thu May 29 2014 19:06:01 GMT+0800 (CST)
+  Ripple Mobile Environment Emulator v0.9.8 :: Built On Fri Jun 06 2014 17:16:14 GMT+0800 (CST)
 
                                 Apache License
                            Version 2.0, January 2004
@@ -127286,6 +127286,12 @@ module.exports = {
         SpeechRecognition: {
             path: "ivi/3.0/SpeechRecognition"
         },
+        SpeechGrammarList: {
+            path: "ivi/3.0/SpeechGrammarList"
+        },
+        SpeechGrammar: {
+            path: "ivi/3.0/SpeechGrammar"
+        },
         navigator: {
             path: "tizen/2.0/navigator",
             children: {
@@ -127545,6 +127551,11 @@ module.exports = {
                     feature: "http://tizen.org/privilege/websetting",
                     handleSubfeatures: true
                 },
+                locale: {
+                    path: "ivi/3.0/locale",
+                    feature: "http://tizen.org/privilege/vehicle",
+                    handleSubfeatures: true
+                },
                 mediaserver: {
                     path: "ivi/3.0/mediaserver",
                     feature: "http://tizen.org/privilege/mediaserver",
@@ -129275,6 +129286,12 @@ _t = {
  */
 
 /*
+ * Locale
+ */
+
+_t.LocaleChangedCallback = _t.Function;
+
+/*
  * Media Server
  */
 _t.MediaServerFoundServerCallback = _t.Function;
@@ -129749,6 +129766,9 @@ _c = {};
  */
 
 _i = {
+    // Locale
+    Locale:             {},
+
     // Media Server
     MediaServerManager: {},
     MediaServer:        {},
@@ -129761,6 +129781,17 @@ _i = {
     Vehicle:            {}
 };
 
+// Locale
+_i.Locale.setLocale = {
+    0: _t.DOMString
+};
+
+_i.Locale.getLocale = null;
+
+_i.Locale.localeChanged = {
+    0: _t.LocaleChangedCallback
+};
+
 // Media Server
 _i.MediaServerManager.scanNetwork = {
     0: _t.MediaServerFoundServerCallback,
@@ -129968,6 +129999,50 @@ module.exports = function (code, message, name) {
 };
 
 });
+define('ripple/platform/ivi/3.0/SpeechGrammar', function (require, exports, module) {
+/*
+ *  Copyright 2014 Intel Corporation.
+ *
+ * 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.
+ */
+
+var SpeechGrammar = window.webkitSpeechGrammar;
+
+module.exports = SpeechGrammar;
+
+});
+define('ripple/platform/ivi/3.0/SpeechGrammarList', function (require, exports, module) {
+/*
+ *  Copyright 2014 Intel Corporation.
+ *
+ * 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.
+ */
+
+var SpeechGrammarList = window.webkitSpeechGrammarList;
+
+module.exports = SpeechGrammarList;
+
+});
 define('ripple/platform/ivi/3.0/ivi_utils', function (require, exports, module) {
 /*
  *  Copyright 2011 Intel Corporation.
@@ -130532,6 +130607,178 @@ self = module.exports = {
 };
 
 });
+define('ripple/platform/ivi/3.0/locale', function (require, exports, module) {
+/*
+ *  Copyright 2014 Intel Corporation.
+ *
+ * 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.
+ */
+
+var db = require('ripple/db'),
+    t = require('ripple/platform/ivi/3.0/typecast'),
+    errorcode = require('ripple/platform/ivi/3.0/errorcode'),
+    WebAPIException = require('ripple/platform/ivi/3.0/WebAPIException'),
+    _security = {
+        "http://tizen.org/privilege/vehicle": []
+    },
+    _data = {
+        DEFAULT: {lang: "eng"},
+        listener: null,
+        locale: null,
+        language: [],
+        dbStorage: "ivi-locale"
+    },
+    _self;
+
+function _save(data) {
+    db.saveObject(_data.dbStorage, data);
+}
+
+function _get() {
+    var database = db.retrieveObject(_data.dbStorage);
+
+    if (!database) {
+        db.saveObject(_data.dbStorage, _data.DEFAULT);
+        database = db.retrieveObject(_data.dbStorage);
+    }
+
+    return database;
+}
+
+function _initialize() {
+    _data.locale = _get();
+
+    // ISO 639-2 Language Codes
+    _data.language = ["abk", "ace", "ach", "ada", "ady", "ady", "aar", "afh",
+        "afr", "afa", "ain", "aka", "akk", "alb", "sqi", "gsw", "ale", "alg",
+        "gsw", "tut", "amh", "anp", "apa", "ara", "arg", "arp", "arw", "arm",
+        "hye", "rup", "art", "rup", "asm", "ast", "ast", "ath", "aus", "map",
+        "ava", "ave", "awa", "aym", "aze", "ast", "ban", "bat", "bal", "bam",
+        "bai", "bad", "bnt", "bas", "bak", "baq", "eus", "btk", "bej", "bej",
+        "bel", "bem", "ben", "ber", "bho", "bih", "bik", "byn", "bin", "bis",
+        "byn", "zbl", "zbl", "zbl", "nob", "bos", "bra", "bre", "bug", "bul",
+        "bua", "bur", "mya", "cad", "spa", "cat", "cau", "ceb", "cel", "cai",
+        "khm", "chg", "cmc", "cha", "che", "chr", "nya", "chy", "chb", "nya",
+        "chi", "zho", "chn", "chp", "cho", "zha", "chu", "chu", "chk", "chv",
+        "nwc", "nwc", "syc", "rar", "cop", "cor", "cos", "cre", "mus", "crp",
+        "cpe", "cpf", "cpp", "crh", "crh", "hrv", "cus", "cze", "ces", "dak",
+        "dan", "dar", "del", "chp", "div", "zza", "zza", "din", "div", "doi",
+        "dgr", "dra", "dua", "dut", "nld", "dum", "dyu", "dzo", "frs", "bin",
+        "efi", "egy", "eka", "elx", "eng", "enm", "ang", "myv", "epo", "est",
+        "ewe", "ewo", "fan", "fat", "fao", "fij", "fil", "fin", "fiu", "dut",
+        "nld", "fon", "fre", "fra", "frm", "fro", "fur", "ful", "gaa", "gla",
+        "car", "glg", "lug", "gay", "gba", "gez", "geo", "kat", "ger", "deu",
+        "nds", "gmh", "goh", "gem", "kik", "gil", "gon", "gor", "got", "grb",
+        "grc", "gre", "ell", "kal", "grn", "guj", "gwi", "hai", "hat", "hat",
+        "hau", "haw", "heb", "her", "hil", "him", "hin", "hmo", "hit", "hmn",
+        "hun", "hup", "iba", "ice", "isl", "ido", "ibo", "ijo", "ilo", "arc",
+        "smn", "inc", "ine", "ind", "inh", "ina", "ile", "iku", "ipk", "ira",
+        "gle", "mga", "sga", "iro", "ita", "jpn", "jav", "kac", "jrb", "jpr",
+        "kbd", "kab", "kac", "kal", "xal", "kam", "kan", "kau", "pam", "kaa",
+        "krc", "krl", "kar", "kas", "csb", "kaw", "kaz", "kha", "khi", "kho",
+        "kik", "kmb", "kin", "zza", "kir", "zza", "tlh", "kom", "kon", "kok",
+        "kor", "kos", "kpe", "kro", "kua", "kum", "kur", "kru", "kut", "kua",
+        "kir", "lad", "lah", "lam", "day", "lao", "lat", "lav", "ast", "ltz",
+        "lez", "lim", "lim", "lim", "lin", "lit", "jbo", "nds", "nds", "dsb",
+        "loz", "lub", "lua", "lui", "smj", "lun", "luo", "lus", "ltz", "rup",
+        "mac", "mkd", "mad", "mag", "mai", "mak", "mlg", "may", "msa", "mal",
+        "div", "mlt", "mnc", "mdr", "man", "mni", "mno", "glv", "mao", "mri",
+        "arn", "arn", "mar", "chm", "mah", "mwr", "mas", "myn", "men", "mic",
+        "mic", "min", "mwl", "moh", "mdf", "rum", "ron", "rum", "ron", "mkh",
+        "hmn", "lol", "mon", "mos", "mul", "mun", "nqo", "nah", "nau", "nav",
+        "nav", "nde", "nbl", "ndo", "nap", "new", "nep", "new", "nia", "nic",
+        "ssa", "niu", "zxx", "nog", "non", "nai", "nde", "frr", "sme", "nso",
+        "nor", "nob", "nno", "zxx", "nub", "iii", "nym", "nya", "nyn", "nno",
+        "nyo", "nzi", "ile", "oci", "pro", "arc", "xal", "oji", "chu", "chu",
+        "nwc", "chu", "ori", "orm", "osa", "oss", "oss", "oto", "pal", "pau",
+        "pli", "pam", "pag", "pan", "pap", "paa", "pus", "nso", "per", "fas",
+        "peo", "phi", "phn", "fil", "pon", "pol", "por", "pra", "pro", "pan",
+        "pus", "que", "raj", "rap", "rar", "qaa-qtz", "roa", "rum", "ron",
+        "roh", "rom", "run", "rus", "kho", "sal", "sam", "smi", "smo", "sad",
+        "sag", "san", "sat", "srd", "sas", "nds", "sco", "gla", "sel", "sem",
+        "nso", "srp", "srr", "shn", "sna", "iii", "scn", "sid", "sgn", "bla",
+        "snd", "sin", "sin", "sit", "sio", "sms", "den", "sla", "slo", "slk",
+        "slv", "sog", "som", "son", "snk", "wen", "nso", "sot", "sai", "nbl",
+        "alt", "sma", "spa", "srn", "zgh", "suk", "sux", "sun", "sus", "swa",
+        "ssw", "swe", "gsw", "syr", "tgl", "tah", "tai", "tgk", "tmh", "tam",
+        "tat", "tel", "ter", "tet", "tha", "tib", "bod", "tig", "tir", "tem",
+        "tiv", "tlh", "tli", "tpi", "tkl", "tog", "ton", "tsi", "tso", "tsn",
+        "tum", "tup", "tur", "ota", "tuk", "tvl", "tyv", "twi", "udm", "uga",
+        "uig", "ukr", "umb", "mis", "und", "hsb", "urd", "uig", "uzb", "vai",
+        "cat", "ven", "vie", "vol", "vot", "wak", "wln", "war", "was", "wel",
+        "cym", "fry", "him", "wal", "wal", "wol", "xho", "sah", "yao", "yap",
+        "yid", "yor", "ypk", "znd", "zap", "zza", "zza", "zen", "zha", "zul",
+        "zun"];
+}
+
+_self = function () {
+    var locale;
+
+    function getLocale() {
+        return _data.locale.lang;
+    }
+
+    function setLocale(newLocale) {
+        t.Locale("setLocale", arguments);
+
+        if (_data.language.indexOf(newLocale) === -1) {
+            throw new WebAPIException(errorcode.UNKNOWN);
+        }
+
+        if (_data.locale.lang === newLocale)
+            return;
+
+        _data.locale.lang = newLocale;
+        _save(_data.locale);
+
+        window.setTimeout(function () {
+            if (_data.listener) {
+                _data.listener(newLocale);
+            }
+        }, 1);
+    }
+
+    function localeChanged(callback) {
+        t.Locale("localeChanged", arguments);
+
+        _data.listener = callback;
+    }
+
+    function handleSubFeatures(subFeatures) {
+        var i, subFeature;
+
+        for (subFeature in subFeatures) {
+            for (i in _security[subFeature]) {
+                _security[_security[subFeature][i]] = true;
+            }
+        }
+    }
+
+    locale = {
+        getLocale:         getLocale,
+        setLocale:         setLocale,
+        localeChanged:     localeChanged,
+        handleSubFeatures: handleSubFeatures
+    };
+
+    return locale;
+};
+
+_initialize();
+
+module.exports = _self;
+
+});
 define('ripple/platform/ivi/3.0/vehicle', function (require, exports, module) {
 /*
  *  Copyright 2013 Intel Corporation.