Fix Wformat build error
[platform/core/connectivity/stc-manager.git] / include / stc-firewall.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __STC_FIREWALL_H__
18 #define __STC_FIREWALL_H__
19
20 #include <glib.h>
21 #include "stc-manager.h"
22 #include "stc-manager-gdbus.h"
23 #include "table-firewall.h"
24
25 /*****************************************************************************
26  * Macros and Typedefs
27  *****************************************************************************/
28
29 typedef struct {
30         stc_fw_chain_target_e target;
31         uint64_t priority;
32         GSList *rules;
33 } stc_fw_data_s;
34
35 /*****************************************************************************
36  * Functions Declaration
37  *****************************************************************************/
38
39 void stc_firewall_init(void);
40 void stc_firewall_update(void);
41 void stc_firewall_deinit(void);
42
43 gboolean handle_firewall_lock(StcFirewall *object,
44                                         GDBusMethodInvocation *invocation,
45                                         void *user_data);
46
47 gboolean handle_firewall_unlock(StcFirewall *object,
48                                         GDBusMethodInvocation *invocation,
49                                         void *user_data);
50
51 gboolean handle_firewall_get_lock(StcFirewall *object,
52                                         GDBusMethodInvocation *invocation,
53                                         void *user_data);
54
55 gboolean handle_firewall_add_chain(StcFirewall *object,
56                                         GDBusMethodInvocation *invocation,
57                                         gchar *chain,
58                                         void *user_data);
59
60 gboolean handle_firewall_remove_chain(StcFirewall *object,
61                                         GDBusMethodInvocation *invocation,
62                                         gchar *chain,
63                                         void *user_data);
64
65 gboolean handle_firewall_flush_chain(StcFirewall *object,
66                                         GDBusMethodInvocation *invocation,
67                                         gchar *chain,
68                                         void *user_data);
69
70 gboolean handle_firewall_get_all_chain(StcFirewall *object,
71                                         GDBusMethodInvocation *invocation,
72                                         void *user_data);
73
74 gboolean handle_firewall_set_chain(StcFirewall *object,
75                                         GDBusMethodInvocation *invocation,
76                                         gchar *chain,
77                                         unsigned int target,
78                                         void *user_data);
79
80 gboolean handle_firewall_unset_chain(StcFirewall *object,
81                                         GDBusMethodInvocation *invocation,
82                                         gchar *chain,
83                                         void *user_data);
84
85 gboolean handle_firewall_add_rule(StcFirewall *object,
86                                    GDBusMethodInvocation *invocation,
87                                    GVariant *parameters,
88                                    void *user_data);
89
90 gboolean handle_firewall_remove_rule(StcFirewall *object,
91                                    GDBusMethodInvocation *invocation,
92                                    GVariant *parameters,
93                                    void *user_data);
94
95 gboolean handle_firewall_update_rule(StcFirewall *object,
96                                    GDBusMethodInvocation *invocation,
97                                    GVariant *parameters,
98                                    void *user_data);
99
100 gboolean handle_firewall_get_all_rule(StcFirewall *object,
101                                    GDBusMethodInvocation *invocation,
102                                    void *user_data);
103
104 #endif /* __STC_FIREWALL_H__ */