2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file w3c_file_localization.h
18 * @author Lukasz Wrzosek (l.wrzosek@samsung.com)
22 #ifndef W3C_FILE_LOCALIZATION_H
23 #define W3C_FILE_LOCALIZATION_H
25 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
26 #include <dpl/optional.h>
27 #include <dpl/string.h>
30 #include <dpl/localization/localization_utils.h>
32 // WrtDB::DbWidgetHandle
33 #include <dpl/wrt-dao-ro/common_dao_types.h>
35 namespace W3CFileLocalization {
36 typedef std::list<WidgetIcon> WidgetIconList;
38 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
39 WrtDB::DbWidgetHandle widgetHandle,
40 const DPL::String &url);
41 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
42 const WrtDB::WidgetPkgName &pkgname,
43 const DPL::String &url);
44 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
45 WrtDB::WidgetDAOReadOnlyPtr dao,
46 const DPL::String &url);
48 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
49 WrtDB::DbWidgetHandle widgetHandle,
50 const DPL::String& file);
51 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
52 const WrtDB::WidgetPkgName &pkgname,
53 const DPL::String& file);
54 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
55 WrtDB::WidgetDAOReadOnlyPtr dao,
56 const DPL::String& file);
58 DPL::OptionalString getStartFile(WrtDB::DbWidgetHandle handle);
59 DPL::OptionalString getStartFile(const WrtDB::WidgetPkgName & pkgname);
60 DPL::OptionalString getStartFile(WrtDB::WidgetDAOReadOnlyPtr dao);
62 OptionalWidgetIcon getIcon(WrtDB::DbWidgetHandle widgetHandle);
63 OptionalWidgetIcon getIcon(const WrtDB::WidgetPkgName & pkgname);
64 OptionalWidgetIcon getIcon(WrtDB::WidgetDAOReadOnlyPtr dao);
66 WidgetIconList getValidIconsList(
67 WrtDB::DbWidgetHandle widgetHandle);
68 WidgetIconList getValidIconsList(
69 const WrtDB::WidgetPkgName &pkgname);
70 WidgetIconList getValidIconsList(
71 WrtDB::WidgetDAOReadOnlyPtr dao);
73 OptionalWidgetStartFileInfo getStartFileInfo(
74 WrtDB::DbWidgetHandle widgetHandle);
75 OptionalWidgetStartFileInfo getStartFileInfo(
76 const WrtDB::WidgetPkgName &pkgname);
77 OptionalWidgetStartFileInfo getStartFileInfo(
78 WrtDB::WidgetDAOReadOnlyPtr dao);
80 WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::DbWidgetHandle widgetHandle);
81 WrtDB::WidgetLocalizedInfo getLocalizedInfo(
82 const WrtDB::WidgetPkgName & pkgname);
83 WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::WidgetDAOReadOnlyPtr dao);
86 #endif //W3C_FILE_LOCALIZATION_H