tizen 2.4 release
[framework/context/context-common.git] / src / provider_iface.cpp
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 #include <types_internal.h>
18 #include <json.h>
19 #include <provider_iface.h>
20
21 int ctx::context_provider_iface::subscribe(const char *subject, ctx::json option, ctx::json *request_result)
22 {
23         return ERR_NOT_SUPPORTED;
24 }
25
26 int ctx::context_provider_iface::unsubscribe(const char *subject, ctx::json option)
27 {
28         return ERR_NOT_SUPPORTED;
29 }
30
31 int ctx::context_provider_iface::read(const char *subject, ctx::json option, ctx::json *request_result)
32 {
33         return ERR_NOT_SUPPORTED;
34 }
35
36 int ctx::context_provider_iface::write(const char *subject, ctx::json data, ctx::json *request_result)
37 {
38         return ERR_NOT_SUPPORTED;
39 }
40
41 ctx::context_provider_info::context_provider_info()
42         : create(NULL)
43         , destroy(NULL)
44         , data(NULL)
45         , privilege(NULL)
46 {
47 }
48
49 ctx::context_provider_info::context_provider_info(
50                 ctx::context_provider_info::creator_t cr,
51                 ctx::context_provider_info::destroyer_t des, void *dat, const char *priv)
52         : create(cr)
53         , destroy(des)
54         , data(dat)
55         , privilege(priv)
56 {
57 }