tizen 2.3 release
[framework/web/wearable/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-rw / property_dao.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    property_dao.h
18  * @author  Pawel Sikorski (p.sikorski@samsung.com)
19  * @version 1.0
20  * @brief   This file contains the declaration of property dao
21  */
22
23 #ifndef WRT_SRC_CONFIGURATION_PROPERTY_DAO_H_
24 #define WRT_SRC_CONFIGURATION_PROPERTY_DAO_H_
25
26 #include <dpl/wrt-dao-ro/property_dao_read_only.h>
27
28 namespace WrtDB {
29 struct WidgetRegisterInfo; //forward declaration
30
31 namespace PropertyDAO {
32 void RemoveProperty(TizenAppId tzAppid,
33                     const PropertyDAOReadOnly::WidgetPropertyKey &key);
34
35 //deprecated
36 /* This method sets widget property
37  */
38 void SetProperty(DbWidgetHandle widgetHandle,
39                  const PropertyDAOReadOnly::WidgetPropertyKey &key,
40                  const PropertyDAOReadOnly::WidgetPropertyValue &value,
41                  bool readOnly = false)
42 __attribute__((deprecated));
43
44 /* This method sets widget property
45  */
46 void SetProperty(TizenAppId tzAppid,
47                  const PropertyDAOReadOnly::WidgetPropertyKey &key,
48                  const PropertyDAOReadOnly::WidgetPropertyValue &value,
49                  bool readOnly = false);
50
51 /* This method registers properties for widget.
52  * Properties unregistering is done via "delete cascade" mechanism in SQL
53  */
54 void RegisterProperties(DbWidgetHandle widgetHandle, TizenAppId tzAppid,
55                         const WidgetRegisterInfo &regInfo);
56 } // namespace PropertyDAO
57 } // namespace WrtDB
58
59 #endif /* WRT_SRC_CONFIGURATION_PROPERTY_DAO_H_ */