tizen beta release
[framework/web/wrt-installer.git] / src / security / i_ace_settings_client.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    i_ace_settings_client.h
18  * @author  Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
19  * @version 1.0
20  * @brief   This is a header file for interface of ACE settings client
21  */
22 #ifndef WRT_SRC_UI_SHARED_GADGET_IACESETTINGSCLIENT_H_
23 #define WRT_SRC_UI_SHARED_GADGET_IACESETTINGSCLIENT_H_
24
25 #include <dpl/fast_delegate.h>
26 #include <dpl/ace-dao-ro/PreferenceTypes.h>
27 #include <string>
28 #include <vector>
29 #include <i_ace_permissions.h>
30
31 namespace AceSettings {
32
33 class IClient
34 {
35   public:
36     typedef DPL::FastDelegate<void (const WidgetsPreferences &preferences)>
37     GetWidgetsPreferencesDelegate;
38
39     typedef DPL::FastDelegate<void (const ResourcesPreferences &preferences)>
40     GetResourcesPreferencesDelegate;
41
42     virtual void setWidgetPreference(const std::string &resource,
43             const std::string &widget,
44             const AceDB::PreferenceTypes &preference) = 0;
45
46     virtual void setResourcePreference(const std::string &resource,
47             const AceDB::PreferenceTypes &preference) = 0;
48
49     virtual void asyncGetWidgetsPreferences(
50             GetWidgetsPreferencesDelegate delegate) = 0;
51
52     virtual void asyncGetResourcesPreferences(
53             GetResourcesPreferencesDelegate delegate) = 0;
54
55     virtual void resetWidgetsPreferences() = 0;
56     virtual void resetResourcesPreferences() = 0;
57
58     virtual ~IClient()
59     {
60     }
61 };
62 } // namespace AceSettings
63
64 #endif // WRT_SRC_UI_SHARED_GADGET_IACESETTINGSCLIENT_H_