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 __TABLE_RESTRICTIONS_H__
18 #define __TABLE_RESTRICTIONS_H__
24 stc_iface_type_e iftype;
25 stc_rstn_type_e rst_type;
26 stc_roaming_type_e roaming;
28 int64_t data_warn_limit;
29 uint64_t restriction_id;
30 } table_restrictions_info;
33 (*table_restrictions_info_cb)(const table_restrictions_info *info,
36 stc_error_e table_restrictions_foreach(table_restrictions_info_cb info_cb,
39 stc_error_e table_restrictions_per_app(const gchar *app_id,
40 table_restrictions_info_cb info_cb,
44 stc_error_e table_restrictions_get_restriction_state_subscriber_id(const char *app_id,
45 stc_iface_type_e iftype,
46 const char *subscriber_id,
47 stc_restriction_state_e *state);
49 stc_error_e table_restrictions_get_restriction_state(const char *app_id,
50 stc_iface_type_e iftype,
51 stc_restriction_state_e *state);
53 stc_error_e table_restrictions_update(table_restrictions_info *info);
55 stc_error_e table_restrictions_delete(const char *app_id,
56 const stc_iface_type_e iftype,
57 const char *subscriber_id);
59 stc_error_e table_restrictions_prepare(sqlite3 *db);
61 void table_restrictions_finalize(void);
63 #endif /*__TABLE_RESTRICTIONS_H__ */