Remove unused DBus methods 79/194779/2
authorYu <jiung.yu@samsung.com>
Fri, 7 Dec 2018 06:57:02 +0000 (15:57 +0900)
committerYu <jiung.yu@samsung.com>
Fri, 7 Dec 2018 06:58:04 +0000 (15:58 +0900)
Description : Some methods were developed for test purpose but not removed.
Change-Id: Idef1f934ce534832bfe1152a850a5a88311f4ac8
Signed-off-by: Yu Jiung <jiung.yu@samsung.com>
src/inm-gdbus.c

index 88f13abbace9f6b2b8ea71e103a682fe7ebc949a..002e0fb1be99c62d912fb0b0e55a17861b4725f2 100644 (file)
@@ -195,10 +195,6 @@ static const gchar inm_manager_introspection_xml[] = {
                "<method name='ReacherIsRunning'>"
                        "<arg type='b' name='is_running' direction='out'/>"
                        "</method>"
-/* Test purpose --> */
-               "<property type='b' name='WritingAlwaysThrowsError' access='readwrite'/>"
-               "<property type='b' name='ReadingAlwaysThrowsError' access='read'/>"
-/* <-- Test purpose */
                "<signal name='IpConflicted'>"
                "</signal>"
                "<signal name='ConnectionsChanged'>"
@@ -220,19 +216,9 @@ static const gchar inm_manager_introspection_xml[] = {
 static const gchar inm_wifi_introspection_xml[] = {
        "<node>"
                "<interface name='net.inm_manager.wifi'>"
-                       "<method name='GetConnectedAp'>"
-                               "<arg type='a{sv}' name='ap' direction='out'/>"
-                       "</method>"
-                       "<method name='GetFoundAps'>"
-                               "<arg type='a(oa{sv})' name='connections' direction='out'/>"
-                       "</method>"
                        "<method name='GetScanState'>"
                                "<arg type='b' name='scan_state' direction='out'/>"
                        "</method>"
-/* Test purpose --> */
-                       "<property type='b' name='WritingAlwaysThrowsError' access='readwrite'/>"
-                       "<property type='b' name='ReadingAlwaysThrowsError' access='read'/>"
-/* <-- Test purpose */
                "</interface>"
        "</node>"
 };
@@ -273,10 +259,6 @@ static const gchar inm_conn_introspection_xml[] = {
                        "<property type='s' name='DisconnectReason' access='read'/>"
                        "<property type='s' name='AssocStatus' access='read'/>"
                        "<property type='s' name='Vsie' access='read'/>"
-/* Test purpose --> */
-                       "<property type='b' name='WritingAlwaysThrowsError' access='readwrite'/>"
-                       "<property type='b' name='ReadingAlwaysThrowsError' access='read'/>"
-/* <-- Test purpose */
                "</interface>"
        "</node>"
 };
@@ -1207,57 +1189,6 @@ static void __daemon_method_call(GDBusConnection *connection,
                __handle_reacher_is_running(parameters, invocation);
 }
 
-static inline GVariant *__get_reading_error(const gchar *sender, GError **error)
-{
-       __INM_FUNC_ENTER__;
-       inm_error_set_gerror(INM_MANAGER_ERROR_OPERATION_FAILED, error);
-       __INM_FUNC_EXIT__;
-       return NULL;
-}
-
-static GVariant *__daemon_get_property(GDBusConnection *connection,
-               const gchar *sender,
-               const gchar *object_path,
-               const gchar *interface_name,
-               const gchar *property_name,
-               GError **error,
-               gpointer user_data)
-{
-       GVariant *ret = NULL;
-       ret = NULL;
-
-       if (g_strcmp0(property_name, "ReadingAlwaysThrowsError") == 0)
-               ret = __get_reading_error(sender, error);
-
-       return ret;
-}
-
-static inline void __set_writing_error(const gchar *sender,
-               const gchar *object_path,
-               const gchar *interface_name,
-               GVariant *value,
-               GError **error)
-{
-       __INM_FUNC_ENTER__;
-       inm_error_set_gerror(INM_MANAGER_ERROR_NOT_PERMITTED, error);
-       __INM_FUNC_EXIT__;
-}
-
-static gboolean __daemon_set_property(GDBusConnection *connection,
-               const gchar *sender,
-               const gchar *object_path,
-               const gchar *interface_name,
-               const gchar *property_name,
-               GVariant *value,
-               GError **error,
-               gpointer user_data)
-{
-       if (g_strcmp0(property_name, "WritingAlwaysThrowsError") == 0)
-               __set_writing_error(sender, object_path, interface_name, value, error);
-
-       return *error == NULL;
-}
-
 void inm_gdbus_emit_ip_conflicted(int state, gchar *if_name, gchar *ip)
 {
        GError *error = NULL;
@@ -1791,7 +1722,6 @@ static inline void __emit_conn_signal(const gchar *property,
 
        g_variant_builder_unref(builder);
        __INM_FUNC_EXIT__;
-
 }
 
 void inm_gdbus_emit_conn_ipv4_state_changed(gchar *path, GVariant *signal_args)
@@ -1852,40 +1782,6 @@ void inm_gdbus_emit_wifi_scanning_changed(gboolean scanning)
        __INM_FUNC_EXIT__;
 }
 
-static inline void __handle_get_connected_ap(GVariant *parameters,
-               GDBusMethodInvocation *invocation)
-{
-       /* TODO get & return real Wi-Fi connected AP */
-       GVariant *arg = NULL;
-       GVariantBuilder *builder = NULL;
-
-       __INM_FUNC_ENTER__;
-       builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
-       arg = g_variant_new("(a{sv})", builder);
-       g_variant_builder_unref(builder);
-
-       DEBUG_G_VARIANT("Sending = ", arg);
-       g_dbus_method_invocation_return_value(invocation, arg);
-       __INM_FUNC_EXIT__;
-}
-
-static inline void __handle_get_found_aps(GVariant *parameters,
-               GDBusMethodInvocation *invocation)
-{
-       /* TODO get real Wi-Fi Found AP */
-       GVariant *arg = NULL;
-       GVariantBuilder *builder = NULL;
-
-       __INM_FUNC_ENTER__;
-       builder = g_variant_builder_new(G_VARIANT_TYPE("a(oa{sv})"));
-       arg = g_variant_new("(a(oa{sv}))", builder);
-       g_variant_builder_unref(builder);
-
-       DEBUG_G_VARIANT("Sending = ", arg);
-       g_dbus_method_invocation_return_value(invocation, arg);
-       __INM_FUNC_EXIT__;
-}
-
 static inline void __handle_get_scan_state(GVariant *parameters,
                GDBusMethodInvocation *invocation)
 {
@@ -1917,46 +1813,10 @@ static void __wifi_method_call(GDBusConnection *connection,
                GDBusMethodInvocation *invocation,
                gpointer user_data)
 {
-       if (g_strcmp0(method_name, "GetConnectedAp") == 0)
-               __handle_get_connected_ap(parameters, invocation);
-       else if (g_strcmp0(method_name, "GetFoundAps") == 0)
-               __handle_get_found_aps(parameters, invocation);
-       else if (g_strcmp0(method_name, "GetScanState") == 0)
+       if (g_strcmp0(method_name, "GetScanState") == 0)
                __handle_get_scan_state(parameters, invocation);
 }
 
-static GVariant *__wifi_get_property(GDBusConnection *connection,
-               const gchar *sender,
-               const gchar *object_path,
-               const gchar *interface_name,
-               const gchar *property_name,
-               GError **error,
-               gpointer user_data)
-{
-       GVariant *ret;
-       ret = NULL;
-
-       if (g_strcmp0(property_name, "ReadingAlwaysThrowsError") == 0)
-               ret = __get_reading_error(sender, error);
-
-       return ret;
-}
-
-static gboolean __wifi_set_property(GDBusConnection *connection,
-                                      const gchar *sender,
-                                      const gchar *object_path,
-                                      const gchar *interface_name,
-                                      const gchar *property_name,
-                                      GVariant *value,
-                                      GError **error,
-                                      gpointer user_data)
-{
-       if (g_strcmp0(property_name, "WritingAlwaysThrowsError") == 0)
-               __set_writing_error(sender, object_path, interface_name, value, error);
-
-       return *error == NULL;
-}
-
 static inline void __handle_conn_get_all(gpointer user_data,
                GVariant *parameters,
                GDBusMethodInvocation *invocation)
@@ -1993,13 +1853,13 @@ static void __conn_method_call(GDBusConnection *connection,
 
 GDBusInterfaceVTable __daemon_iface_vtbl = {
                __daemon_method_call,
-               __daemon_get_property,
-               __daemon_set_property};
+               NULL,
+               NULL};
 
 GDBusInterfaceVTable __wifi_iface_vtbl = {
                __wifi_method_call,
-               __wifi_get_property,
-               __wifi_set_property};
+               NULL,
+               NULL};
 
 GDBusInterfaceVTable inm_conn_iface_vtbl = {
                __conn_method_call,