Modify gobi-cromo-plugin to work with Platform2
BUG=chromium:220003
TEST=Run ALL the trybots
CQ-DEPEND=CL:56290
Change-Id: Ib8749db0399ba36a724ce89de8262799a6c43378
Reviewed-on: https://chromium-review.googlesource.com/169350
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Queue: Liam McLoughlin <lmcloughlin@chromium.org>
diff --git a/Makefile b/Makefile
index aa0e7eb..9656d23 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@
PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
CPPFLAGS += $(PC_CFLAGS)
+CPPFLAGS += -I.
CXXFLAGS += -fPIC -Wall -Werror -g
LDLIBS += -lGobiConnectionMgmt -lGobiImageMgmt -lpthread -lrt \
-ludev -lmetrics -lgobi3k $(PC_LIBS)
@@ -24,7 +25,8 @@
GOBI_PLUGIN = gobi.so
-GLUE_HEADERS = modem_gobi_server_glue.h
+GLUE_HEADERS = modem_gobi_server_glue.h \
+ dbus_adaptors/org.freedesktop.ModemManager.h
TESTS = gobi_sdk_wrapper_unittest \
gobi_handle_test \
@@ -77,6 +79,11 @@
%_server_glue.h: %.xml
$(DBUSXX_XML2CPP) $^ --adaptor=$@
+dbus_adaptors/%.h: \
+ $(SYSROOT)/usr/share/dbus-1/interfaces/%.xml
+ mkdir -p dbus_adaptors
+ $(DBUSXX_XML2CPP) $^ --adaptor=$@
+
install : $(INSTALL_TARGETS)
install-production:
diff --git a/gobi_cdma_modem.h b/gobi_cdma_modem.h
index ffff34a..0543c5b 100644
--- a/gobi_cdma_modem.h
+++ b/gobi_cdma_modem.h
@@ -9,7 +9,7 @@
#include "gobi_modem.h"
#include <base/file_path.h>
-#include <cromo/modem-cdma_server_glue.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Cdma.h>
class GobiModem;
diff --git a/gobi_gsm_modem.h b/gobi_gsm_modem.h
index e9f1d65..a8fcbfe 100644
--- a/gobi_gsm_modem.h
+++ b/gobi_gsm_modem.h
@@ -8,10 +8,10 @@
#define PLUGIN_GOBI_GSM_MODEM_H_
#include "gobi_modem.h"
-#include <cromo/modem-gsm_server_glue.h>
-#include <cromo/modem-gsm-card_server_glue.h>
-#include <cromo/modem-gsm-network_server_glue.h>
-#include <cromo/modem-gsm-sms_server_glue.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Gsm.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Gsm.Card.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Gsm.Network.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Gsm.SMS.h>
#include <cromo/sms_cache.h>
class GobiModem;
diff --git a/gobi_modem.h b/gobi_modem.h
index 42c9721..0e8f0da 100644
--- a/gobi_modem.h
+++ b/gobi_modem.h
@@ -17,10 +17,10 @@
#include <set>
#include <cromo/cromo_server.h>
+#include <cromo/dbus_adaptors/org.freedesktop.DBus.Properties.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.h>
+#include <cromo/dbus_adaptors/org.freedesktop.ModemManager.Modem.Simple.h>
#include <cromo/modem.h>
-#include <cromo/modem_server_glue.h>
-#include <cromo/modem-simple_server_glue.h>
-#include <cromo/properties_server_glue.h>
#include <cromo/utilities.h>
#include <metrics/metrics_library.h>
#include <mm/mm-modem.h>