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_PLACE_MYPLACE_HANDLE_H__
18 #define __CONTEXT_PLACE_MYPLACE_HANDLE_H__
23 #include <geofence_manager.h>
27 class myplace_handle {
29 typedef std::map<int, geofence_state_e> geo_state_map_t;
30 typedef std::set<std::string> string_set_t;
36 bool start_monitor(int place_id);
41 geofence_state_e prev_state;
42 geofence_manager_h geo_handle;
43 geo_state_map_t geo_state_map;
45 void emit_state_change();
47 bool start_fence(int fence_id);
48 void remove_fence(int fence_id);
49 void update_fence(int fence_id, geofence_manage_e manage);
50 void update_state(int fence_id, geofence_state_e state);
52 static bool fence_list_cb(int geofence_id, geofence_h fence, int fence_index, int fence_cnt, void* user_data);
53 static void fence_event_cb(int place_id, int geofence_id, geofence_manager_error_e error, geofence_manage_e manage, void* user_data);
54 static void fence_state_cb(int geofence_id, geofence_state_e state, void* user_data);
59 #endif /* __CONTEXT_PLACE_MYPLACE_HANDLE_H__ */