2 * Copyright (c) 2016 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 __STC_MONITOR_H__
18 #define __STC_MONITOR_H__
21 #include "stc-error.h"
22 #include "stc-manager.h"
23 #include "stc-manager-util.h"
24 #include "stc-monitor-context.h"
25 #include "stc-monitor-app.h"
26 #include "stc-monitor-proc.h"
27 #include "stc-monitor-rstn.h"
28 #include "helper-nl.h"
31 #define CONTR_TIMER_INTERVAL 1
33 #ifndef VCONFKEY_STC_BACKGROUND_STATE
34 #define VCONFKEY_STC_BACKGROUND_STATE "db/stc/background_state"
37 #ifndef VCONFKEY_SETAPPL_DATA_RESTRICTION_INT
38 #define VCONFKEY_SETAPPL_DATA_RESTRICTION_INT "db/setting/data_restriction"
42 * @brief initializes stc monitor module
44 stc_error_e stc_monitor_init(void);
47 * @brief deinitializes stc monitor module
49 stc_error_e stc_monitor_deinit(void);
51 GHashTable *stc_monitor_get_system_apps(void);
53 GHashTable *stc_monitor_get_system_rstns(void);
55 int stc_monitor_get_contr_sock(void);
57 time_t stc_monitor_get_last_month_ts(void);
59 void stc_monitor_set_last_month_ts(time_t time);
61 time_t stc_monitor_get_last_week_ts(void);
63 void stc_monitor_set_last_week_ts(time_t time);
65 time_t stc_monitor_get_last_day_ts(void);
67 void stc_monitor_set_last_day_ts(time_t time);
69 void stc_monitor_set_rstns_updated(gboolean value);
71 gboolean stc_monitor_get_rstns_updated(void);
73 void stc_monitor_set_apps_updated(gboolean value);
75 gboolean stc_monitor_get_apps_updated(void);
77 void stc_monitor_set_background_state(gboolean value);
79 gboolean stc_monitor_get_background_state(void);
81 void stc_monitor_update_by_connection(void *data);
83 void stc_monitor_add_by_connection(void *data);
85 void stc_monitor_remove_by_connection(void *data);
87 stc_error_e stc_monitor_check_excn_by_cmdline(char *cmdline);
89 #endif /* __STC_MONITOR_H__ */