-build_log
*.log
-*.pyc
-usr
-opt
+*.a
*.o
*.so
*.so.*
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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.
- */
-/**
- * @file localization_utils.cpp
- * @author Bartosz Janiak (b.janiak@samsung.com)
- * @version 1.0
- */
-
-#include <dpl/localization/localization_utils.h>
-
-#include <dpl/foreach.h>
-#include <dpl/mutex.h>
-
-namespace LocalizationUtils {
-static LanguageTagsList m_systemLanguageTags;
-static LanguageTagsList m_languageTags;
-static DPL::ReadWriteMutex m_readWriteMutex;
-
-template<typename StringType>
-void FindAndReplace(StringType& source,
- const StringType& find,
- const StringType& replace)
-{
- size_t pos = 0;
- while ((pos = source.find(find, pos)) != StringType::npos) {
- source.replace(pos, find.length(), replace);
- pos += replace.length();
- }
-}
-
-DPL::String BCP47LanguageTagToLocale(const DPL::String& inLanguageTag)
-{
- DPL::String languageTag(inLanguageTag);
- FindAndReplace(languageTag, DPL::String(L"-"), DPL::String(L"_"));
- return languageTag;
-}
-
-DPL::String LocaleToBCP47LanguageTag(const DPL::String& inLocaleString)
-{
- DPL::String localeString = inLocaleString.substr(
- 0,
- inLocaleString.
- find_first_of(L"."));
- FindAndReplace(localeString, DPL::String(L"_"), DPL::String(L"-"));
- return localeString;
-}
-
-void UpdateUserAgentLanguageTags()
-{
- // WARNING!!!!! This function shall be called
- // only when mutex is locked in readWriteMode!
-
- m_languageTags.clear();
-
- FOREACH(i, m_systemLanguageTags) {
- DPL::String tag = LocaleToBCP47LanguageTag(*i);
- while (true) { //W3C Packaging 9. Step 5. 2. D
- if (tag.empty()) {
- continue;
- }
-
- LogDebug("Adding user locale '" << tag << "'");
- m_languageTags.push_back(tag);
-
- size_t subtagPos = tag.find_last_of(L"-");
- if (subtagPos == DPL::String::npos) {
- break;
- }
- tag = tag.substr(0, subtagPos);
- }
- }
-
- m_languageTags.push_back(L"en");
- m_languageTags.push_back(L"");
-}
-
-void SetSystemLanguageTags(const LanguageTagsList& tags)
-{
- DPL::ReadWriteMutex::ScopedWriteLock lock(&m_readWriteMutex);
- if (m_systemLanguageTags != tags) {
- m_systemLanguageTags = tags;
- UpdateUserAgentLanguageTags();
- }
-}
-
-LanguageTagsList GetUserAgentLanguageTags()
-{
- DPL::ReadWriteMutex::ScopedReadLock lock(&m_readWriteMutex);
- return m_languageTags;
-}
-}
* Costructor
*
* Abstract waitable input/outobject is acquired by class and destroyed upon
- * desctructor
+ * destructor
*/
explicit GenericRPCConnection(AbstractWaitableInputOutput *inputOutput);
virtual ~GenericRPCConnection();
+++ /dev/null
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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.
- */
-/**
- * @file file_utils.cpp
- * @author Bartosz Janiak (b.janiak@samsung.com)
- * @version 1.0
- */
-
-#include <sys/stat.h>
-#include <cerrno>
-#include <cstring>
-#include <cstdlib>
-#include <dirent.h>
-#include <unistd.h>
-
-#include <dpl/exception.h>
-#include <dpl/errno_string.h>
-#include <dpl/utils/file_utils.h>
-
-#include <dpl/wrt-dao-ro/path_builder.h>
-
-namespace {
-int try_mkdir(const char* path,
- mode_t mode)
-{
- struct stat st;
- int err = 0;
-
- if (::stat(path, &st) != 0) {
- if (::mkdir(path, mode) != 0) {
- err = -1;
- }
- } else if (!S_ISDIR(st.st_mode)) {
- errno = ENOTDIR;
- err = -1;
- }
-
- return err;
-}
-
-int mkpath(const char* path,
- mode_t mode)
-{
- char* copy = ::strdup(path);
- if (NULL == copy) {
- return -1;
- }
-
- int err = 0;
- char* ptr = copy;
- char* slash = NULL;
-
- while ((0 == err) && (NULL != (slash = ::strchr(ptr, '/')))) {
- if (slash != ptr) {
- *slash = '\0';
- err = try_mkdir(copy, mode);
- *slash = '/';
- }
- ptr = slash + 1;
- }
-
- if (0 == err) {
- err = try_mkdir(path, mode);
- }
-
- ::free(copy);
- return err;
-}
-
-int RmNode(const char* path);
-
-int RmDir(const char* path)
-{
- DIR* dir = ::opendir(path);
- if (NULL == dir) {
- return -1;
- }
-
- int return_code;
- struct dirent entry = NULL;
- struct dirent* entry_result;
-
- for (return_code = readdir_r(dir, &entry, &entry_result) != 0;
- entry_result != NULL && return_code != 0;
- return_code = readdir_r(dir, &entry, &entry_result))
- {
- errno = 0;
- if (!::strncmp(entry.d_name, ".", 1) ||
- !::strncmp(entry.d_name, "..", 2))
- {
- continue;
- }
- std::string fullPath = WrtDB::PathBuilder(path)
- .Append(entry.d_name)
- .GetFullPath();
- if (RmNode(fullPath.c_str()) != 0) {
- int error = errno;
- TEMP_FAILURE_RETRY(::closedir(dir));
- errno = error;
- return -1;
- }
- }
-
- int error = (!errno) ? errno : return_code;
- if (TEMP_FAILURE_RETRY(::closedir(dir)) != 0) {
- return -1;
- }
- errno = error;
-
- return (errno == 0 ? ::rmdir(path) : -1);
-}
-
-int RmNode(const char* path)
-{
- struct stat st;
- if (::lstat(path, &st) != 0) {
- return -1;
- }
- return (S_ISDIR(st.st_mode) ? RmDir(path) : ::unlink(path));
-}
-}
-
-namespace FileUtils {
-bool FileExists(const DPL::String& absolutePath)
-{
- struct stat statStruct;
- if (stat(DPL::ToUTF8String(absolutePath).c_str(), &statStruct) == 0) {
- return S_ISREG(statStruct.st_mode);
- } else {
- return false;
- }
-}
-
-void MakePath(const std::string& path,
- mode_t mode)
-{
- if (mkpath(path.c_str(), mode) == -1) {
- ThrowMsg(CreateDirectoryException, "Cannot make path");
- }
-}
-
-void RemoveDir(const std::string& path)
-{
- if (RmDir(path.c_str()) != 0) {
- ThrowMsg(RemoveDirectoryException, DPL::GetErrnoString());
- }
-}
-}
*/
inline const char* GetUserPreloadedWidgetPath()
{
- return "/usr/apps";
+ // temp
+ // return "/usr/apps";
+
+ return "/opt/usr/apps";
}
/**
INSERT INTO UserAgents VALUES("Galaxy S II", "Mozilla/5.0 (Linux; U; Android 2.3.5; en-gb; GT-I9100 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
INSERT INTO UserAgents VALUES("Galaxy S III", "Mozilla/5.0 (Linux; U; Android 4.0.4; en-gb; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
INSERT INTO UserAgents VALUES("SLP Galaxy", "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; GT-I9500 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
- INSERT INTO UserAgents VALUES("Tizen", "Mozilla/5.0 (Linux; U; Tizen 1.0; en-us) AppleWebKit/534.46 (KHTML, like Gecko) Mobile Tizen Browser/1.0");
+ INSERT INTO UserAgents VALUES("Tizen", "Mozilla/5.0 (Linux; U; Tizen 2.1; en-us; SAMSUNG GT-I8800) AppleWebKit/537.1 (KHTML, like Gecko) Version/2.1.0 Mobile");
INSERT INTO UserAgents VALUES("Galaxy Nexus", "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) Mobile Safari/535.7");
INSERT INTO UserAgents VALUES("Samsung", "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-I9200/1.0; U; Linux/SLP/2.0; ko-kr) AppleWebKit/534.4 (KHTML, like Gecko) Dolfin/2.0 Mobile");
INSERT INTO UserAgents VALUES("Samsung Dolfin", "SAMSUNG-GT-S8500/S8500XXJD2 SHP/VPP/R5 Dolfin/2.0 Nextreaming SMM-MMS/1.2.0 profile/MIDP-2.1 configuration/CLDC-1.1");