tizen 2.3.1 release
[kernel/api/system-resource.git] / src / network / network-dummy.c
1  /*
2  * resourced
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20 /*
21  * @file network.c
22  *
23  * @desc Entity for storing applications statistics
24  *
25  * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
26  *
27  */
28
29 #include <stdio.h>
30
31 #include "data_usage.h"
32 #include "datausage-restriction.h"
33 #include "macro.h"
34 #include "net-cls-cgroup.h"
35 #include "rd-network.h"
36 #include "resourced.h"
37
38 API network_error_e network_set_option(const network_option_s *options)
39 {
40         return NETWORK_ERROR_NONE;
41 }
42
43 API network_error_e network_get_option(network_option_s *options)
44 {
45         return NETWORK_ERROR_NONE;
46 }
47
48 API network_error_e network_make_cgroup_with_pid(const int pid,
49         const char *pkg_name)
50 {
51         return NETWORK_ERROR_NONE;
52 }
53
54 API u_int32_t network_get_classid_by_pkg_name(const char *pkg_name, int create)
55 {
56         return NETWORK_ERROR_NONE;
57 }
58
59 API network_error_e network_set_restriction(const char *app_id,
60                             const network_restriction_s *restriction)
61 {
62         return NETWORK_ERROR_NONE;
63 }
64
65 API network_error_e network_restriction_foreach(network_restriction_cb restriction_cb,
66                                 void *user_data)
67 {
68         return NETWORK_ERROR_NONE;
69 }
70
71 API network_error_e network_remove_restriction(const char *app_id)
72 {
73         return NETWORK_ERROR_NONE;
74 }
75
76 API network_error_e network_remove_restriction_by_iftype(const char *app_id,
77                                              const network_iface_e iftype)
78 {
79         return NETWORK_ERROR_NONE;
80 }
81
82 API network_error_e network_exclude_restriction(const char *app_id)
83 {
84         return NETWORK_ERROR_NONE;
85 }
86
87 API network_error_e network_exclude_restriction_by_iftype(
88         const char *app_id, const network_iface_e iftype)
89 {
90         return NETWORK_ERROR_NONE;
91 }
92
93 API network_error_e network_register_activity_cb(network_activity_cb activity_cb)
94 {
95         return NETWORK_ERROR_NONE;
96 }
97
98 API network_error_e network_join_app_performance(const char *app_id, const pid_t pid)
99 {
100         return NETWORK_ERROR_NONE;
101 }
102
103 API network_error_e network_update_statistics(void)
104 {
105         return NETWORK_ERROR_NONE;
106 }
107
108 API network_error_e network_foreach(const network_selection_rule_s *rule,
109                              network_info_cb info_cb, void *user_data)
110 {
111         return NETWORK_ERROR_NONE;
112 }
113
114 API network_error_e network_details_foreach(const char *app_id,
115                                            network_selection_rule_s *rule,
116                                            network_info_cb info_cb,
117                                            void *user_data)
118 {
119         return NETWORK_ERROR_NONE;
120 }
121
122 API network_error_e network_reset(const network_reset_rule_s *rule)
123 {
124         return NETWORK_ERROR_NONE;
125 }
126
127 API network_error_e network_remove_quota(
128         const network_quota_reset_rule_s *rule)
129 {
130         return NETWORK_ERROR_NONE;
131 }
132
133 API network_error_e network_remove_quota_by_iftype(
134         const char *app_id, const network_iface_e iftype)
135 {
136         return NETWORK_ERROR_NONE;
137 }
138
139 API network_error_e network_set_quota(const char *app_id,
140                               const network_quota_s *quota)
141 {
142         return NETWORK_ERROR_NONE;
143 }
144
145 API network_error_e network_get_restriction_state(const char *pkg_id,
146         network_iface_e iftype, network_restriction_state *state)
147 {
148         *state = NETWORK_RESTRICTION_UNDEFINDED;
149         return NETWORK_ERROR_NONE;
150 }