Initialize Tizen 2.3
[framework/web/wrt-commons.git] / modules_mobile / localization / include / dpl / localization / w3c_file_localization.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /**
17  * @file    w3c_file_localization.h
18  * @author  Lukasz Wrzosek (l.wrzosek@samsung.com)
19  * @version 1.0
20  */
21
22 #ifndef W3C_FILE_LOCALIZATION_H
23 #define W3C_FILE_LOCALIZATION_H
24
25 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
26 #include <dpl/optional.h>
27 #include <dpl/string.h>
28 #include <list>
29
30 #include <dpl/localization/localization_utils.h>
31
32 // WrtDB::DbWidgetHandle
33 #include <dpl/wrt-dao-ro/common_dao_types.h>
34
35 namespace W3CFileLocalization {
36 typedef std::list<WidgetIcon> WidgetIconList;
37
38 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
39     WrtDB::DbWidgetHandle widgetHandle,
40     const DPL::String &url);
41 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
42     const WrtDB::TizenAppId &tzAppId,
43     const DPL::String &url);
44 DPL::Optional<DPL::String> getFilePathInWidgetPackageFromUrl(
45     WrtDB::WidgetDAOReadOnlyPtr dao,
46     const DPL::String &url);
47 std::string getFilePathInWidgetPackageFromUrl(const std::string &tzAppId, const std::string &url);
48
49 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
50     WrtDB::DbWidgetHandle widgetHandle,
51     const DPL::String& file);
52 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
53     const WrtDB::TizenAppId &tzAppId,
54     const DPL::String& file);
55 DPL::Optional<DPL::String> getFilePathInWidgetPackage(
56     WrtDB::WidgetDAOReadOnlyPtr dao,
57     const DPL::String& file);
58
59 DPL::OptionalString getStartFile(WrtDB::DbWidgetHandle handle);
60 DPL::OptionalString getStartFile(const WrtDB::TizenAppId & tzAppId);
61 DPL::OptionalString getStartFile(WrtDB::WidgetDAOReadOnlyPtr dao);
62
63 OptionalWidgetIcon getIcon(WrtDB::DbWidgetHandle widgetHandle);
64 OptionalWidgetIcon getIcon(const WrtDB::TizenAppId & tzAppId);
65 OptionalWidgetIcon getIcon(WrtDB::WidgetDAOReadOnlyPtr dao);
66
67 WidgetIconList getValidIconsList(
68     WrtDB::DbWidgetHandle widgetHandle);
69 WidgetIconList getValidIconsList(
70     const WrtDB::TizenAppId &tzAppId);
71 WidgetIconList getValidIconsList(
72     WrtDB::WidgetDAOReadOnlyPtr dao);
73
74 OptionalWidgetStartFileInfo getStartFileInfo(
75     WrtDB::DbWidgetHandle widgetHandle);
76 OptionalWidgetStartFileInfo getStartFileInfo(
77     const WrtDB::TizenAppId &tzAppId);
78 OptionalWidgetStartFileInfo getStartFileInfo(
79     WrtDB::WidgetDAOReadOnlyPtr dao);
80
81 WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::DbWidgetHandle widgetHandle);
82 WrtDB::WidgetLocalizedInfo getLocalizedInfo(
83     const WrtDB::TizenAppId & tzAppId);
84 WrtDB::WidgetLocalizedInfo getLocalizedInfo(WrtDB::WidgetDAOReadOnlyPtr dao);
85 }
86
87 #endif //W3C_FILE_LOCALIZATION_H