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 #include <types_internal.h>
18 #include <context_mgr.h>
19 #include <provider_iface.h>
20 #include <place_context_provider.h>
23 #include "geofence/place_geofence.h"
26 template<typename provider>
27 void register_provider(const char *subject, const char *privilege)
29 if (!provider::is_supported())
32 ctx::context_provider_info provider_info(provider::create, provider::destroy, NULL, privilege);
33 ctx::context_manager::register_provider(subject, provider_info);
34 provider::submit_trigger_item();
37 EXTAPI bool ctx::init_place_context_provider()
40 register_provider<place_geofence_provider>(PLACE_SUBJ_GEOFENCE, PLACE_PRIV_GEOFENCE);