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__
25 stc_iface_type_e iftype;
26 stc_rstn_type_e rstn_type;
27 stc_roaming_type_e roaming;
29 int64_t data_warn_limit;
30 int64_t monthly_limit;
34 uint64_t restriction_id;
35 } table_restrictions_info;
38 (*table_restrictions_info_cb)(const table_restrictions_info *info,
41 stc_error_e table_restrictions_foreach(table_restrictions_info_cb info_cb,
44 stc_error_e table_restrictions_per_app(const gchar *app_id,
45 table_restrictions_info_cb info_cb,
49 stc_error_e table_restrictions_get_restriction_type_subscriber_id(const char *app_id,
50 stc_iface_type_e iftype,
51 const char *subscriber_id,
52 stc_rstn_type_e *type);
54 stc_error_e table_restrictions_get_restriction_type(const char *app_id,
55 stc_iface_type_e iftype,
56 stc_rstn_type_e *type);
58 stc_error_e table_restrictions_update(table_restrictions_info *info);
60 stc_error_e table_restrictions_delete(const char *app_id,
61 const stc_iface_type_e iftype,
63 const char *subscriber_id,
64 const stc_roaming_type_e roaming);
66 stc_error_e table_restrictions_prepare(sqlite3 *db);
68 void table_restrictions_finalize(void);
70 #endif /*__TABLE_RESTRICTIONS_H__ */