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 * property_dao_read_only.h
19 * Created on: Nov 16, 2011
20 * Author: Krzysztof Jackiewicz(k.jackiewicz@samsung.com)
23 #ifndef PROPERTY_DAO_READ_ONLY_H_
24 #define PROPERTY_DAO_READ_ONLY_H_
27 #include <dpl/string.h>
28 #include <dpl/exception.h>
29 #include <dpl/db/orm.h>
30 #include <dpl/wrt-dao-ro/common_dao_types.h>
33 namespace PropertyDAOReadOnly {
34 typedef DPL::String WidgetPropertyKey;
35 typedef DPL::OptionalString WidgetPropertyValue;
37 typedef std::list<WidgetPropertyKey> WidgetPropertyKeyList;
39 struct WidgetPreferenceRow {
40 TizenAppId tizen_appid;
41 WidgetPropertyKey key_name;
42 WidgetPropertyValue key_value;
43 DPL::OptionalInt readonly;
46 typedef std::list<WidgetPreferenceRow> WidgetPreferenceList;
49 * PropertyDAO Exception classes
54 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
55 DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
56 DECLARE_EXCEPTION_TYPE(Base, ReadOnlyProperty)
60 /* This method checks read only flag for given property
62 DPL::OptionalInt CheckPropertyReadFlag(DbWidgetHandle widgetHandle,
63 const WidgetPropertyKey &key)
64 __attribute__((deprecated));
66 /* This method checks read only flag for given property
68 DPL::OptionalInt CheckPropertyReadFlag(TizenAppId tzAppid,
69 const WidgetPropertyKey &key);
71 /* This method gets widget property key list
73 WidgetPropertyKeyList GetPropertyKeyList(TizenAppId tzAppid);
76 /* This method gets widget property list
78 WidgetPreferenceList GetPropertyList(DbWidgetHandle widgetHandle)
79 __attribute__((deprecated));
81 /* This method gets widget property list
83 WidgetPreferenceList GetPropertyList(TizenAppId tzAppid);
85 /* This method get widget property value
87 WidgetPropertyValue GetPropertyValue(TizenAppId tzAppid,
88 const WidgetPropertyKey &key);
89 } // PropertyDAOReadOnly
92 #endif /* PROPERTY_DAO_READ_ONLY_H_ */