2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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 #ifndef __CONTEXT_MANAGER_INTERFACE_H__
18 #define __CONTEXT_MANAGER_INTERFACE_H__
21 /* Forward Declaration */
23 class context_provider_iface;
24 class context_provider_info;
26 class context_manager_iface {
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 */
35 namespace context_manager {
36 void set_instance(context_manager_iface* mgr);
37 } /* namespace ctx::context_manager */
41 #endif /* End of __CONTEXT_MANAGER_INTERFACE_H__ */