4 * Copyright (c) 2000 - 2014 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 * @desc Application stat entity
28 #ifndef _RESOURCED_CONST_H
29 #define _RESOURCED_CONST_H
31 #define TASK_FILE_NAME "/tasks"
32 #define CGROUP_FILE_NAME "/cgroup.procs"
33 #define UNKNOWN_APP "(unknown)"
35 #define MAX_PATH_LENGTH 512
36 #define MAX_NAME_LENGTH 256
38 #define COMMA_DELIMETER ","
40 #define COUNTER_UPDATE_PERIOD 60
41 #define FLUSH_PERIOD 60
42 #define STORE_DELAY_INTERVAL 1
44 #define NONE_QUOTA_ID 0
46 #define TIME_TO_SAFE_DATA 1 /* one second */
49 * @desc reserved classid enums
50 * internal structure, we don't provide it externally
52 enum resourced_reserved_classid {
53 RESOURCED_UNKNOWN_CLASSID,
54 RESOURCED_ALL_APP_CLASSID, /**< kernel expects 1 for
55 handling restriction for all
57 RESOURCED_TETHERING_APP_CLASSID, /**< it uses in user space logic
58 for counting tethering traffic */
59 RESOURCED_RESERVED_CLASSID_MAX,
62 enum resourced_counter_state {
63 RESOURCED_DEFAULT_STATE = 0,
64 RESOURCED_FORCIBLY_FLUSH_STATE = 1 << 1,
65 RESOURCED_FORCIBLY_QUIT_STATE = 1 << 2,
66 RESOURCED_NET_BLOCKED_STATE = 1 << 3,
69 #endif /* _RESOURCED_CONST_H */