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_PROVIDER_INTERFACE_H__
18 #define __CONTEXT_PROVIDER_INTERFACE_H__
22 /* Forward Declaration */
25 class context_provider_iface {
27 virtual ~context_provider_iface() {}
28 virtual int subscribe(const char *subject, ctx::json option, ctx::json *request_result);
29 virtual int unsubscribe(const char *subject, ctx::json option);
30 virtual int read(const char *subject, ctx::json option, ctx::json *request_result);
31 virtual int write(const char *subject, ctx::json data, ctx::json *request_result);
34 context_provider_iface() {}
36 }; /* class context_provider_iface */
38 class context_provider_info {
39 typedef context_provider_iface *(*creator_t)(void *data);
40 typedef void (*destroyer_t)(void *data);
46 const char *privilege;
48 context_provider_info();
49 context_provider_info(creator_t cr, destroyer_t des, void *dat = NULL, const char *priv = NULL);
54 #endif /* End of __CONTEXT_PROVIDER_INTERFACE_H__ */