Remove the marshal generation code.

Starting from GLib version 2.29.12, it's not required to provide a
marshaller function when receiving and sending signals over DBus since
the default works with all the basic types.

This was introduced in the following changes in GLib:

 * https://git.gnome.org/browse/glib/commit/?id=88ab35f3cb6127036361e421987a127bddb989c8
 * https://git.gnome.org/browse/glib/commit/?id=fa2861e3b6109e002b68aa105b5ecbcba88724c1

BUG=None
TEST=unittest and manual test.

Manual test procedure:
* update_engine_client sends the method request for updating and gets
  the signal sent by update_engine on dbus_service.cc

Change-Id: Id13b45cb4191dcfb9cab371b82bb589c132c7e09
Reviewed-on: https://chromium-review.googlesource.com/186384
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/.gitignore b/.gitignore
index e22ca50..9976a46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,8 +17,6 @@
 /app.info
 /delta_generator
 /html/
-/marshal.glibmarshal.c
-/marshal.glibmarshal.h
 /test_http_server
 /update_engine
 /update_engine.dbusclient.h
diff --git a/SConstruct b/SConstruct
index 5d47bf5..489f956 100644
--- a/SConstruct
+++ b/SConstruct
@@ -79,46 +79,6 @@
                                 single_source = 1,
                                 suffix = 'dbusclient.h')
 
-def GlibMarshalEmitter(target, source, env):
-  """ Inputs:
-          target: unused
-          source: list containing the source .list file
-          env: the scons environment in which we are compiling
-      Outputs:
-          target: the list of targets we'll emit
-          source: the list of sources we'll process"""
-  output = str(source[0])
-  output = output[0:output.rfind('.list')]
-  target = [
-    output + '.glibmarshal.c',
-    output + '.glibmarshal.h'
-  ]
-  return target, source
-
-def GlibMarshalGenerator(source, target, env, for_signature):
-  """ Inputs:
-          source: list of sources to process
-          target: list of targets to generate
-          env: scons environment in which we are working
-          for_signature: unused
-      Outputs: a list of commands to execute to generate the targets from
-               the sources."""
-  commands = []
-  for target_file in target:
-    if str(target_file).endswith('.glibmarshal.h'):
-      mode_flag = '--header '
-    else:
-      mode_flag = '--body '
-    cmd = '/usr/bin/glib-genmarshal %s --prefix=update_engine ' \
-          '%s > %s' % (mode_flag, str(source[0]), str(target_file))
-    commands.append(cmd)
-  return commands
-
-glib_marshal_builder = Builder(generator = GlibMarshalGenerator,
-                               emitter = GlibMarshalEmitter,
-                               single_source = 1,
-                               suffix = 'glibmarshal.c')
-
 # Public key generation
 def PublicKeyEmitter(target, source, env):
   """ Inputs:
@@ -214,7 +174,6 @@
 env['CPPPATH'] = ['..']
 env['BUILDERS']['ProtocolBuffer'] = proto_builder
 env['BUILDERS']['DbusBindings'] = dbus_bindings_builder
-env['BUILDERS']['GlibMarshal'] = glib_marshal_builder
 env['BUILDERS']['PublicKey'] = public_key_builder
 
 # Fix issue with scons not passing pkg-config vars through the environment.
@@ -233,8 +192,6 @@
 
 env.DbusBindings('update_engine.dbusclient.h', 'update_engine.xml')
 
-env.GlibMarshal('marshal.glibmarshal.c', 'marshal.list')
-
 if ARGUMENTS.get('debug', 0):
   env['CCFLAGS'] += ['-fprofile-arcs', '-ftest-coverage']
   env['LIBS'] += ['bz2', 'gcov']
@@ -268,7 +225,6 @@
                    hwid_override.cc
                    install_plan.cc
                    libcurl_http_fetcher.cc
-                   marshal.glibmarshal.c
                    metadata.cc
                    multi_range_http_fetcher.cc
                    omaha_hash_calculator.cc
@@ -362,10 +318,9 @@
 for source in all_sources:
   if source.endswith('_unittest.cc'):
     env.Depends(source, 'unittest_key.pub.pem')
-  if source.endswith('.glibmarshal.c') or source.endswith('.pb.cc'):
+  if source.endswith('.pb.cc'):
     continue
   env.Depends(source, 'update_metadata.pb.cc')
-  env.Depends(source, 'marshal.glibmarshal.c')
   env.Depends(source, 'update_engine.dbusclient.h')
 
 update_engine_core = env.Library('update_engine_core', sources)
diff --git a/dbus_service.cc b/dbus_service.cc
index cbfdc17..f75823c 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -14,7 +14,6 @@
 #include "update_engine/connection_manager.h"
 #include "update_engine/dbus_constants.h"
 #include "update_engine/hardware_interface.h"
-#include "update_engine/marshal.glibmarshal.h"
 #include "update_engine/omaha_request_params.h"
 #include "update_engine/p2p_manager.h"
 #include "update_engine/prefs.h"
@@ -100,7 +99,7 @@
       0,  // 0 == no class method associated
       NULL,  // Accumulator
       NULL,  // Accumulator data
-      update_engine_VOID__INT64_DOUBLE_STRING_STRING_INT64,
+      NULL,  // Marshaller
       G_TYPE_NONE,  // Return type
       5,  // param count:
       G_TYPE_INT64,
diff --git a/marshal.list b/marshal.list
deleted file mode 100644
index 9dce1bd..0000000
--- a/marshal.list
+++ /dev/null
@@ -1 +0,0 @@
-VOID:INT64,DOUBLE,STRING,STRING,INT64
diff --git a/update_engine_client.cc b/update_engine_client.cc
index f91c201..fc06da2 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -8,7 +8,6 @@
 #include <gflags/gflags.h>
 #include <glib.h>
 
-#include "update_engine/marshal.glibmarshal.h"
 #include "update_engine/dbus_constants.h"
 #include "update_engine/subprocess.h"
 #include "update_engine/utils.h"
@@ -166,7 +165,7 @@
 
   // Register marshaller
   dbus_g_object_register_marshaller(
-      update_engine_VOID__INT64_DOUBLE_STRING_STRING_INT64,
+      NULL,
       G_TYPE_NONE,
       G_TYPE_INT64,
       G_TYPE_DOUBLE,