aboutsummaryrefslogtreecommitdiff
path: root/backends/networking/connection
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-19 18:43:00 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commita13e03e988f85a67366f2ffe39bae67576e425bc (patch)
tree5c41114e9bc54ca203877c76d48bb245d1b653c0 /backends/networking/connection
parent0c1c274abdbdb4183d9a08669082227aa912b1ea (diff)
downloadscummvm-rg350-a13e03e988f85a67366f2ffe39bae67576e425bc.tar.gz
scummvm-rg350-a13e03e988f85a67366f2ffe39bae67576e425bc.tar.bz2
scummvm-rg350-a13e03e988f85a67366f2ffe39bae67576e425bc.zip
CLOUD: Add Networking::Connection::isLimited()
`false` everywhere by default, but works on Android (`true` if not Wi-Fi).
Diffstat (limited to 'backends/networking/connection')
-rw-r--r--backends/networking/connection/islimited-android.cpp35
-rw-r--r--backends/networking/connection/islimited-default.cpp36
-rw-r--r--backends/networking/connection/islimited.h34
3 files changed, 105 insertions, 0 deletions
diff --git a/backends/networking/connection/islimited-android.cpp b/backends/networking/connection/islimited-android.cpp
new file mode 100644
index 0000000000..8989f218ec
--- /dev/null
+++ b/backends/networking/connection/islimited-android.cpp
@@ -0,0 +1,35 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "backends/networking/connection/islimited.h"
+#include "backends/platform/android/jni.h"
+
+namespace Networking {
+namespace Connection {
+
+bool isLimited() {
+ return JNI::isConnectionLimited();
+}
+
+} // End of namespace Connection
+} // End of namespace Networking
+
diff --git a/backends/networking/connection/islimited-default.cpp b/backends/networking/connection/islimited-default.cpp
new file mode 100644
index 0000000000..a993077fff
--- /dev/null
+++ b/backends/networking/connection/islimited-default.cpp
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "backends/networking/connection/islimited.h"
+#include "common/textconsole.h"
+
+namespace Networking {
+namespace Connection {
+
+bool isLimited() {
+ warning("Networking::Connection::isLimited(): not limited by default");
+ return false;
+}
+
+} // End of namespace Connection
+} // End of namespace Networking
+
diff --git a/backends/networking/connection/islimited.h b/backends/networking/connection/islimited.h
new file mode 100644
index 0000000000..69be26701c
--- /dev/null
+++ b/backends/networking/connection/islimited.h
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef NETWORKING_CONNECTION_ISLIMITED_H
+#define NETWORKING_CONNECTION_ISLIMITED_H
+
+namespace Networking {
+namespace Connection {
+
+bool isLimited();
+
+} // End of namespace Connection
+} // End of namespace Networking
+
+#endif /*NETWORKING_CONNECTION_ISLIMITED_H*/