4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
23 * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
27 #ifndef _RESOURCED_RESTRICTION_H_
28 #define _RESOURCED_RESTRICTION_H_
31 #include "resourced.h"
32 #include "data_usage.h"
33 #include "transmission.h"
35 void finalize_datausage_restriction(void);
38 * @desc Update restriction database
40 resourced_ret_c update_restriction_db(
41 const char *app_id, const resourced_iface_type iftype,
42 const int rcv_limit, const int snd_limit,
43 const resourced_restriction_state rst_state,
45 const resourced_roaming_type roaming);
48 * @desc Get restriction info from database
49 * Now it filles only quota_id, send_limit,
50 * rcv_limit, rst_state
52 * @param app_id - binpath database field, currently pkgid
53 * @param iftype - iftype database field
55 resourced_ret_c get_restriction_info(const char *app_id,
56 const resourced_iface_type iftype,
57 resourced_restriction_info *rst);
59 resourced_ret_c process_kernel_restriction(
60 const u_int32_t classid,
61 const resourced_net_restrictions *rst,
62 const enum traffic_restriction_type rst_type);
64 resourced_ret_c proc_keep_restriction(
65 const char *app_id, int quota_id, const resourced_net_restrictions *rst,
66 const enum traffic_restriction_type rst_type);
68 resourced_ret_c remove_restriction_local(const char *app_id,
69 const resourced_iface_type iftype);
71 resourced_ret_c exclude_restriction_local(const char *app_id,
73 const resourced_iface_type iftype);
75 #endif /* _RESOURCED_RESTRICTION_H_ */