tizen 2.4 release
[framework/context/context-common.git] / include / context_mgr_iface.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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 #ifndef __CONTEXT_MANAGER_INTERFACE_H__
18 #define __CONTEXT_MANAGER_INTERFACE_H__
19
20 namespace ctx {
21         /* Forward Declaration */
22         class json;
23         class context_provider_iface;
24         class context_provider_info;
25
26         class context_manager_iface {
27         public:
28                 virtual ~context_manager_iface() {}
29                 virtual bool register_provider(const char *subject, context_provider_info &provider_info) = 0;
30                 virtual bool register_trigger_item(const char *subject, int operation, ctx::json attributes, ctx::json options) = 0;
31                 virtual bool publish(const char *subject, ctx::json &option, int error, ctx::json &data_updated) = 0;
32                 virtual bool reply_to_read(const char *subject, ctx::json &option, int error, ctx::json &data_read) = 0;
33         };      /* class context_manager_iface */
34
35         namespace context_manager {
36                 void set_instance(context_manager_iface* mgr);
37         }       /* namespace ctx::context_manager */
38
39 }       /* namespace ctx */
40
41 #endif  /* End of __CONTEXT_MANAGER_INTERFACE_H__ */