aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.in6
-rw-r--r--configure.in17
-rw-r--r--lib/libUPnP/Makefile.in2
-rw-r--r--xbmc/Application.cpp6
-rw-r--r--xbmc/filesystem/FileFactory.cpp4
-rw-r--r--xbmc/filesystem/Makefile.in8
-rw-r--r--xbmc/filesystem/UPnPDirectory.cpp2
-rw-r--r--xbmc/network/Makefile.in10
-rw-r--r--xbmc/network/upnp/Makefile.in19
-rw-r--r--xbmc/network/upnp/UPnP.cpp (renamed from xbmc/network/UPnP.cpp)2
-rw-r--r--xbmc/network/upnp/UPnP.h (renamed from xbmc/network/UPnP.h)0
-rw-r--r--xbmc/system.h5
13 files changed, 64 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 0e86dfe296..e65c83c475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1156,6 +1156,7 @@ lib/cmyth/Makefile
# /xbmc/network/
/xbmc/network/Makefile
+/xbmc/network/upnp/Makefile
/lib/python/Makefile
/lib/python/Include/pyconfig.h
diff --git a/Makefile.in b/Makefile.in
index 352266e270..fb80df6313 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,7 +22,6 @@ DVDPLAYER_ARCHIVES=xbmc/cores/dvdplayer/DVDPlayer.a \
DIRECTORY_ARCHIVES=$(DVDPLAYER_ARCHIVES) \
lib/SlingboxLib/SlingboxLib.a \
lib/libRTV/librtv.a \
- lib/libUPnP/libupnp.a \
lib/libXDAAP/libxdaap.a \
lib/libhts/libhts.a \
lib/libsquish/libsquish.a \
@@ -108,6 +107,11 @@ DIRECTORY_ARCHIVES += xbmc/windowing/egl/windowing_egl.a
DIRECTORY_ARCHIVES += xbmc/visualizations/EGLHelpers/eglhelpers.a
endif
+ifeq (@USE_UPNP@,1)
+DIRECTORY_ARCHIVES += lib/libUPnP/libupnp.a \
+ xbmc/network/upnp/upnp.a
+endif
+
ifeq ($(findstring osx,@ARCH@),osx)
DIRECTORY_ARCHIVES += xbmc/osx/osx.a
DIRECTORY_ARCHIVES += xbmc/network/osx/network.a
diff --git a/configure.in b/configure.in
index fdcef0e05e..e8cc72b979 100644
--- a/configure.in
+++ b/configure.in
@@ -367,6 +367,12 @@ AC_ARG_ENABLE([airtunes],
[use_airtunes=$enableval],
[use_airtunes=auto])
+AC_ARG_ENABLE([upnp],
+ [AS_HELP_STRING([--disable-upnp],
+ [disable UPnP support (default is enabled)])],
+ [use_upnp=$enableval],
+ [use_upnp=yes])
+
AC_ARG_ENABLE([ffmpeg_libvorbis],
[AS_HELP_STRING([--enable-ffmpeg-libvorbis],
[enable FFmpeg vorbis encoding (default is no)])],
@@ -2134,6 +2140,15 @@ else
final_message="$final_message\n AirTunes support:\tNo"
fi
+if test "x$use_upnp" != "xno"; then
+ final_message="$final_message\n UPnP support:\t\tYes"
+ USE_UPNP=1
+ AC_DEFINE([USE_UPNP], [1], [Define to 1 to enable UPnP support.])
+else
+ USE_UPNP=0
+ final_message="$final_message\n UPnP support:\t\tNo"
+fi
+
if test "$use_optical_drive" = "yes"; then
final_message="$final_message\n Optical drive:\tYes"
else
@@ -2244,6 +2259,7 @@ OUTPUT_FILES="Makefile \
xbmc/guilib/Makefile \
xbmc/interfaces/Makefile \
xbmc/network/Makefile \
+ xbmc/network/upnp/Makefile \
lib/libRTV/Makefile \
lib/libexif/Makefile \
lib/libXDAAP/Makefile \
@@ -2342,6 +2358,7 @@ AC_SUBST(USE_LIBCEC)
AC_SUBST(USE_CEC_RPI_API)
AC_SUBST(USE_MYSQL)
AC_SUBST(USE_WEB_SERVER)
+AC_SUBST(USE_UPNP)
AC_SUBST(USE_ANDROID)
AC_SUBST(GTEST_CONFIGURED)
diff --git a/lib/libUPnP/Makefile.in b/lib/libUPnP/Makefile.in
index 2fcd3d4e9a..e1f94622a0 100644
--- a/lib/libUPnP/Makefile.in
+++ b/lib/libUPnP/Makefile.in
@@ -1,5 +1,6 @@
ARCH=@ARCH@
+ifeq (@USE_UPNP@, 1)
SRCS= Platinum/Source/Core/PltAction.cpp \
Platinum/Source/Core/PltArgument.cpp \
Platinum/Source/Core/PltConstants.cpp \
@@ -93,3 +94,4 @@ LIB=libupnp.a
include ../../Makefile.include
-include $(filter %.P, $(OBJS:.o=.P))
+endif
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index f0411b4731..1359514cce 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -118,7 +118,7 @@
#include "filesystem/FileDAAP.h"
#endif
#ifdef HAS_UPNP
-#include "network/UPnP.h"
+#include "network/upnp/UPnP.h"
#include "filesystem/UPnPDirectory.h"
#endif
#if defined(_LINUX) && defined(HAS_FILESYSTEM_SMB)
@@ -4032,6 +4032,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
return false;
}
+#ifdef HAS_UPNP
if (URIUtils::IsUPnP(item.GetPath()))
{
CFileItem item_new(item);
@@ -4039,6 +4040,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
return PlayFile(item_new, false);
return false;
}
+#endif
// if we have a stacked set of files, we need to setup our stack routines for
// "seamless" seeking and total time of the movie etc.
@@ -5352,8 +5354,10 @@ void CApplication::ProcessSlow()
#endif
// update upnp server/renderer states
+#ifdef HAS_UPNP
if(UPNP::CUPnP::IsInstantiated())
UPNP::CUPnP::GetInstance()->UpdateState();
+#endif
//Check to see if current playing Title has changed and whether we should broadcast the fact
CheckForTitleChange();
diff --git a/xbmc/filesystem/FileFactory.cpp b/xbmc/filesystem/FileFactory.cpp
index 6ee61eb325..c87deb54ce 100644
--- a/xbmc/filesystem/FileFactory.cpp
+++ b/xbmc/filesystem/FileFactory.cpp
@@ -77,7 +77,9 @@
#if defined(TARGET_ANDROID)
#include "AndroidAppFile.h"
#endif
+#ifdef HAS_UPNP
#include "UPnPFile.h"
+#endif
#include "PipesManager.h"
#include "PipeFile.h"
#include "MusicDatabaseFile.h"
@@ -191,7 +193,9 @@ IFile* CFileFactory::CreateLoader(const CURL& url)
else if (strProtocol == "afp") return new CAFPFile();
#endif
else if (strProtocol == "pipe") return new CPipeFile();
+#ifdef HAS_UPNP
else if (strProtocol == "upnp") return new CUPnPFile();
+#endif
#if defined(TARGET_ANDROID)
else if (strProtocol == "androidapp") return new CFileAndroidApp();
#endif
diff --git a/xbmc/filesystem/Makefile.in b/xbmc/filesystem/Makefile.in
index 3d7c3613fc..060f61fc6f 100644
--- a/xbmc/filesystem/Makefile.in
+++ b/xbmc/filesystem/Makefile.in
@@ -52,7 +52,6 @@ SRCS=AddonsDirectory.cpp \
MythDirectory.cpp \
MythFile.cpp \
MythSession.cpp \
- NptXbmcFile.cpp \
NSFFileDirectory.cpp \
OGGFileDirectory.cpp \
PlaylistDirectory.cpp \
@@ -84,8 +83,6 @@ SRCS=AddonsDirectory.cpp \
udf25.cpp \
UDFDirectory.cpp \
UDFFile.cpp \
- UPnPDirectory.cpp \
- UPnPFile.cpp \
VideoDatabaseDirectory.cpp \
VirtualDirectory.cpp \
VTPDirectory.cpp \
@@ -126,6 +123,10 @@ ifeq (@HAVE_LIBBLURAY@,1)
SRCS+=BlurayDirectory.cpp
endif
+ifeq (@USE_UPNP@,1)
+SRCS+=NptXbmcFile.cpp \
+ UPnPDirectory.cpp \
+ UPnPFile.cpp
INCLUDES+=-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Core \
-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Platinum \
-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaConnect \
@@ -134,6 +135,7 @@ INCLUDES+=-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Core \
-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Extras \
-I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/System/Posix \
-I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/Core
+endif
LIB=filesystem.a
diff --git a/xbmc/filesystem/UPnPDirectory.cpp b/xbmc/filesystem/UPnPDirectory.cpp
index 293ac605f2..798504b871 100644
--- a/xbmc/filesystem/UPnPDirectory.cpp
+++ b/xbmc/filesystem/UPnPDirectory.cpp
@@ -22,7 +22,7 @@
#include "UPnPDirectory.h"
#include "URL.h"
-#include "network/UPnP.h"
+#include "network/upnp/UPnP.h"
#include "Platinum.h"
#include "PltSyncMediaBrowser.h"
#include "video/VideoInfoTag.h"
diff --git a/xbmc/network/Makefile.in b/xbmc/network/Makefile.in
index faaa445704..a0456143d4 100644
--- a/xbmc/network/Makefile.in
+++ b/xbmc/network/Makefile.in
@@ -1,12 +1,3 @@
-INCLUDES+=-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Core \
- -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Platinum \
- -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaConnect \
- -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaRenderer \
- -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaServer \
- -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Extras \
- -I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/System/Posix \
- -I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/Core
-
SRCS=cddb.cpp \
DNSNameCache.cpp \
EventClient.cpp \
@@ -18,7 +9,6 @@ SRCS=cddb.cpp \
Socket.cpp \
TCPServer.cpp \
UdpClient.cpp \
- UPnP.cpp \
WebServer.cpp \
ZeroconfBrowser.cpp \
Zeroconf.cpp \
diff --git a/xbmc/network/upnp/Makefile.in b/xbmc/network/upnp/Makefile.in
new file mode 100644
index 0000000000..909e633160
--- /dev/null
+++ b/xbmc/network/upnp/Makefile.in
@@ -0,0 +1,19 @@
+ifeq (@USE_UPNP@, 1)
+INCLUDES+=-I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Core \
+ -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Platinum \
+ -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaConnect \
+ -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaRenderer \
+ -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Devices/MediaServer \
+ -I@abs_top_srcdir@/lib/libUPnP/Platinum/Source/Extras \
+ -I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/System/Posix \
+ -I@abs_top_srcdir@/lib/libUPnP/Neptune/Source/Core
+
+SRCS= UPnP.cpp
+
+LIB=upnp.a
+
+include @abs_top_srcdir@/Makefile.include
+-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
+
+endif
+
diff --git a/xbmc/network/UPnP.cpp b/xbmc/network/upnp/UPnP.cpp
index d5ee930b41..14ca92396a 100644
--- a/xbmc/network/UPnP.cpp
+++ b/xbmc/network/upnp/UPnP.cpp
@@ -25,7 +25,7 @@
#include "utils/URIUtils.h"
#include "Application.h"
#include "ApplicationMessenger.h"
-#include "Network.h"
+#include "network/Network.h"
#include "utils/log.h"
#include "filesystem/MusicDatabaseDirectory.h"
#include "filesystem/VideoDatabaseDirectory.h"
diff --git a/xbmc/network/UPnP.h b/xbmc/network/upnp/UPnP.h
index aaa7197057..aaa7197057 100644
--- a/xbmc/network/UPnP.h
+++ b/xbmc/network/upnp/UPnP.h
diff --git a/xbmc/system.h b/xbmc/system.h
index b05b545979..0f55a43b4d 100644
--- a/xbmc/system.h
+++ b/xbmc/system.h
@@ -36,7 +36,6 @@
#define HAS_SCREENSAVER
#define HAS_PYTHON
#define HAS_SYSINFO
-#define HAS_UPNP
#define HAS_VIDEO_PLAYBACK
#define HAS_VISUALISATION
#define HAS_PVRCLIENTS
@@ -85,6 +84,10 @@
#define HAS_MYSQL
#endif
+#if defined(USE_UPNP)
+ #define HAS_UPNP
+#endif
+
/**********************
* Non-free Components
**********************/