├── NEWS ├── std └── av │ ├── NEWS │ ├── README │ ├── lib │ ├── Makefile.am │ ├── win32 │ │ ├── vc60 │ │ │ ├── libclinkmedia.dsp │ │ │ └── libclinkmedia.dsw │ │ ├── vs2005 │ │ │ └── libclinkmedia.vcproj │ │ └── vs2008 │ │ │ ├── CyberLinkCAV.vcproj │ │ │ └── CyberLinkCAV.sln │ ├── wince │ │ └── vs2005 │ │ │ └── libclinkmedia.vcproj │ └── unix │ │ └── Makefile.am │ ├── Makefile.am │ ├── sample │ ├── upnpavdump │ │ ├── Makefile.am │ │ ├── unix │ │ │ └── Makefile.am │ │ └── macosx │ │ │ └── xcode30 │ │ │ └── upnpavdump.m │ ├── upnpavserver │ │ ├── Makefile.am │ │ ├── filesystem │ │ │ ├── Makefile.am │ │ │ ├── wince │ │ │ │ └── vs2005 │ │ │ │ │ ├── COptionDialog.h │ │ │ │ │ ├── COptionDialog.cpp │ │ │ │ │ ├── CDmsMobilePhotoppc.rc │ │ │ │ │ ├── CDmsMobilePhoto.vcproj │ │ │ │ │ ├── res │ │ │ │ │ ├── CDmsMobilePhoto.ico │ │ │ │ │ ├── CDmsMobilePhotoDoc.ico │ │ │ │ │ ├── CDmsMobilePhotosp.rc2 │ │ │ │ │ └── CDmsMobilePhotoppc.rc2 │ │ │ │ │ ├── stdafx.cpp │ │ │ │ │ ├── Resourcesp.h │ │ │ │ │ ├── CDmsMobilePhotoDoc.h │ │ │ │ │ ├── MainFrm.h │ │ │ │ │ ├── resourceppc.h │ │ │ │ │ ├── CDmsMobilePhotoView.h │ │ │ │ │ ├── CDmsMobilePhotoDoc.cpp │ │ │ │ │ └── CDmsMobilePhoto.h │ │ │ ├── win32 │ │ │ │ └── console │ │ │ │ │ ├── vc60 │ │ │ │ │ ├── cdms_filesys_console.dsp │ │ │ │ │ └── cdms_filesys_console.dsw │ │ │ │ │ └── vs2005 │ │ │ │ │ └── cdms_filesys_console.vcproj │ │ │ └── unix │ │ │ │ └── Makefile.am │ │ └── youtube │ │ │ ├── win32 │ │ │ └── vs2005 │ │ │ │ ├── CDmsYoutube.rc │ │ │ │ ├── CDmsYoutube.vcproj │ │ │ │ ├── res │ │ │ │ ├── CDmsYoutube.ico │ │ │ │ └── CDmsYoutube.rc2 │ │ │ │ ├── stdafx.cpp │ │ │ │ ├── CDmsYoutube.sln │ │ │ │ ├── CDmsYoutube.h │ │ │ │ ├── CDmsYoutubeDlg.h │ │ │ │ ├── Resource.h │ │ │ │ └── stdafx.h │ │ │ └── License │ ├── upnpavplayer │ │ └── macosx │ │ │ └── xcode30 │ │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── MainMenu.nib │ │ │ │ └── keyedobjects.nib │ │ │ ├── upnpavplayer_Prefix.pch │ │ │ ├── main.m │ │ │ ├── DLNAAudioView.h │ │ │ ├── DLNAImageView.h │ │ │ ├── DLNAMovieView.h │ │ │ ├── DLNAAudioView.m │ │ │ ├── DLNAImageView.m │ │ │ ├── DLNAMovieView.m │ │ │ ├── Info.plist │ │ │ └── DLNAController.h │ ├── Makefile.am │ └── common │ │ ├── crss.h │ │ ├── ckeyboard.h │ │ ├── cwebservice.h │ │ └── ckeyboard.c │ ├── configure_macports │ ├── testunit │ ├── win32 │ │ └── vs2008 │ │ │ └── ClinkAVTestCase.vcproj │ ├── macosx │ │ ├── xcode30 │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── MainMenu.nib │ │ │ │ │ └── keyedobjects.nib │ │ │ ├── ClinkAVTestUnit_Prefix.pch │ │ │ ├── main.m │ │ │ ├── ClinkAVTestUnitBundle-Info.plist │ │ │ └── Info.plist │ │ └── ClinkAVUnitTest.h │ ├── ClinkAVTestCase.cpp │ ├── ClinkAVTestCase.h │ ├── cppunitmain.cpp │ └── ClinkAVTestCaseRenderer.cpp │ ├── wrapper │ └── objc │ │ └── CyberLink │ │ ├── CGUpnpAvConstants.h │ │ ├── CGXml.h │ │ ├── CGUpnpAvRoot.h │ │ ├── UPnPAV.h │ │ ├── CGUpnpAVPositionInfo.h │ │ ├── CGUpnpAvContentManager.h │ │ ├── CGUpnpAvContentDirectory.h │ │ ├── CGXml.m │ │ ├── CGUpnpAvRoot.m │ │ ├── CGUpnpAvContentManager.m │ │ ├── CGUpnpAvRenderer.h │ │ ├── CGUpnpAvContainer.h │ │ ├── CGUpnpAvContentDirectory.m │ │ ├── CGXmlNode.h │ │ ├── CGUpnpAvResource.h │ │ ├── CGUpnpAvController.h │ │ └── CGUpnpAvObject.h │ ├── bootstrap │ ├── src │ └── cybergarage │ │ └── upnp │ │ └── std │ │ └── av │ │ ├── ccontent_list.c │ │ ├── cresource_list.c │ │ ├── cresource_data.c │ │ ├── cprotocolinfo_list.c │ │ └── cdidl.c │ ├── include │ ├── Makefile.am │ └── cybergarage │ │ └── upnp │ │ └── std │ │ └── av │ │ ├── cmd5.h │ │ ├── cdidl.h │ │ └── cupnpav.h │ └── COPYING ├── debian ├── compat ├── docs ├── dirs ├── clinkcmaemo0.install ├── clinkc0.install ├── clinkc-dev.install └── control ├── lib ├── Makefile.am ├── win32 │ ├── vc60 │ │ ├── CyberLinkC.dsp │ │ └── CyberLinkC.dsw │ ├── vs2005 │ │ └── CyberLinkC.sln │ └── vs2008 │ │ └── CyberLinkC.sln ├── wince │ └── vs2005 │ │ └── CyberLinkC.vcproj ├── macosx │ └── xcode │ │ └── libmupnp.xcodeproj │ │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── unix │ └── Makefile.am.build ├── test ├── Makefile.am ├── win32 │ ├── vs2005 │ │ ├── ClinkTestCase.vcproj │ │ └── ClinkTestCase.sln │ └── vs2008 │ │ ├── ClinkTestCase.vcproj │ │ └── ClinkTestCase.sln ├── ClinkUnitTest.h ├── TestMain.cpp ├── UPnPFuncTest.cpp ├── ClinkUnitTest.m ├── unix │ ├── Makefile.am │ └── Makefile.am.build ├── TestDevice.h ├── StateVariableTest.cpp ├── XMLTest.cpp ├── DeviceTest.cpp ├── DictionaryTest.cpp ├── ControlPointTest.cpp └── NetworkTest.cpp ├── examples ├── clock │ ├── Makefile.am │ ├── win32 │ │ ├── vc60 │ │ │ ├── upnpclock.dsp │ │ │ ├── upnpclock.dsw │ │ │ └── images │ │ │ │ └── clock.jpg │ │ └── vs2005 │ │ │ ├── images │ │ │ └── clock.jpg │ │ │ ├── upnpclock.vcproj │ │ │ └── upnpclock.sln │ ├── tengine │ │ └── gnu │ │ │ └── configure │ ├── unix │ │ └── Makefile.am │ ├── clock_device.h │ └── clock.h ├── upnpavdump │ ├── Makefile.am │ ├── unix │ │ └── Makefile.am │ └── win32 │ │ └── vs2005 │ │ └── upnpavdump.sln ├── upnpdump │ ├── Makefile.am │ ├── win32 │ │ ├── vc60 │ │ │ ├── upnpdump.dsp │ │ │ └── upnpdump.dsw │ │ ├── vs2005 │ │ │ └── upnpdump.sln │ │ └── vs2008 │ │ │ └── upnpdump.sln │ ├── macosx │ │ └── xcode30 │ │ │ ├── upnpdump_Prefix.pch │ │ │ └── upnpdump.m │ ├── tengine │ │ └── gnu │ │ │ └── configure │ └── unix │ │ └── Makefile.am ├── upnpigddump │ ├── Makefile.am │ ├── unix │ │ └── Makefile.am │ └── win32 │ │ └── vs2005 │ │ └── upnpigddump.sln ├── Makefile.am ├── upnpbrowser │ └── ios │ │ ├── Resources │ │ ├── Icon.png │ │ ├── Icon@2x.png │ │ ├── LargeIcon.png │ │ └── icon_device.png │ │ ├── upnpbrowser.pch │ │ ├── Classes │ │ ├── UPnPDeviceTableViewCell.h │ │ ├── UPnPPresentationViewController.h │ │ ├── UPnPBrowserAppDelegate.h │ │ ├── UPnPDeviceViewController.h │ │ ├── UPnPTableViewCell.h │ │ ├── UPnPBrowserAppDelegate.m │ │ └── UPnPDeviceTableViewCell.m │ │ ├── main.m │ │ └── upnpbrowser.plist ├── upnpavchk │ └── win32 │ │ └── vs2008 │ │ ├── upnpavchk.vcproj │ │ └── upnpavchk.sln └── common │ ├── kb_util.h │ └── kb_util.c ├── configure_linux ├── include ├── mupnp │ ├── version.h.build │ ├── version.h │ ├── version.h.gen │ ├── upnp.h.in │ ├── upnp_limit.h │ └── typedef.h ├── Makefile.am.build └── Makefile.am ├── doc ├── img │ ├── upnpapp.png │ ├── mupnpc-device-notify.png │ ├── mupnpc-device-ports.png │ ├── mupnpc-device-description.png │ ├── mupnpc-example-regzatv-01.png │ ├── mupnpc-example-nokia770-01.jpg │ ├── mupnpc-objc-macosx-installer.jpg │ ├── mupnp-c-device-class-overview.png │ ├── mupnpc-example-vieraremote-01.gif │ ├── mupnpc-example-vieraremote-02.gif │ ├── mupnp-c-ctrlpoint-class-overview.png │ ├── mupnp-objc-ctrlpoint-class-overview.png │ ├── mupnp-c-device-class-overview.pu │ ├── mupnp-c-ctrlpoint-class-overview.pu │ └── mupnp-objc-ctrlpoint-class-overview.pu ├── mupnpcproguide.pdf ├── mupnpobjcproguide.pdf └── docs2md ├── wrapper └── objc │ ├── xcode │ ├── mUPnP4ObjC │ │ ├── en.lproj │ │ │ └── InfoPlist.strings │ │ ├── mUPnP4ObjC-Prefix.pch │ │ └── mUPnP4ObjC-Info.plist │ └── mUPnP4ObjCTests │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── mUPnP4ObjCTests-Info.plist │ │ └── mUPnP4ObjCTests.m │ └── mUPnP │ ├── CGUpnp.h │ ├── CGUpnpIcon.h │ ├── CGUpnpStateVariable.h │ ├── CGUpnpIcon.m │ └── CGUpnpAction.h ├── configure_macosx ├── .clang-format ├── mupnp.pc.in ├── bootstrap ├── clang-format ├── .vscode ├── launch.json └── tasks.json ├── snap └── snapcraft.yaml ├── .travis.yml ├── doxygen ├── .gitignore ├── .github └── workflows │ ├── make.yml │ └── doxygen.yml ├── AUTHORS ├── src └── mupnp │ ├── icon.c │ ├── ssdp │ ├── httpu_socket.c │ └── httpmu_socket.c │ ├── icon_list.c │ ├── xml │ ├── xml_parser.c │ └── xml_function.c │ ├── device_list.c │ ├── action_list.c │ ├── service_list.c │ ├── net │ ├── socket_list.c │ └── url.c │ ├── soap │ └── soap.c │ ├── argument.c │ ├── io │ └── file_list.c │ ├── servicestate_table.c │ ├── event │ └── property_list.c │ ├── util │ └── dictionary_elem.c │ ├── service_ssdp_server.c │ └── upnp_status.c ├── .clang-tidy ├── coverage └── Makefile.am /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /std/av/NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /std/av/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /debian/docs: -------------------------------------------------------------------------------- 1 | COPYING 2 | -------------------------------------------------------------------------------- /debian/dirs: -------------------------------------------------------------------------------- 1 | usr/bin 2 | usr/sbin 3 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /test/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /std/av/lib/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /debian/clinkcmaemo0.install: -------------------------------------------------------------------------------- 1 | usr/lib/*.so.* 2 | -------------------------------------------------------------------------------- /examples/clock/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /examples/upnpavdump/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /examples/upnpdump/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /examples/upnpigddump/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /std/av/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include lib sample 2 | -------------------------------------------------------------------------------- /std/av/sample/upnpavdump/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = filesystem 2 | -------------------------------------------------------------------------------- /configure_linux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./configure --enable-libxml2 $@ 3 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = unix 2 | -------------------------------------------------------------------------------- /debian/clinkc0.install: -------------------------------------------------------------------------------- 1 | usr/lib/*.so.* 2 | usr/share/doc/clinkc0/* 3 | -------------------------------------------------------------------------------- /examples/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = clock upnpdump upnpavdump upnpigddump 2 | -------------------------------------------------------------------------------- /include/mupnp/version.h.build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./version.h.gen > version.h 3 | -------------------------------------------------------------------------------- /doc/img/upnpapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/upnpapp.png -------------------------------------------------------------------------------- /doc/mupnpcproguide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/mupnpcproguide.pdf -------------------------------------------------------------------------------- /doc/mupnpobjcproguide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/mupnpobjcproguide.pdf -------------------------------------------------------------------------------- /lib/win32/vc60/CyberLinkC.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/lib/win32/vc60/CyberLinkC.dsp -------------------------------------------------------------------------------- /lib/win32/vc60/CyberLinkC.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/lib/win32/vc60/CyberLinkC.dsw -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjC/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /doc/img/mupnpc-device-notify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-device-notify.png -------------------------------------------------------------------------------- /doc/img/mupnpc-device-ports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-device-ports.png -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjCTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /lib/wince/vs2005/CyberLinkC.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/lib/wince/vs2005/CyberLinkC.vcproj -------------------------------------------------------------------------------- /std/av/configure_macports: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./configure CPPFLAGS="-I/opt/local/include/" LDFLAGS="-L/opt/local/lib" $@ 3 | -------------------------------------------------------------------------------- /doc/img/mupnpc-device-description.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-device-description.png -------------------------------------------------------------------------------- /doc/img/mupnpc-example-regzatv-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-example-regzatv-01.png -------------------------------------------------------------------------------- /configure_macosx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./configure CPPFLAGS="-I/usr/local/include/" LDFLAGS="-L/usr/local/lib" MKDIR_P='mkdir -p' $@ 3 | -------------------------------------------------------------------------------- /doc/img/mupnpc-example-nokia770-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-example-nokia770-01.jpg -------------------------------------------------------------------------------- /doc/img/mupnpc-objc-macosx-installer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-objc-macosx-installer.jpg -------------------------------------------------------------------------------- /examples/clock/win32/vc60/upnpclock.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/clock/win32/vc60/upnpclock.dsp -------------------------------------------------------------------------------- /examples/clock/win32/vc60/upnpclock.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/clock/win32/vc60/upnpclock.dsw -------------------------------------------------------------------------------- /std/av/lib/win32/vc60/libclinkmedia.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/lib/win32/vc60/libclinkmedia.dsp -------------------------------------------------------------------------------- /std/av/lib/win32/vc60/libclinkmedia.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/lib/win32/vc60/libclinkmedia.dsw -------------------------------------------------------------------------------- /test/win32/vs2005/ClinkTestCase.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/test/win32/vs2005/ClinkTestCase.vcproj -------------------------------------------------------------------------------- /test/win32/vs2008/ClinkTestCase.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/test/win32/vs2008/ClinkTestCase.vcproj -------------------------------------------------------------------------------- /doc/img/mupnp-c-device-class-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnp-c-device-class-overview.png -------------------------------------------------------------------------------- /doc/img/mupnpc-example-vieraremote-01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-example-vieraremote-01.gif -------------------------------------------------------------------------------- /doc/img/mupnpc-example-vieraremote-02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnpc-example-vieraremote-02.gif -------------------------------------------------------------------------------- /examples/clock/win32/vc60/images/clock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/clock/win32/vc60/images/clock.jpg -------------------------------------------------------------------------------- /examples/upnpdump/win32/vc60/upnpdump.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpdump/win32/vc60/upnpdump.dsp -------------------------------------------------------------------------------- /examples/upnpdump/win32/vc60/upnpdump.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpdump/win32/vc60/upnpdump.dsw -------------------------------------------------------------------------------- /doc/img/mupnp-c-ctrlpoint-class-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnp-c-ctrlpoint-class-overview.png -------------------------------------------------------------------------------- /examples/clock/win32/vs2005/images/clock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/clock/win32/vs2005/images/clock.jpg -------------------------------------------------------------------------------- /examples/clock/win32/vs2005/upnpclock.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/clock/win32/vs2005/upnpclock.vcproj -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpbrowser/ios/Resources/Icon.png -------------------------------------------------------------------------------- /std/av/lib/win32/vs2005/libclinkmedia.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/lib/win32/vs2005/libclinkmedia.vcproj -------------------------------------------------------------------------------- /std/av/lib/win32/vs2008/CyberLinkCAV.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/lib/win32/vs2008/CyberLinkCAV.vcproj -------------------------------------------------------------------------------- /std/av/lib/wince/vs2005/libclinkmedia.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/lib/wince/vs2005/libclinkmedia.vcproj -------------------------------------------------------------------------------- /doc/img/mupnp-objc-ctrlpoint-class-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/doc/img/mupnp-objc-ctrlpoint-class-overview.png -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Resources/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpbrowser/ios/Resources/Icon@2x.png -------------------------------------------------------------------------------- /examples/upnpavchk/win32/vs2008/upnpavchk.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpavchk/win32/vs2008/upnpavchk.vcproj -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Resources/LargeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpbrowser/ios/Resources/LargeIcon.png -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Resources/icon_device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/examples/upnpbrowser/ios/Resources/icon_device.png -------------------------------------------------------------------------------- /std/av/testunit/win32/vs2008/ClinkAVTestCase.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/testunit/win32/vs2008/ClinkAVTestCase.vcproj -------------------------------------------------------------------------------- /debian/clinkc-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/* 2 | usr/include/cybergarage/* 3 | usr/lib/pkgconfig/* 4 | usr/lib/lib*.a 5 | usr/lib/lib*.so 6 | usr/share/doc/clinkc-dev/* 7 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.rc -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/testunit/macosx/xcode30/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/COptionDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/COptionDialog.h -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.vcproj -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/res/CDmsYoutube.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/youtube/win32/vs2005/res/CDmsYoutube.ico -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: WebKit 2 | IndentWidth: 2 3 | BinPackArguments: false 4 | BinPackParameters: false 5 | BreakBeforeBraces: Stroustrup 6 | PenaltyReturnTypeOnItsOwnLine: 1024 7 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/COptionDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/COptionDialog.cpp -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhotoppc.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhotoppc.rc -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavplayer/macosx/xcode30/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhoto.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhoto.vcproj -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhoto.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhoto.ico -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/testunit/macosx/xcode30/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhotoDoc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhotoDoc.ico -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/win32/console/vc60/cdms_filesys_console.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/win32/console/vc60/cdms_filesys_console.dsp -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/win32/console/vc60/cdms_filesys_console.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/win32/console/vc60/cdms_filesys_console.dsw -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/English.lproj/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavplayer/macosx/xcode30/English.lproj/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvConstants.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvConstants.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/10. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/win32/console/vs2005/cdms_filesys_console.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cybergarage/mupnp/HEAD/std/av/sample/upnpavserver/filesystem/win32/console/vs2005/cdms_filesys_console.vcproj -------------------------------------------------------------------------------- /doc/img/mupnp-c-device-class-overview.pu: -------------------------------------------------------------------------------- 1 | @startuml 2 | mUpnpDevice *-- mUpnpIcon 3 | mUpnpDevice *-- mUpnpService 4 | mUpnpService *-- mUpnpAction 5 | mUpnpAction *-- mUpnpArgument 6 | mUpnpService *-- mUpnpStateVariable 7 | @enduml 8 | -------------------------------------------------------------------------------- /examples/upnpdump/macosx/xcode30/upnpdump_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpdump' target in the 'upnpdump' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /std/av/sample/Makefile.am: -------------------------------------------------------------------------------- 1 | #SUBDIRS = upnpavdump upnpavserver 2 | SUBDIRS = upnpavserver upnpavdump 3 | 4 | EXTRA_DIST = common/ckeyboard.c common/ckeyboard.h common/crss.c \ 5 | common/crss.h common/cwebservice.c common/cwebservice.h 6 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/upnpavplayer_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpavplayer' target in the 'upnpavplayer' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/ClinkAVTestUnit_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ClinkAVTestUnit' target in the 'ClinkAVTestUnit' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /lib/macosx/xcode/libmupnp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mupnp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: mupnp 7 | Description: mUPnP for C 8 | Version: @VERSION@ 9 | Requires: 10 | Libs: -L@libdir@ -lmupnp 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /doc/img/mupnp-c-ctrlpoint-class-overview.pu: -------------------------------------------------------------------------------- 1 | @startuml 2 | mUpnpControlPoint *-- mUpnpDevice 3 | mUpnpDevice *-- mUpnpIcon 4 | mUpnpDevice *-- mUpnpService 5 | mUpnpService *-- mUpnpAction 6 | mUpnpAction *-- mUpnpArgument 7 | mUpnpService *-- mUpnpStateVariable 8 | @enduml 9 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // CDmsYoutube.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /examples/upnpdump/tengine/gnu/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd sh7727; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 3 | cd sh7727.debug; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 4 | cd sh7727.dl; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 5 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // CDmsMobilePhoto.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | -------------------------------------------------------------------------------- /std/av/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ ! -d config ]; then 3 | mkdir config 4 | fi 5 | if [ ! -d autom4te.cache ]; then 6 | rm -rf autom4te.cache/* 7 | fi 8 | #libtoolize --automake --force --copy 9 | aclocal 10 | autoheader 11 | automake --foreign --add-missing --copy 12 | autoconf 13 | -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjC/mUPnP4ObjC-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #if defined(TARGET_OS_IOS) 9 | #import 10 | #endif 11 | #endif 12 | -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ClinkAVTestUnit 4 | // 5 | // Created by ?? ? on 08/08/23. 6 | // Copyright __MyCompanyName__ 2008. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char* argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char**)argv); 14 | } 15 | -------------------------------------------------------------------------------- /doc/docs2md: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd /Users/skonno/Src/mupnp/doc 3 | 4 | DOCX_FILES=("mupnpcproguide.docx" "mupnpobjcproguide.docx") 5 | PANDOC_PARAMS="-f docx -t markdown --wrap=none" 6 | 7 | for DOC_FILE in "${DOCX_FILES[@]}"; do 8 | pandoc ${PANDOC_PARAMS} ${DOC_FILE} -o ${DOC_FILE%.docx}.md 9 | sed -i '' 's/^> //' ${DOC_FILE%.docx}.md 10 | done -------------------------------------------------------------------------------- /std/av/sample/upnpavdump/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS = upnpavdump 2 | 3 | AM_CPPFLAGS = -I$(top_srcdir)/include -I../ -I../../../common 4 | 5 | noinst_HEADERS = \ 6 | ../../common/ckeyboard.h 7 | 8 | upnpavdump_SOURCES = \ 9 | ../../common/ckeyboard.c \ 10 | ../upnpavdump.c 11 | 12 | upnpavdump_LDADD = -lmupnp ../../../lib/unix/libmupnpav.a 13 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // upnpavplayer 4 | // 5 | // Created by ?? ? on 08/06/19. 6 | // Copyright __MyCompanyName__ 2008. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char* argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char**)argv); 14 | } 15 | -------------------------------------------------------------------------------- /examples/clock/tengine/gnu/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd src; rm -f upnpclock.c.lnk; ln -sf ../../../unix/clock_main.c upnpclock.c; cd .. 3 | cd sh7727; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 4 | cd sh7727.debug; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 5 | cd sh7727.dl; rm -f Makefile.lnk; ln -fs ../src/Makefile Makefile; cd .. 6 | -------------------------------------------------------------------------------- /test/ClinkUnitTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // ClinkUnitTest.h 3 | // ClinkUnitTest 4 | // 5 | // Created by Satoshi Konno on 08/07/15. 6 | // Copyright 2008 CyberGarage. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ClinkUnitTest : SenTestCase { 13 | CGUpnpControlPoint* cp; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /std/av/testunit/macosx/ClinkAVUnitTest.h: -------------------------------------------------------------------------------- 1 | // 2 | // ClinkAVUnitTest.h 3 | // ClinkUnitTest 4 | // 5 | // Created by Satoshi Konno on 08/07/16. 6 | // Copyright 2008 CyberGarage. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ClinkAVUnitTest : SenTestCase { 13 | CGUpnpAvController* dmc; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/upnpbrowser.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'iHomeBrowser' target in the 'iHomeBrowser' project 3 | // 4 | #import 5 | 6 | #ifndef __IPHONE_3_0 7 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 8 | #endif 9 | 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /std/av/src/cybergarage/upnp/std/av/ccontent_list.c: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: ccontent_list.c 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #include 16 | -------------------------------------------------------------------------------- /std/av/src/cybergarage/upnp/std/av/cresource_list.c: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cresource_list.c 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #include 16 | -------------------------------------------------------------------------------- /std/av/testunit/ClinkAVTestCase.cpp: -------------------------------------------------------------------------------- 1 | #include "ClinkAVTestCase.h" 2 | 3 | CPPUNIT_TEST_SUITE_REGISTRATION(ClinkAVTestCase); 4 | 5 | //////////////////////////////////////// 6 | // setUp 7 | //////////////////////////////////////// 8 | 9 | void ClinkAVTestCase::setUp() 10 | { 11 | } 12 | 13 | //////////////////////////////////////// 14 | // tearDown 15 | //////////////////////////////////////// 16 | 17 | void ClinkAVTestCase::tearDown() 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGXml.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGXml.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/29. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CGXml : NSObject { 12 | } 13 | + (NSString*)escapestring:(NSString*)aString; 14 | + (NSString*)escapestringFromIndex:(NSString*)aString index:(NSUInteger)anIndex; 15 | + (NSString*)unescapestring:(NSString*)aString; 16 | @end 17 | -------------------------------------------------------------------------------- /std/av/testunit/ClinkAVTestCase.h: -------------------------------------------------------------------------------- 1 | #ifndef CPP_UNIT_CDISTTESTCASE_H 2 | #define CPP_UNIT_CDISTTESTCASE_H 3 | 4 | #include 5 | 6 | class ClinkAVTestCase : public CPPUNIT_NS::TestFixture { 7 | CPPUNIT_TEST_SUITE(ClinkAVTestCase); 8 | 9 | CPPUNIT_TEST(testRenderer); 10 | 11 | CPPUNIT_TEST_SUITE_END(); 12 | 13 | public: 14 | void setUp(); 15 | void tearDown(); 16 | 17 | protected: 18 | void testRenderer(); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd include && ./Makefile.am.build > Makefile.am && popd 4 | pushd lib/unix && ./Makefile.am.build > Makefile.am && popd 5 | pushd test/unix && ./Makefile.am.build > Makefile.am && popd 6 | 7 | if [ ! -d config ]; then 8 | mkdir config 9 | fi 10 | if [ ! -d autom4te.cache ]; then 11 | rm -rf autom4te.cache/* 12 | fi 13 | #libtoolize --automake --force --copy 14 | aclocal 15 | autoheader 16 | automake --foreign --add-missing --copy 17 | autoreconf -fiv 18 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS = cdms_filesys 2 | 3 | AM_CPPFLAGS = -I$(top_srcdir)/include -I../ -I../../../common 4 | 5 | noinst_HEADERS = \ 6 | ../../../common/ckeyboard.h \ 7 | ../cdms_filesys.h 8 | 9 | cdms_filesys_SOURCES = \ 10 | ../../../common/ckeyboard.c \ 11 | ../cdms_filesys.c \ 12 | ../cdms_filesys_data.c \ 13 | ../cdms_filesys_http.c \ 14 | ../cdms_filesys_main.c 15 | 16 | cdms_filesys_LDADD = -lmupnp ../../../../lib/unix/libmupnpav.a 17 | -------------------------------------------------------------------------------- /clang-format: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | formatters=(clang-format clang-format-7) 3 | for f in "${formatters[@]}" 4 | do 5 | if command -v "${f}" &> /dev/null 6 | then 7 | format=$f 8 | break 9 | fi 10 | done 11 | 12 | if [ -x "`which clang-tidy`" ]; then 13 | find . -name "*.h" -or -name "*.c" -or -name "*.cpp" -or -name "*.m" | xargs -L 1 -Ifname clang-tidy --fix fname -- -Iinclude -Isrc 14 | fi 15 | find . -name "*.h" -or -name "*.c" -or -name "*.cpp" -or -name "*.m" | xargs -L 1 -Ifname $format -i fname 16 | -------------------------------------------------------------------------------- /examples/upnpdump/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | samplesdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/samples 2 | 3 | samples_PROGRAMS = upnpdump 4 | 5 | AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I../ -I../../common @XML_CFLAGS@ @CLOG_DEBUG_FLAGS@ $(CODE_COVERAGE_CFLAGS) 6 | 7 | noinst_HEADERS = \ 8 | ../../common/kb_util.h 9 | 10 | upnpdump_SOURCES = \ 11 | ../upnpdump.c \ 12 | ../../common/kb_util.c 13 | 14 | upnpdump_LDADD = ../../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS) 15 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/res/CDmsYoutube.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // CDmsYoutube.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /examples/upnpavdump/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | samplesdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/samples 2 | 3 | samples_PROGRAMS = upnpavdump 4 | 5 | AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I../ -I../../common @XML_CFLAGS@ @CLOG_DEBUG_FLAGS@ $(CODE_COVERAGE_CFLAGS) 6 | 7 | noinst_HEADERS = \ 8 | ../../common/kb_util.h 9 | 10 | upnpavdump_SOURCES = \ 11 | ../upnpavdump.c \ 12 | ../../common/kb_util.c 13 | 14 | upnpavdump_LDADD = ../../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS) 15 | -------------------------------------------------------------------------------- /examples/upnpigddump/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | samplesdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/samples 2 | 3 | samples_PROGRAMS = upnpigddump 4 | 5 | AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I../ -I../../common @XML_CFLAGS@ @CLOG_DEBUG_FLAGS@ $(CODE_COVERAGE_CFLAGS) 6 | 7 | noinst_HEADERS = \ 8 | ../../common/kb_util.h 9 | 10 | upnpigddump_SOURCES = \ 11 | ../upnpigddump.c \ 12 | ../../common/kb_util.c 13 | 14 | upnpigddump_LDADD = ../../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS) 15 | -------------------------------------------------------------------------------- /test/TestMain.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #define BOOST_TEST_MODULE MUPNP 13 | #define BOOST_TEST_DYN_LINK 14 | #define BOOST_TEST_MAIN 15 | 16 | #include 17 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAAudioView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DLNAController; 12 | 13 | @interface DLNAImageView : NSImageView { 14 | DLNAController* controller; 15 | } 16 | @property (readwrite, retain) DLNAController* controller; 17 | - (id)initWithFrame:(NSRect)frameRect; 18 | - (void)mouseDown:(NSEvent*)theEvent; 19 | @end 20 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DLNAController; 12 | 13 | @interface DLNAImageView : NSImageView { 14 | DLNAController* controller; 15 | } 16 | @property (readwrite, retain) DLNAController* controller; 17 | - (id)initWithFrame:(NSRect)frameRect; 18 | - (void)mouseDown:(NSEvent*)theEvent; 19 | @end 20 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAMovieView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DLNAController; 12 | 13 | @interface DLNAImageView : NSImageView { 14 | DLNAController* controller; 15 | } 16 | @property (readwrite, retain) DLNAController* controller; 17 | - (id)initWithFrame:(NSRect)frameRect; 18 | - (void)mouseDown:(NSEvent*)theEvent; 19 | @end 20 | -------------------------------------------------------------------------------- /wrapper/objc/mUPnP/CGUpnp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for ObjC 4 | * 5 | * Copyright (C) Satoshi Konno 2008 6 | * 7 | * This is licensed under BSD-style license, see file COPYING. 8 | * 9 | ******************************************************************/ 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | -------------------------------------------------------------------------------- /examples/common/kb_util.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: kb_util.h 8 | * 9 | * Revision: 10 | * 11 | * 05/11/05 12 | * - first revision 13 | * 14 | ******************************************************************/ 15 | 16 | #ifndef _CG_KB_UTIL_H_ 17 | #define _CG_KB_UTIL_H_ 18 | 19 | void kbinit(); 20 | int kbhit(); 21 | int kbkey(); 22 | void kbexit(); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvRoot.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvRoot.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/01. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * The CGUpnpAvRoot class is a root container of UPnP/AV. 13 | */ 14 | @interface CGUpnpAvRoot : CGUpnpAvContainer { 15 | } 16 | - (id)init; 17 | #if !defined(TARGET_OS_IPHONE) 18 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode; 19 | #else 20 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode; 21 | #endif 22 | @end 23 | -------------------------------------------------------------------------------- /examples/clock/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | samplesdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/samples 2 | 3 | samples_PROGRAMS = upnpclock 4 | 5 | AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir)/../ -I$(srcdir)/../../common @XML_CFLAGS@ @CLOG_DEBUG_FLAGS@ $(CODE_COVERAGE_CFLAGS) 6 | 7 | noinst_HEADERS = \ 8 | ../clock.h \ 9 | ../clock_device.h \ 10 | ../../common/kb_util.h 11 | 12 | upnpclock_SOURCES = \ 13 | clock_main.c \ 14 | ../clock.c \ 15 | ../clock_device.c \ 16 | ../../common/kb_util.c 17 | 18 | upnpclock_LDADD = ../../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS) 19 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/UPnPAV.h: -------------------------------------------------------------------------------- 1 | // 2 | // UPnPAV.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/05/08. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import 18 | #import 19 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPDeviceTableViewCell.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPDeviceTableViewCell.h 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import "UPnPTableViewCell.h" 14 | 15 | @class CGUpnpDevice; 16 | 17 | @interface UPnPDeviceTableViewCell : UPnPTableViewCell { 18 | } 19 | 20 | - (void)setDevice:(CGUpnpDevice*)upnpDevice; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/main.m: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * main.m 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import 14 | 15 | int main(int argc, char* argv[]) 16 | { 17 | 18 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 19 | int retVal = UIApplicationMain(argc, argv, nil, nil); 20 | [pool release]; 21 | return retVal; 22 | } 23 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "lldb", 9 | "request": "launch", 10 | "name": "Debug", 11 | "program": "${workspaceFolder}/test/unix/mupnptest", 12 | "args": ["--log_level=all"], 13 | "cwd": "${workspaceFolder}", 14 | "preLaunchTask": "make check" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: mupnp 2 | base: core20 3 | version: '3.0.1' 4 | summary: UPnP™ library for cross-platform 5 | license: "BSD" 6 | description: | 7 | mUPnP for C is a development package for UPnP™ developers. 8 | mUPnP controls these protocols automatically, and supports to 9 | create your devices and control points quickly. 10 | 11 | grade: stable 12 | confinement: strict 13 | 14 | build-packages: 15 | - libboost-all-dev 16 | 17 | parts: 18 | fdtools: 19 | source-type: git 20 | source: https://github.com/cybergarage/mupnp 21 | plugin: autotools 22 | autotools-configure-parameters: 23 | - --enable-test -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/Resourcesp.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by CDmsMobilePhotosp.rc 4 | // 5 | 6 | #define IDR_MAINFRAME 128 7 | #define IDR_CDmsMobilePhotoTYPE 129 8 | #define IDP_SOCKETS_INIT_FAILED 104 9 | #define IDS_OK 301 10 | #define IDM_OK 401 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 130 17 | #define _APS_NEXT_CONTROL_VALUE 1000 18 | #define _APS_NEXT_SYMED_VALUE 101 19 | #define _APS_NEXT_COMMAND_VALUE 32771 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /std/av/sample/common/crss.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: crss.h 8 | * 9 | * Revision: 10 | * 11 | * 01/25/05 12 | * - first revision 13 | * 14 | ******************************************************************/ 15 | 16 | #ifndef _CG_UPNPAV_RSS_H_ 17 | #define _CG_UPNPAV_RSS_H_ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #include 24 | 25 | mUpnpMediaContent* mupnp_http_getrsscontents(char* rssURL); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /std/av/sample/common/ckeyboard.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: ckeyboad.h 8 | * 9 | * Revision: 10 | * 11 | * 01/25/05 12 | * - first revision 13 | * 14 | ******************************************************************/ 15 | 16 | #ifndef _CG_UPNPAV_KEYBOAD_H_ 17 | #define _CG_UPNPAV_KEYBOAD_H_ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | void mupnp_kb_init(); 24 | int mupnp_kb_hit(); 25 | int mupnp_kb_key(); 26 | void mupnp_kb_exit(); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /std/av/include/Makefile.am: -------------------------------------------------------------------------------- 1 | ######################################## 2 | # Headers 3 | ######################################## 4 | 5 | clinkcav_header = \ 6 | cybergarage/upnp/std/av/ccontent.h \ 7 | cybergarage/upnp/std/av/cdidl.h \ 8 | cybergarage/upnp/std/av/cmd5.h \ 9 | cybergarage/upnp/std/av/cmediaserver.h \ 10 | cybergarage/upnp/std/av/cmediarenderer.h \ 11 | cybergarage/upnp/std/av/cprotocolinfo.h \ 12 | cybergarage/upnp/std/av/cupnpav.h \ 13 | cybergarage/upnp/std/av/cresource.h 14 | 15 | ######################################## 16 | # Library 17 | ######################################## 18 | 19 | nobase_include_HEADERS = \ 20 | $(clinkcav_header) 21 | -------------------------------------------------------------------------------- /std/av/include/cybergarage/upnp/std/av/cmd5.h: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cmd5.h 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #ifndef _CG_CLINKCAV_MD5_H_ 16 | #define _CG_CLINKCAV_MD5_H_ 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #define CG_MD5_STRING_BUF_SIZE ((16 * 2) + 1) 23 | 24 | char* mupnp_str2md5(char* string, char* md5buf); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAVPositionInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAVPositionInfo.h 3 | // 4 | // 5 | // Created by Satoshi Konno on 10/12/01. 6 | // Copyright 2010 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class CGUpnpAction; 13 | 14 | @interface CGUpnpAVPositionInfo : NSObject { 15 | } 16 | @property (retain) CGUpnpAction* upnpAction; 17 | - (id)initWithAction:(CGUpnpAction*)aUpnpAction; 18 | - (float)trackDuration; 19 | - (float)absTime; 20 | - (float)relTime; 21 | @end 22 | 23 | @interface NSString (CGUPnPAV) 24 | + (NSString*)stringWithDurationTime:(float)timeValue; 25 | - (float)durationTime; 26 | @end 27 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvContentManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContentManager.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CGUpnpAvRoot; 12 | @class CGUpnpAvObject; 13 | @class CGUpnpAvContainer; 14 | 15 | /** 16 | * The CGUpnpAvContentDirectory class has UPnP/AV objects of a media servers. 17 | * 18 | */ 19 | @interface CGUpnpAvContentManager : NSObject { 20 | } 21 | @property (retain) CGUpnpAvRoot* rootObj; 22 | - (CGUpnpAvObject*)objectForId:(NSString*)aObjectId; 23 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aTitlePath; 24 | @end 25 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvContentDirectory.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContentDirectory.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CGUpnpAvContentManager; 12 | 13 | /** 14 | * The CGUpnpAvContentDirectory class has UPnP/AV objects of a media servers. 15 | * 16 | */ 17 | @interface CGUpnpAvContentDirectory : NSObject { 18 | } 19 | @property (retain) CGUpnpAvContentManager* contentMgr; 20 | - (CGUpnpAvContainer*)rootObject; 21 | - (CGUpnpAvObject*)objectForId:(NSString*)aObjectId; 22 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aTitlePath; 23 | @end 24 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPPresentationViewController.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPPresentationViewController.h 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import 14 | #import 15 | 16 | @interface UPnPPresentationViewController : UIViewController { 17 | } 18 | @property (retain) UIWebView* webView; 19 | @property (retain) CGUpnpDevice* device; 20 | @property (retain) NSString* presentationURL; 21 | @end 22 | -------------------------------------------------------------------------------- /include/mupnp/version.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #ifndef _MUPNP_VERSION_H_ 13 | #define _MUPNP_VERSION_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /**************************************** 20 | * Define 21 | ****************************************/ 22 | 23 | #define MUPNP_VER "3.0.2" 24 | 25 | #ifdef __cplusplus 26 | } /* extern C */ 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPBrowserAppDelegate.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPBrowserAppDelegate.h 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | @interface UPnPBrowserAppDelegate : NSObject { 14 | 15 | UIWindow* window; 16 | UINavigationController* navigationController; 17 | } 18 | 19 | @property (nonatomic, retain) IBOutlet UIWindow* window; 20 | @property (nonatomic, retain) IBOutlet UINavigationController* navigationController; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | os: 4 | - linux 5 | 6 | compiler: 7 | - clang 8 | - gcc 9 | 10 | before_script: 11 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi 12 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install libboost-all-dev; fi 13 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install automake autoconf boost; fi 14 | 15 | script: 16 | - ./bootstrap 17 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./configure --enable-test; fi 18 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./configure_macosx --enable-test; fi 19 | - make 20 | - make check 21 | 22 | addons: 23 | homebrew: 24 | packages: 25 | - beanstalk 26 | notifications: 27 | email: false 28 | -------------------------------------------------------------------------------- /test/UPnPFuncTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | //////////////////////////////////////// 17 | // BootID 18 | //////////////////////////////////////// 19 | 20 | BOOST_AUTO_TEST_CASE(BootID) 21 | { 22 | int bootId = mupnp_createbootid(); 23 | BOOST_REQUIRE(0 < bootId); 24 | BOOST_REQUIRE(bootId < INT_MAX); 25 | } 26 | -------------------------------------------------------------------------------- /std/av/sample/common/cwebservice.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cwebservice.h 8 | * 9 | * Revision: 10 | * 11 | * 01/25/05 12 | * - first revision 13 | * 14 | ******************************************************************/ 15 | 16 | #ifndef _CG_UPNPAV_WEBSERVICE_H_ 17 | #define _CG_UPNPAV_WEBSERVICE_H_ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | #include 24 | 25 | BOOL mupnp_http_getrestresponse(char* url, mUpnpString* str); 26 | BOOL mupnp_http_getredirecturl(char* orgURL, char* redirectURL, int redirectURLSize); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/ClinkAVTestUnitBundle-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.yourcompany.${PRODUCT_NAME:identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/clock/clock_device.h: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: clock_device.h 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #ifndef _CG_CLOCK_DEVICE_H_ 16 | #define _CG_CLOCK_DEVICE_H_ 17 | 18 | #include 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /**************************************** 25 | * Function 26 | ****************************************/ 27 | 28 | mUpnpDevice* upnp_clock_device_new(); 29 | void upnp_clock_device_update(mUpnpDevice* dev); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjCTests/mUPnP4ObjCTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Installer", "Installer\Installer.vdproj", "{C25F9DE5-9D31-46FA-A6CB-70C2CA3AAE4D}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C25F9DE5-9D31-46FA-A6CB-70C2CA3AAE4D}.Debug|Win32.ActiveCfg = Debug 13 | {C25F9DE5-9D31-46FA-A6CB-70C2CA3AAE4D}.Release|Win32.ActiveCfg = Release 14 | EndGlobalSection 15 | GlobalSection(SolutionProperties) = preSolution 16 | HideSolutionNode = FALSE 17 | EndGlobalSection 18 | EndGlobal 19 | -------------------------------------------------------------------------------- /include/Makefile.am.build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | print< \$(srcdir)/mupnp/upnp.h 29 | 30 | nobase_include_HEADERS = \\ 31 | \$(mupnp_headers) 32 | FOTTER 33 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAAudioView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import "DLNAController.h" 10 | #import "DLNAImageView.h" 11 | 12 | @implementation DLNAImageView 13 | 14 | @synthesize controller; 15 | 16 | - (id)initWithFrame:(NSRect)frameRect 17 | { 18 | if ((self = [super initWithFrame:frameRect]) == nil) 19 | return nil; 20 | return self; 21 | } 22 | 23 | - (void)mouseDown:(NSEvent*)theEvent 24 | { 25 | DLNAController* dmc = [self controller]; 26 | NSView* browserView = [dmc browserView]; 27 | NSWindow* mainWin = [NSApp mainWindow]; 28 | NSView* currView = [mainWin contentView]; 29 | [mainWin setContentView:browserView]; 30 | [currView release]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import "DLNAImageView.h" 10 | #import "DLNAController.h" 11 | 12 | @implementation DLNAImageView 13 | 14 | @synthesize controller; 15 | 16 | - (id)initWithFrame:(NSRect)frameRect 17 | { 18 | if ((self = [super initWithFrame:frameRect]) == nil) 19 | return nil; 20 | return self; 21 | } 22 | 23 | - (void)mouseDown:(NSEvent*)theEvent 24 | { 25 | DLNAController* dmc = [self controller]; 26 | NSView* browserView = [dmc browserView]; 27 | NSWindow* mainWin = [NSApp mainWindow]; 28 | NSView* currView = [mainWin contentView]; 29 | [mainWin setContentView:browserView]; 30 | [currView release]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAMovieView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAImageView.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import "DLNAController.h" 10 | #import "DLNAImageView.h" 11 | 12 | @implementation DLNAImageView 13 | 14 | @synthesize controller; 15 | 16 | - (id)initWithFrame:(NSRect)frameRect 17 | { 18 | if ((self = [super initWithFrame:frameRect]) == nil) 19 | return nil; 20 | return self; 21 | } 22 | 23 | - (void)mouseDown:(NSEvent*)theEvent 24 | { 25 | DLNAController* dmc = [self controller]; 26 | NSView* browserView = [dmc browserView]; 27 | NSWindow* mainWin = [NSApp mainWindow]; 28 | NSView* currView = [mainWin contentView]; 29 | [mainWin setContentView:browserView]; 30 | [currView release]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjCTests/mUPnP4ObjCTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CyberLink4ObjCTests.m 3 | // CyberLink4ObjCTests 4 | // 5 | // Created by Satoshi Konno on 2014/06/24. 6 | // Copyright (c) 2014年 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CyberLink4ObjCTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CyberLink4ObjCTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutube.h: -------------------------------------------------------------------------------- 1 | // CDmsYoutube.h : main header file for the PROJECT_NAME application 2 | // 3 | 4 | #pragma once 5 | 6 | #ifndef __AFXWIN_H__ 7 | #error "include 'stdafx.h' before including this file for PCH" 8 | #endif 9 | 10 | #include "resource.h" // main symbols 11 | 12 | #include "cdms_youtube.h" 13 | 14 | // CCDmsYoutubeApp: 15 | // See CDmsYoutube.cpp for the implementation of this class 16 | // 17 | 18 | class CCDmsYoutubeApp : public CWinApp { 19 | CgUpnpMediaServer* dms; 20 | 21 | public: 22 | CCDmsYoutubeApp(); 23 | ~CCDmsYoutubeApp(); 24 | 25 | // Overrides 26 | public: 27 | virtual BOOL InitInstance(); 28 | 29 | // Implementation 30 | 31 | DECLARE_MESSAGE_MAP() 32 | 33 | public: 34 | CgUpnpMediaServer* GetDMS() 35 | { 36 | return dms; 37 | } 38 | }; 39 | 40 | extern CCDmsYoutubeApp theApp; -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/CDmsYoutubeDlg.h: -------------------------------------------------------------------------------- 1 | // CDmsYoutubeDlg.h : header file 2 | // 3 | 4 | #pragma once 5 | 6 | // CCDmsYoutubeDlg dialog 7 | class CCDmsYoutubeDlg : public CDialog { 8 | // Construction 9 | public: 10 | CCDmsYoutubeDlg(CWnd* pParent = NULL); // standard constructor 11 | 12 | // Dialog Data 13 | enum { IDD = IDD_CDMSYOUTUBE_DIALOG }; 14 | 15 | protected: 16 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 17 | 18 | // Implementation 19 | protected: 20 | HICON m_hIcon; 21 | 22 | // Generated message map functions 23 | virtual BOOL OnInitDialog(); 24 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 25 | afx_msg void OnPaint(); 26 | afx_msg HCURSOR OnQueryDragIcon(); 27 | DECLARE_MESSAGE_MAP() 28 | 29 | void UpdateContents(); 30 | 31 | public: 32 | afx_msg void OnBnClickedUpdate(); 33 | }; 34 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "clang-format", 6 | "type": "shell", 7 | "command": "./clang-format", 8 | "args": [], 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | }, 13 | "problemMatcher": [] 14 | } 15 | { 16 | "label": "make check", 17 | "type": "shell", 18 | "command": "make", 19 | "args": [ 20 | "check", 21 | "-j", 22 | "20" 23 | ], 24 | "group": { 25 | "kind": "build", 26 | "isDefault": true 27 | }, 28 | "problemMatcher": [], 29 | "dependsOn": ["clang-format"] 30 | }, 31 | ] 32 | } -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhotoDoc.h: -------------------------------------------------------------------------------- 1 | // CDmsMobilePhotoDoc.h : interface of the CCDmsMobilePhotoDoc class 2 | // 3 | 4 | #pragma once 5 | 6 | class CCDmsMobilePhotoDoc : public CDocument { 7 | protected: // create from serialization only 8 | CCDmsMobilePhotoDoc(); 9 | DECLARE_DYNCREATE(CCDmsMobilePhotoDoc) 10 | 11 | // Attributes 12 | public: 13 | // Operations 14 | public: 15 | // Overrides 16 | public: 17 | virtual BOOL OnNewDocument(); 18 | #ifndef _WIN32_WCE_NO_ARCHIVE_SUPPORT 19 | virtual void Serialize(CArchive& ar); 20 | #endif // !_WIN32_WCE_NO_ARCHIVE_SUPPORT 21 | 22 | // Implementation 23 | public: 24 | virtual ~CCDmsMobilePhotoDoc(); 25 | #ifdef _DEBUG 26 | virtual void AssertValid() const; 27 | #endif 28 | 29 | protected: 30 | // Generated message map functions 31 | protected: 32 | DECLARE_MESSAGE_MAP() 33 | }; 34 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/MainFrm.h: -------------------------------------------------------------------------------- 1 | // MainFrm.h : interface of the CMainFrame class 2 | // 3 | 4 | #pragma once 5 | 6 | class CMainFrame : public CFrameWnd { 7 | protected: // create from serialization only 8 | CMainFrame(); 9 | DECLARE_DYNCREATE(CMainFrame) 10 | 11 | public: 12 | // Operations 13 | public: 14 | // Overrides 15 | public: 16 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 17 | 18 | // Implementation 19 | public: 20 | virtual ~CMainFrame(); 21 | #ifdef _DEBUG 22 | virtual void AssertValid() const; 23 | #endif 24 | 25 | protected: // control bar embedded members 26 | CCommandBar m_wndCommandBar; 27 | 28 | // Generated message map functions 29 | protected: 30 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 31 | 32 | DECLARE_MESSAGE_MAP() 33 | public: 34 | afx_msg void OnTimer(UINT_PTR nIDEvent); 35 | }; 36 | -------------------------------------------------------------------------------- /include/mupnp/version.h.gen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | print< 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /**************************************** 25 | * Function 26 | ****************************************/ 27 | 28 | mUpnpXmlNode* mupnp_upnpav_didl_node_new(); 29 | 30 | #define mupnp_upnpav_didl_node_delete(node) mupnp_xml_node_delete(node) 31 | #define mupnp_upnpav_didl_node_tostring(node, str) mupnp_xml_node_tostring(node, TRUE, str) 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/win32/vs2005/CyberLinkC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 14 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 15 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPDeviceViewController.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPDeviceTableViewCell.h 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import 14 | 15 | @interface UPnPDeviceViewController : UITableViewController { 16 | CGUpnpControlPoint* upnpCtrlPoint; 17 | BOOL firstSearched; 18 | UIActivityIndicatorView* activityIndicator; 19 | NSArray* upnpDevices; 20 | } 21 | @property (retain) CGUpnpControlPoint* upnpCtrlPoint; 22 | @property (readwrite) BOOL firstSearched; 23 | @property (retain) UIActivityIndicatorView* activityIndicator; 24 | @property (retain) NSArray* upnpDevices; 25 | - (id)initWithStyle:(UITableViewStyle)style; 26 | - (void)search:(id)sender; 27 | @end 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | examples/clock/unix/upnpclock 27 | examples/upnpavdump/unix/upnpavdump 28 | examples/upnpdump/unix/upnpdump 29 | examples/upnpigddump/unix/upnpigddump 30 | 31 | # MacOSX 32 | .DS_Store 33 | project.xcworkspace/ 34 | xcuserdata/ 35 | 36 | # Java 37 | *.class 38 | 39 | # Automake 40 | autom4te.cache/* 41 | config.* 42 | .deps/ 43 | *.Po 44 | .dirstamp 45 | Makefile 46 | mupnp.pc 47 | stamp-h2 48 | 49 | # Test 50 | test/unix/mupnptest 51 | test/unix/mupnptest.* 52 | test/unix/test-suite.log 53 | 54 | # Coverage 55 | *.gcno 56 | *.gcda 57 | 58 | # Doxygen 59 | doc/html 60 | *.jar 61 | 62 | # Coverage files 63 | *.gcov 64 | *.gcda 65 | *.gcno -------------------------------------------------------------------------------- /doc/img/mupnp-objc-ctrlpoint-class-overview.pu: -------------------------------------------------------------------------------- 1 | @startuml 2 | class CGUpnpControlPoint { 3 | +start() 4 | +stop() 5 | +search() 6 | +searchWithST() 7 | +setSsdpSearchMX() 8 | +ssdpSearchMX() 9 | +devices() 10 | } 11 | class CGUpnpDevice { 12 | +friendlyName() 13 | +deviceType() 14 | +isDeviceType() 15 | +services() 16 | +getServiceForID() 17 | +getServiceForType() 18 | } 19 | class CGUpnpService { 20 | +serviceId() 21 | +serviceType() 22 | +actions() 23 | +stateVariables() 24 | +getActionByName() 25 | +getStateVariableByName() 26 | } 27 | class CGUpnpAction { 28 | +name() 29 | +arguments() 30 | +setArgumentValue:forName() 31 | +argumentValueForName() 32 | +post() 33 | +postWithArguments() 34 | +statusCode() 35 | } 36 | class CGUpnpStateVariable { 37 | +name() 38 | +value() 39 | +query() 40 | +statusCode() 41 | } 42 | CGUpnpControlPoint *-- CGUpnpDevice 43 | CGUpnpDevice *-- CGUpnpService 44 | CGUpnpService *-- CGUpnpAction 45 | CGUpnpService *-- CGUpnpStateVariable 46 | @enduml 47 | -------------------------------------------------------------------------------- /lib/win32/vs2008/CyberLinkC.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 14 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 15 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvRoot.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContainer.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/01. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CGUpnpAvConstants.h" 12 | #import "CGUpnpAvContainer.h" 13 | #import "CGUpnpAvObject.h" 14 | #import "CGUpnpAvRoot.h" 15 | #import "CGXmlNode.h" 16 | 17 | @implementation CGUpnpAvRoot 18 | 19 | - (id)init 20 | { 21 | if ((self = [super init]) == nil) 22 | return nil; 23 | [self setObjectId:@CG_UPNPAV_OBJECT_ROOT_ID]; 24 | return self; 25 | } 26 | 27 | #if !defined(TARGET_OS_IPHONE) 28 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode 29 | #else 30 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode 31 | #endif 32 | { 33 | if ((self = [super initWithXMLNode:aXmlNode]) == nil) 34 | return nil; 35 | return self; 36 | } 37 | 38 | - (void)dealloc 39 | { 40 | [super dealloc]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPTableViewCell.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPDeviceTableViewCell.h 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import 14 | 15 | enum { 16 | UPNPAV_CELL_IMAGE = 1, 17 | UPNPAV_CELL_NAME, 18 | UPNPAV_CELL_MIME, 19 | UPNPAV_CELL_DATE, 20 | }; 21 | 22 | @interface UPnPTableViewCell : UITableViewCell { 23 | } 24 | - (UILabel*)nameLabel; 25 | - (UILabel*)mimeLabel; 26 | - (UILabel*)dateLabel; 27 | - (UIImageView*)imageView; 28 | - (NSString*)name; 29 | - (NSString*)mime; 30 | - (NSString*)date; 31 | - (void)setName:(NSString*)aName; 32 | - (void)setMime:(NSString*)aMime; 33 | - (void)setDate:(NSString*)aDate; 34 | - (void)setImage:(UIImage*)anImage; 35 | - (void)disable; 36 | @end 37 | -------------------------------------------------------------------------------- /std/av/testunit/macosx/xcode30/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.ClinkAVTestUnit 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | ############################################################ 2 | # 3 | # mUPnP for C 4 | # 5 | # Copyright (C) Satoshi Konno 2005 6 | # 7 | ############################################################ 8 | 9 | TESTS = mupnptest 10 | check_PROGRAMS = mupnptest 11 | 12 | AM_CPPFLAGS = -I$(top_srcdir)/include -I../ $(CODE_COVERAGE_CPPFLAGS) 13 | AM_CFLAGS = $(CODE_COVERAGE_CFLAGS) 14 | AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) 15 | 16 | noinst_HEADERS = \ 17 | ../ClinkUnitTest.h \ 18 | ../TestDevice.h 19 | 20 | mupnptest_SOURCES = \ 21 | ../TestDevice.c \ 22 | ../StringTest.cpp \ 23 | ../StateVariableTest.cpp \ 24 | ../TestMain.cpp \ 25 | ../SubscriptionTest.cpp \ 26 | ../URITest.cpp \ 27 | ../XMLTest.cpp \ 28 | ../NetworkTest.cpp \ 29 | ../UPnPFuncTest.cpp \ 30 | ../HttpTest.cpp \ 31 | ../ControlPointTest.cpp \ 32 | ../DeviceTest.cpp \ 33 | ../DictionaryTest.cpp \ 34 | ../ServiceTest.cpp 35 | mupnptest_LDADD = ../../lib/unix/libmupnp.a @XML_LIBS@ $(CODE_COVERAGE_LIBS) 36 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.yourcompany.upnpavplayer 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | NSMainNibFile 24 | MainMenu 25 | NSPrincipalClass 26 | NSApplication 27 | 28 | 29 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvContentManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContentManager.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import "CGUpnpAvContentManager.h" 10 | #import "CGUpnpAvContainer.h" 11 | #import "CGUpnpAvObject.h" 12 | #import "CGUpnpAvRoot.h" 13 | #import "CGXmlNode.h" 14 | 15 | @implementation CGUpnpAvContentManager 16 | 17 | @synthesize rootObj; 18 | 19 | - (id)init 20 | { 21 | if ((self = [super init]) == nil) 22 | return nil; 23 | self.rootObj = [[[CGUpnpAvRoot alloc] init] autorelease]; 24 | return self; 25 | } 26 | 27 | - (void)dealloc 28 | { 29 | self.rootObj = nil; 30 | [super dealloc]; 31 | } 32 | 33 | - (CGUpnpAvObject*)objectForId:(NSString*)aObjectId 34 | { 35 | return [rootObj objectForId:aObjectId]; 36 | } 37 | 38 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aTitlePath 39 | { 40 | return [rootObj objectForTitlePath:aTitlePath]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /include/mupnp/upnp.h.in: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #ifndef _MUPNP_UPNP_H_ 13 | #define _MUPNP_UPNP_H_ 14 | 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | /**************************************** 27 | * Define 28 | ****************************************/ 29 | 30 | #define MUPNP_NAME "mUPnP" 31 | #define MUPNP_VER 32 | 33 | #define MUPNP_DLNA_VER "1.50" 34 | 35 | #define MUPNP_XML_DECLARATION "" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/resourceppc.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by CDmsMobilePhotoppc.rc 4 | // 5 | #define IDD_ABOUTBOX 100 6 | #define IDP_SOCKETS_INIT_FAILED 104 7 | #define IDR_MAINFRAME 128 8 | #define IDR_CDmsMobilePhotoTYPE 129 9 | #define IDD_ABOUTBOX_WIDE 200 10 | #define IDC_STATIC_1 201 11 | #define IDD_OPTION 201 12 | #define IDC_STATIC_2 202 13 | #define IDC_STATIC_3 203 14 | #define IDS_NEW 301 15 | #define IDS_MENU 302 16 | #define IDM_NEW 401 17 | #define IDM_MENU 402 18 | #define IDC_EDIT1 1003 19 | #define IDC_COMBO1 1005 20 | #define IDC_SELECT_DIRECTORY 1006 21 | #define ID_TOOLS_OPTION 32771 22 | #define ID_APP_OPTION 32772 23 | 24 | // Next default values for new objects 25 | // 26 | #ifdef APSTUDIO_INVOKED 27 | #ifndef APSTUDIO_READONLY_SYMBOLS 28 | #define _APS_NEXT_RESOURCE_VALUE 131 29 | #define _APS_NEXT_COMMAND_VALUE 32773 30 | #define _APS_NEXT_CONTROL_VALUE 1007 31 | #define _APS_NEXT_SYMED_VALUE 101 32 | #endif 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/unix/Makefile.am.build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | print< 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /**************************************** 25 | * Define 26 | ****************************************/ 27 | 28 | #define SYSTEM_TIME_BUF_LEN 128 29 | 30 | /**************************************** 31 | * Function 32 | ****************************************/ 33 | 34 | char* get_system_time_string(mUpnpTime currTime, char* buf); 35 | char* get_date_string(mUpnpTime currTime, char* buf); 36 | char* get_time_string(mUpnpTime currTime, char* buf); 37 | int get_second(mUpnpTime currTime); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhotosp.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // CDmsMobilePhotoSP.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | HI_RES_AWARE CEUX {1} // turn off the emulation layer 15 | // Remove this resource to enable pixel- 16 | // doubling on platforms that support it 17 | ///////////////////////////////////////////////////////////////////////////// 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | // 21 | // Data 22 | // 23 | 24 | IDR_MAINFRAME SHMENUBAR DISCARDABLE 25 | BEGIN 26 | IDR_MAINFRAME, 27 | 1, 28 | 29 | I_IMAGENONE, IDOK, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, 30 | IDS_OK, 0, NOMENU, 31 | END 32 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvServer.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import 13 | #import 14 | 15 | @class CGUpnpAvRenderer; 16 | @class CGUpnpAVPositionInfo; 17 | 18 | #if !defined(_CG_CLINKCAV_MEDIARENDERER_H_) 19 | typedef void CgUpnpAvRenderer; 20 | #endif 21 | 22 | /** 23 | * The CGUpnpAvRenderer class is a UPnP/AV media server class. 24 | */ 25 | @interface CGUpnpAvRenderer : CGUpnpDevice { 26 | } 27 | @property (assign, readonly) CgUpnpAvRenderer* cAvObject; 28 | - (id)init; 29 | - (id)initWithCObject:(CgUpnpDevice*)cobj; 30 | - (BOOL)setAVTransportURI:(NSString*)aURI; 31 | - (BOOL)play; 32 | - (BOOL)stop; 33 | - (BOOL)pause; 34 | - (BOOL)seek:(float)absTime; 35 | - (BOOL)isPlaying; 36 | /* 37 | - (BOOL)start 38 | - (BOOL)stop 39 | */ 40 | - (CGUpnpAVPositionInfo*)positionInfo; 41 | @end 42 | -------------------------------------------------------------------------------- /include/mupnp/upnp_limit.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #ifndef _MUPNP_UPNPLIMIT_H_ 13 | #define _MUPNP_UPNPLIMIT_H_ 14 | 15 | #ifdef HAVE_CONFIG_H 16 | #include "config.h" 17 | #endif 18 | 19 | #if defined(HAVE_STDINT_H) 20 | #include 21 | #else 22 | #include 23 | #endif 24 | 25 | #define MUPNP_ACTOINNAME_LEN_MAX 128 26 | 27 | /* DLNA specifies (7.2.26.6) max UDN length to 68 bytes, 28 | * we just play safe here and use 128 byte buffer. */ 29 | #define MUPNP_UDN_LEN_MAX 128 30 | #define MUPNP_LOCATION_URL_MAX 512 31 | #define MUPNP_CONTROLPOINT_EVENTSUBURL_MAX 512 32 | 33 | #if defined(HAVE_STDINT_H) 34 | #define MUPNP_NOTIFY_COUNT_MAX UINT32_MAX 35 | #else 36 | #define MUPNP_NOTIFY_COUNT_MAX UINT_MAX 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /wrapper/objc/xcode/mUPnP4ObjC/mUPnP4ObjC-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | NSHumanReadableCopyright 26 | Copyright © 2014年 Satoshi Konno. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.github/workflows/make.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v5 16 | - name: setup 17 | run: | 18 | sudo apt update 19 | sudo apt install -y libboost-all-dev autoconf autoconf-archive lcov 20 | - name: bootstrap 21 | run: ./bootstrap 22 | - name: configure 23 | run: | 24 | ./configure --enable-test --enable-code-coverage --enable-examples 25 | - name: make 26 | run: | 27 | make -j 20 28 | - name: make check 29 | run: | 30 | run: make check -j 20 || more test/unix/test-suite.log 31 | - name: generate coverage 32 | run: | 33 | make check-code-coverage 34 | - name: Upload coverage reports to Codecov 35 | uses: codecov/codecov-action@v4 36 | with: 37 | token: ${{ secrets.CODECOV_TOKEN }} 38 | slug: cybergarage/mupnp 39 | files: mupnp-*-coverage.info 40 | directory: '.' 41 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPBrowserAppDelegate.m: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPBrowserAppDelegate.m 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import "UPnPBrowserAppDelegate.h" 14 | 15 | @implementation UPnPBrowserAppDelegate 16 | 17 | @synthesize window; 18 | @synthesize navigationController; 19 | 20 | #pragma mark - 21 | #pragma mark Application lifecycle 22 | 23 | - (void)applicationDidFinishLaunching:(UIApplication*)application 24 | { 25 | 26 | [window addSubview:[navigationController view]]; 27 | [window makeKeyAndVisible]; 28 | } 29 | 30 | - (void)applicationWillTerminate:(UIApplication*)application 31 | { 32 | // Save data if appropriate 33 | } 34 | 35 | #pragma mark - 36 | #pragma mark Memory management 37 | 38 | - (void)dealloc 39 | { 40 | [navigationController release]; 41 | [window release]; 42 | [super dealloc]; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContainer.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/01. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * The CGUpnpAvContainer class is a container of UPnP/AV container. 13 | */ 14 | @interface CGUpnpAvContainer : CGUpnpAvObject { 15 | } 16 | @property (retain) NSMutableArray* childArray; 17 | - (id)init; 18 | #if !defined(TARGET_OS_IPHONE) 19 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode; 20 | #else 21 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode; 22 | #endif 23 | - (void)addChild:(CGUpnpAvObject*)obj; 24 | - (void)addChildren:(NSArray*)objArray; 25 | - (void)removeChild:(CGUpnpAvObject*)obj; 26 | - (void)removeAllChildren; 27 | - (NSArray*)children; 28 | - (CGUpnpAvObject*)childAtIndex:(NSUInteger)anIndex; 29 | - (CGUpnpAvObject*)childforId:(NSString*)anObjectId; 30 | - (CGUpnpAvObject*)childforTitle:(NSString*)aTitle; 31 | - (CGUpnpAvObject*)objectForId:(NSString*)anObjectId; 32 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aTitlePath; 33 | @end 34 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvContentDirectory.m: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvContentDirectory.m 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import "CGUpnpAvContentDirectory.h" 10 | #import "CGUpnpAvContentManager.h" 11 | #import "CGUpnpAvObject.h" 12 | #import "CGUpnpAvRoot.h" 13 | #import "CGXmlNode.h" 14 | 15 | @implementation CGUpnpAvContentDirectory 16 | 17 | @synthesize contentMgr; 18 | 19 | - (id)init 20 | { 21 | if ((self = [super init]) == nil) 22 | return nil; 23 | self.contentMgr = [[[CGUpnpAvContentManager alloc] init] autorelease]; 24 | return self; 25 | } 26 | 27 | - (void)dealloc 28 | { 29 | self.contentMgr = nil; 30 | [super dealloc]; 31 | } 32 | 33 | - (CGUpnpAvContainer*)rootObject 34 | { 35 | return [[self contentMgr] rootObj]; 36 | } 37 | 38 | - (CGUpnpAvObject*)objectForId:(NSString*)aObjectId 39 | { 40 | return [[self contentMgr] objectForId:aObjectId]; 41 | } 42 | 43 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aTitlePath 44 | { 45 | return [[self contentMgr] objectForTitlePath:aTitlePath]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /std/av/testunit/cppunitmain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "ClinkAVTestCase.h" 9 | 10 | int main(int argc, char* argv[]) 11 | { 12 | // Create the event manager and test controller 13 | CPPUNIT_NS::TestResult controller; 14 | 15 | // Add a listener that colllects test result 16 | CPPUNIT_NS::TestResultCollector result; 17 | controller.addListener(&result); 18 | 19 | // Add a listener that print dots as test run. 20 | CPPUNIT_NS::BriefTestProgressListener progress; 21 | controller.addListener(&progress); 22 | 23 | // Add the top suite to the test runner 24 | CPPUNIT_NS::TestRunner runner; 25 | runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest()); 26 | runner.run(controller); 27 | 28 | // Print test in a compiler compatible format. 29 | CPPUNIT_NS::CompilerOutputter outputter(&result, std::cerr); 30 | outputter.write(); 31 | 32 | return result.wasSuccessful() ? 0 : 1; 33 | } 34 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | mUPnP for C 2 | 3 | Maintainer: 4 | 5 | Satoshi Konno 6 | 7 | Authors: 8 | 9 | Satoshi Konno 10 | 11 | Contributors: 12 | 13 | Adavy 14 | Andre 15 | Brian Owens 16 | Brent Hills 17 | Darrell Young 18 | Dimas 19 | Giordano Sassaroli 20 | Giordano Steven Yen 21 | Inma Marin Lopez . 22 | Jay Deen 23 | Roland Moser er@nokia.com>t> 24 | Lorenzo Vicisano 25 | Markus Thurner 26 | Mikael Hakman 27 | Oliver Newell 28 | Ralf G. R. Bergs 29 | Rick Keiner 30 | Rob van den Boomen 31 | Smolander Visa 32 | Stefano Lenzi 33 | Suzan Foster 34 | Theo Beisch 35 | Thomas Schulz 36 | Tino 37 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhotoView.h: -------------------------------------------------------------------------------- 1 | // CDmsMobilePhotoView.h : interface of the CCDmsMobilePhotoView class 2 | // 3 | 4 | #pragma once 5 | 6 | class CCDmsMobilePhotoView : public CView { 7 | protected: // create from serialization only 8 | CCDmsMobilePhotoView(); 9 | DECLARE_DYNCREATE(CCDmsMobilePhotoView) 10 | 11 | // Attributes 12 | public: 13 | CCDmsMobilePhotoDoc* GetDocument() const; 14 | 15 | // Operations 16 | public: 17 | // Overrides 18 | public: 19 | virtual void OnDraw(CDC* pDC); // overridden to draw this view 20 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 21 | 22 | protected: 23 | // Implementation 24 | public: 25 | virtual ~CCDmsMobilePhotoView(); 26 | #ifdef _DEBUG 27 | virtual void AssertValid() const; 28 | #endif 29 | 30 | protected: 31 | // Generated message map functions 32 | protected: 33 | DECLARE_MESSAGE_MAP() 34 | public: 35 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 36 | }; 37 | 38 | #ifndef _DEBUG // debug version in CDmsMobilePhotoView.cpp 39 | inline CCDmsMobilePhotoDoc* CCDmsMobilePhotoView::GetDocument() const 40 | { 41 | return reinterpret_cast(m_pDocument); 42 | } 43 | #endif 44 | -------------------------------------------------------------------------------- /std/av/testunit/ClinkAVTestCaseRenderer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "ClinkAVTestCase.h" 6 | 7 | //////////////////////////////////////// 8 | // testDevice 9 | //////////////////////////////////////// 10 | 11 | #define TEST_LASTCHANGE_VALUE \ 12 | "<Event xmlns = "urn:schemas-upnp-org:metadata-1-0/RCS/">" \ 13 | "<InstanceID val="0">" \ 14 | "<Volume val="100" channel="RF"/>" \ 15 | "<Volume val="100" channel="LF"/>" \ 16 | "</InstanceID>" \ 17 | "</Event>" 18 | 19 | void ClinkAVTestCase::testRenderer() 20 | { 21 | CgUpnpAvRenderer* dmr = cg_upnpav_dmr_new(); 22 | 23 | cg_upnpav_dmr_start(dmr); 24 | 25 | cg_upnpav_dmr_setrenderingcontrollastchange(dmr, TEST_LASTCHANGE_VALUE); 26 | CPPUNIT_ASSERT(cg_streq(TEST_LASTCHANGE_VALUE, cg_upnpav_dmr_getrenderingcontrollastchange(dmr))); 27 | 28 | while (1) { 29 | cg_sleep(1000); 30 | } 31 | 32 | cg_upnpav_dmr_stop(dmr); 33 | } 34 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/res/CDmsMobilePhotoppc.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // CDmsMobilePhotoPPC.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | HI_RES_AWARE CEUX {1} // turn off the emulation layer 15 | // Remove this resource to enable pixel- 16 | // doubling on platforms that support it 17 | ///////////////////////////////////////////////////////////////////////////// 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | // 21 | // SHMENUBAR 22 | // 23 | 24 | IDR_MAINFRAME SHMENUBAR DISCARDABLE 25 | BEGIN 26 | IDR_MAINFRAME, 27 | 2, 28 | 29 | I_IMAGENONE, ID_FILE_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_AUTOSIZE, 30 | IDS_NEW, 0, NOMENU, 31 | 32 | I_IMAGENONE, IDM_MENU, TBSTATE_ENABLED, TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, 33 | IDS_MENU, 0, 0, 34 | END 35 | -------------------------------------------------------------------------------- /src/mupnp/icon.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_icon_new 17 | ****************************************/ 18 | 19 | mUpnpIcon* mupnp_icon_new(void) 20 | { 21 | mUpnpIcon* dev; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | dev = (mUpnpIcon*)malloc(sizeof(mUpnpIcon)); 26 | 27 | if (NULL != dev) 28 | mupnp_list_node_init((mUpnpList*)dev); 29 | 30 | mupnp_log_debug_l4("Leaving...\n"); 31 | 32 | return dev; 33 | } 34 | 35 | /**************************************** 36 | * mupnp_icon_delete 37 | ****************************************/ 38 | 39 | void mupnp_icon_delete(mUpnpIcon* dev) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_list_remove((mUpnpList*)dev); 44 | free(dev); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | Checks: 'readability-identifier-naming' 2 | HeaderFilterRegex: '.*' 3 | CheckOptions: 4 | - key: readability-identifier-naming.GlobalConstantCase 5 | value: UPPER_CASE 6 | - key: readability-identifier-naming.ClassCase 7 | value: CamelCase 8 | - key: readability-identifier-naming.StructCase 9 | value: CamelCase 10 | - key: readability-identifier-naming.StructIgnoredRegexp 11 | value: '.*[mUpnp|CG].*' 12 | - key: readability-identifier-naming.EnumCase 13 | value: CamelCase 14 | - key: readability-identifier-naming.EnumIgnoredRegexp 15 | value: '.*[mUpnp|CG].*' 16 | - key: readability-identifier-naming.UnionCase 17 | value: CamelCase 18 | - key: readability-identifier-naming.FunctionCase 19 | value: lower_case 20 | - key: readability-identifier-naming.MemberCase 21 | value: camelBack 22 | - key: readability-identifier-naming.ParameterCase 23 | value: camelBack 24 | - key: readability-identifier-naming.VariableCase 25 | value: camelBack 26 | -------------------------------------------------------------------------------- /src/mupnp/ssdp/httpu_socket.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_httpu_socket_recv 17 | ****************************************/ 18 | 19 | ssize_t mupnp_httpu_socket_recv(mUpnpHttpMuSocket* sock, mUpnpSSDPPacket* ssdpPkt) 20 | { 21 | mUpnpDatagramPacket* dgmPkt; 22 | char* ssdpData; 23 | ssize_t recvLen; 24 | 25 | mupnp_log_debug_l4("Entering...\n"); 26 | 27 | dgmPkt = mupnp_ssdp_packet_getdatagrampacket(ssdpPkt); 28 | recvLen = mupnp_socket_recv(sock, dgmPkt); 29 | 30 | if (recvLen <= 0) 31 | return recvLen; 32 | 33 | ssdpData = mupnp_socket_datagram_packet_getdata(dgmPkt); 34 | mupnp_ssdp_packet_setheader(ssdpPkt, ssdpData); 35 | mupnp_socket_datagram_packet_setdata(dgmPkt, NULL); 36 | 37 | mupnp_log_debug_l4("Leaving...\n"); 38 | 39 | return recvLen; 40 | } 41 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGXmlNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGXmlNode.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/01. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #if defined(TARGET_OS_IPHONE) 10 | #import 11 | #import 12 | #else 13 | #import 14 | #endif 15 | 16 | #if defined(TARGET_OS_IPHONE) && !defined(_CG_XML_CXML_H_) 17 | typedef void CgXmlNode; 18 | #endif 19 | 20 | /** 21 | * The CGXmlNode class is a wrapper class for NSXMLNode. 22 | */ 23 | @interface CGXmlNode : NSObject { 24 | id userInfo; 25 | } 26 | #if !defined(TARGET_OS_IPHONE) 27 | @property (retain) NSXMLElement* xmlNode; 28 | #else 29 | @property (assign) CgXmlNode* cXmlNode; 30 | #endif 31 | @property (retain) id userInfo; 32 | - (id)init; 33 | #if !defined(TARGET_OS_IPHONE) 34 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode; 35 | #else 36 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode; 37 | #endif 38 | - (NSString*)attributeValueForName:(NSString*)aName; 39 | - (NSString*)elementValueForName:(NSString*)aName; 40 | - (NSString*)stringValue; 41 | - (void)setStringValue:(NSString*)aValue; 42 | - (void)setAttributeWithName:(NSString*)aName stringValue:(NSString*)aValue; 43 | @end 44 | -------------------------------------------------------------------------------- /test/TestDevice.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #ifndef _MUPNP_TEST_DEVICE_H_ 13 | #define _MUPNP_TEST_DEVICE_H_ 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define TEST_DEVICE_DEVICE_TYPE "urn:schemas-upnp-org:device:BinaryLight:1" 22 | 23 | #define TEST_DEVICE_EMBEDDEDDEVICE_TYPE1 "urn:schemas-upnp-org:device:EmbeddedsBinaryLight:1" 24 | #define TEST_DEVICE_EMBEDDEDDEVICE_TYPE2 "urn:schemas-upnp-org:device:EmbeddedsBinaryLight:2" 25 | 26 | #define TEST_DEVICE_SERVICE_TYPE "urn:schemas-upnp-org:service:SwitchPower:1" 27 | 28 | #define TEST_DEVICE_FREINDLYNAME "CyberGarage Power Device" 29 | #define TEST_DEVICE_STATEVARIABLE_STATUS "Status" 30 | 31 | /**************************************** 32 | * Function 33 | ****************************************/ 34 | 35 | mUpnpDevice* upnp_test_device_new(void); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvResource.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvResource.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/02. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * The CGUpnpAvResource class is a wrapper class for CgUpnpAction of mUPnP for C. 13 | */ 14 | @interface CGUpnpAvResource : CGXmlNode { 15 | } 16 | - (id)init; 17 | #if !defined(TARGET_OS_IPHONE) 18 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode; 19 | #else 20 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode; 21 | #endif 22 | - (NSString*)url; 23 | - (long long)size; 24 | - (NSString*)protocolInfo; 25 | - (NSString*)protocolInfoAtIndex:(NSUInteger)anIndex; 26 | - (NSString*)protocol; 27 | - (NSString*)network; 28 | - (NSString*)contentFormat; 29 | - (NSString*)mimeType; 30 | - (NSString*)extention; 31 | - (NSString*)additionalInfo; 32 | - (NSString*)additionalInfoForKey:(NSString*)aKey; 33 | - (NSString*)dlnaOrgPn; 34 | - (NSString*)dlnaOrgOp; 35 | - (NSString*)dlnaOrgFlags; 36 | - (CGSize)resolution; 37 | - (BOOL)isThumbnail; 38 | - (BOOL)isSmallImage; 39 | - (BOOL)isMediumImage; 40 | - (BOOL)isLargeImage; 41 | - (BOOL)isImage; 42 | - (BOOL)isMovie; 43 | - (BOOL)isVideo; 44 | - (BOOL)isAudio; 45 | @end 46 | -------------------------------------------------------------------------------- /test/unix/Makefile.am.build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | print< 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_iconr_new 17 | ****************************************/ 18 | 19 | mUpnpIconList* mupnp_iconlist_new(void) 20 | { 21 | mUpnpIcon* iconList; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | iconList = (mUpnpIcon*)malloc(sizeof(mUpnpIcon)); 26 | 27 | if (NULL != iconList) 28 | mupnp_list_header_init((mUpnpList*)iconList); 29 | 30 | return iconList; 31 | 32 | mupnp_log_debug_l4("Leaving...\n"); 33 | } 34 | 35 | /**************************************** 36 | * mupnp_iconr_delete 37 | ****************************************/ 38 | 39 | void mupnp_iconlist_delete(mUpnpIconList* iconList) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_list_remove((mUpnpList*)iconList); 44 | free(iconList); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /src/mupnp/xml/xml_parser.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | /**************************************** 17 | * mupnp_xml_parser_new 18 | ****************************************/ 19 | 20 | mUpnpXmlParser* mupnp_xml_parser_new(void) 21 | { 22 | mUpnpXmlParser* parser; 23 | 24 | mupnp_log_debug_l4("Entering...\n"); 25 | 26 | parser = (mUpnpXmlParser*)malloc(sizeof(mUpnpXmlParser)); 27 | 28 | if (NULL != parser) { 29 | parser->parseResult = false; 30 | } 31 | return parser; 32 | 33 | mupnp_log_debug_l4("Leaving...\n"); 34 | } 35 | 36 | /**************************************** 37 | * mupnp_xml_parser_delete 38 | ****************************************/ 39 | 40 | void mupnp_xml_parser_delete(mUpnpXmlParser* parser) 41 | { 42 | mupnp_log_debug_l4("Entering...\n"); 43 | 44 | free(parser); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /src/mupnp/device_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_devicelist_new 17 | ****************************************/ 18 | 19 | mUpnpDeviceList* mupnp_devicelist_new(void) 20 | { 21 | mUpnpDeviceList* devList; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | devList = (mUpnpDeviceList*)malloc(sizeof(mUpnpDeviceList)); 26 | 27 | if (NULL != devList) 28 | mupnp_list_header_init((mUpnpList*)devList); 29 | 30 | return devList; 31 | 32 | mupnp_log_debug_l4("Leaving...\n"); 33 | } 34 | 35 | /**************************************** 36 | * mupnp_devicelist_delete 37 | ****************************************/ 38 | 39 | void mupnp_devicelist_delete(mUpnpDeviceList* devList) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_devicelist_clear(devList); 44 | free(devList); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /src/mupnp/action_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_action_new 17 | ****************************************/ 18 | 19 | mUpnpActionList* mupnp_actionlist_new(void) 20 | { 21 | mUpnpAction* actionList; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | actionList = (mUpnpAction*)malloc(sizeof(mUpnpAction)); 26 | 27 | if (NULL != actionList) 28 | mupnp_list_header_init((mUpnpList*)actionList); 29 | 30 | return actionList; 31 | 32 | mupnp_log_debug_l4("Leaving...\n"); 33 | } 34 | 35 | /**************************************** 36 | * mupnp_action_delete 37 | ****************************************/ 38 | 39 | void mupnp_actionlist_delete(mUpnpActionList* actionList) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_list_remove((mUpnpList*)actionList); 44 | free(actionList); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /src/mupnp/service_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_servicelist_new 17 | ****************************************/ 18 | 19 | mUpnpServiceList* mupnp_servicelist_new(void) 20 | { 21 | mUpnpServiceList* serviceList; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | serviceList = (mUpnpServiceList*)malloc(sizeof(mUpnpServiceList)); 26 | 27 | if (NULL != serviceList) 28 | mupnp_list_header_init((mUpnpList*)serviceList); 29 | 30 | return serviceList; 31 | 32 | mupnp_log_debug_l4("Leaving...\n"); 33 | } 34 | 35 | /**************************************** 36 | * mupnp_servicelist_delete 37 | ****************************************/ 38 | 39 | void mupnp_servicelist_delete(mUpnpServiceList* serviceList) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_servicelist_clear(serviceList); 44 | free(serviceList); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /src/mupnp/net/socket_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | #if defined(MUPNP_NET_USE_SOCKET_LIST) 16 | 17 | /**************************************** 18 | * mupnp_socketlist_new 19 | ****************************************/ 20 | 21 | mUpnpSocketList* mupnp_socketlist_new() 22 | { 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | mUpnpSocketList* socketList = (mUpnpSocketList*)malloc(sizeof(mUpnpSocketList)); 26 | 27 | if (NULL != socketList) 28 | mupnp_list_header_init((mUpnpList*)socketList); 29 | 30 | return socketList; 31 | 32 | mupnp_log_debug_l4("Leaving...\n"); 33 | } 34 | 35 | /**************************************** 36 | * mupnp_socketlist_delete 37 | ****************************************/ 38 | 39 | void mupnp_socketlist_delete(mUpnpSocketList* socketList) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_socketlist_clear(socketList); 44 | free(socketList); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/upnpbrowser.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIconFiles 14 | 15 | Icon.png 16 | Icon@2x.png 17 | 18 | CFBundleIdentifier 19 | $(PRODUCT_BUNDLE_IDENTIFIER) 20 | CFBundleInfoDictionaryVersion 21 | 6.0 22 | CFBundleName 23 | ${PRODUCT_NAME} 24 | CFBundlePackageType 25 | APPL 26 | CFBundleSignature 27 | ???? 28 | CFBundleVersion 29 | $(CURRENT_PROJECT_VERSION) 30 | LSRequiresIPhoneOS 31 | 32 | NSMainNibFile 33 | MainWindow 34 | CFBundleShortVersionString 35 | $(MARKETING_VERSION) 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/mupnp/soap/soap.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_soap_createenvelopebodynode 17 | ****************************************/ 18 | 19 | mUpnpXmlNode* mupnp_soap_createenvelopebodynode(void) 20 | { 21 | mUpnpXmlNode* envNode; 22 | mUpnpXmlNode* bodyNode; 23 | 24 | mupnp_log_debug_l4("Entering...\n"); 25 | 26 | envNode = mupnp_xml_node_new(); 27 | mupnp_xml_node_setname(envNode, MUPNP_SOAP_XMLNS MUPNP_SOAP_DELIM MUPNP_SOAP_ENVELOPE); 28 | mupnp_xml_node_setattribute(envNode, MUPNP_SOAP_ATTRIBUTE_XMLNS MUPNP_SOAP_DELIM MUPNP_SOAP_XMLNS, MUPNP_SOAP_XMLNS_URL); 29 | mupnp_xml_node_setattribute(envNode, MUPNP_SOAP_XMLNS MUPNP_SOAP_DELIM MUPNP_SOAP_ENCORDING, MUPNP_SOAP_ENCSTYLE_URL); 30 | 31 | bodyNode = mupnp_xml_node_new(); 32 | mupnp_xml_node_setname(bodyNode, MUPNP_SOAP_XMLNS MUPNP_SOAP_DELIM MUPNP_SOAP_BODY); 33 | mupnp_xml_node_addchildnode(envNode, bodyNode); 34 | 35 | return envNode; 36 | 37 | mupnp_log_debug_l4("Leaving...\n"); 38 | } 39 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhotoDoc.cpp: -------------------------------------------------------------------------------- 1 | // CDmsMobilePhotoDoc.cpp : implementation of the CCDmsMobilePhotoDoc class 2 | // 3 | 4 | #include "CDmsMobilePhoto.h" 5 | #include "stdafx.h" 6 | 7 | #include "CDmsMobilePhotoDoc.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #endif 12 | 13 | // CCDmsMobilePhotoDoc 14 | 15 | IMPLEMENT_DYNCREATE(CCDmsMobilePhotoDoc, CDocument) 16 | 17 | BEGIN_MESSAGE_MAP(CCDmsMobilePhotoDoc, CDocument) 18 | END_MESSAGE_MAP() 19 | 20 | // CCDmsMobilePhotoDoc construction/destruction 21 | 22 | CCDmsMobilePhotoDoc::CCDmsMobilePhotoDoc() 23 | { 24 | // TODO: add one-time construction code here 25 | } 26 | 27 | CCDmsMobilePhotoDoc::~CCDmsMobilePhotoDoc() 28 | { 29 | } 30 | 31 | BOOL CCDmsMobilePhotoDoc::OnNewDocument() 32 | { 33 | if (!CDocument::OnNewDocument()) 34 | return FALSE; 35 | 36 | // TODO: add reinitialization code here 37 | // (SDI documents will reuse this document) 38 | 39 | return TRUE; 40 | } 41 | 42 | // CCDmsMobilePhotoDoc serialization 43 | 44 | #ifndef _WIN32_WCE_NO_ARCHIVE_SUPPORT 45 | void CCDmsMobilePhotoDoc::Serialize(CArchive& ar) 46 | { 47 | (ar); 48 | } 49 | #endif // !_WIN32_WCE_NO_ARCHIVE_SUPPORT 50 | 51 | // CCDmsMobilePhotoDoc diagnostics 52 | 53 | #ifdef _DEBUG 54 | void CCDmsMobilePhotoDoc::AssertValid() const 55 | { 56 | CDocument::AssertValid(); 57 | } 58 | #endif //_DEBUG 59 | 60 | // CCDmsMobilePhotoDoc commands 61 | -------------------------------------------------------------------------------- /wrapper/objc/mUPnP/CGUpnpIcon.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for ObjC 4 | * 5 | * Copyright (C) Satoshi Konno 2008 6 | * 7 | * This is licensed under BSD-style license, see file COPYING. 8 | * 9 | ******************************************************************/ 10 | 11 | #import 12 | #import 13 | 14 | #if !defined(_MUPNP_ICON_H_) 15 | typedef void mUpnpIcon; 16 | #endif 17 | 18 | /** 19 | * The CGUpnpIcon class is a wrapper class for mUpnpIcon of mUPnP for C. 20 | */ 21 | @interface CGUpnpIcon : NSObject { 22 | #if defined(TARGET_OS_IPHONE) 23 | NSString* resourceName; 24 | #endif 25 | } 26 | @property (assign, readonly) mUpnpIcon* cObject; 27 | #if defined(TARGET_OS_IPHONE) 28 | @property (readonly) NSString* resourceName; 29 | #endif 30 | - (id)initWithCObject:(mUpnpIcon*)cobj; 31 | /** 32 | * Get the url of the icon. 33 | * 34 | * @return The url. 35 | */ 36 | - (NSString*)url; 37 | /** 38 | * Get the url of the width. 39 | * 40 | * @return The width. 41 | */ 42 | - (NSInteger)width; 43 | /** 44 | * Get the height of the icon. 45 | * 46 | * @return The height. 47 | */ 48 | - (NSInteger)height; 49 | /** 50 | * Get the depth of the icon. 51 | * 52 | * @return The depth. 53 | */ 54 | - (NSInteger)depth; 55 | #if defined(TARGET_OS_IPHONE) 56 | - (void)setResourceName:(NSString*)aResourceName; 57 | #endif 58 | @end 59 | -------------------------------------------------------------------------------- /src/mupnp/argument.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_argument_new 17 | ****************************************/ 18 | 19 | mUpnpArgument* mupnp_argument_new(void) 20 | { 21 | mUpnpArgument* arg; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | arg = (mUpnpArgument*)malloc(sizeof(mUpnpArgument)); 26 | 27 | if (NULL != arg) { 28 | mupnp_list_node_init((mUpnpList*)arg); 29 | 30 | arg->serviceNode = NULL; 31 | arg->argumentNode = NULL; 32 | 33 | arg->value = mupnp_string_new(); 34 | } 35 | 36 | mupnp_log_debug_l4("Leaving...\n"); 37 | 38 | return arg; 39 | } 40 | 41 | /**************************************** 42 | * mupnp_argument_delete 43 | ****************************************/ 44 | 45 | void mupnp_argument_delete(mUpnpArgument* arg) 46 | { 47 | mupnp_log_debug_l4("Entering...\n"); 48 | 49 | mupnp_list_remove((mUpnpList*)arg); 50 | 51 | mupnp_string_delete(arg->value); 52 | 53 | mupnp_log_debug_l4("Leaving...\n"); 54 | 55 | free(arg); 56 | } 57 | -------------------------------------------------------------------------------- /src/mupnp/io/file_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | 14 | #if defined(MUPNP_USE_CFILE) 15 | 16 | #include 17 | 18 | /**************************************** 19 | * mupnp_filelist_new 20 | ****************************************/ 21 | 22 | mUpnpFileList* mupnp_filelist_new() 23 | { 24 | mUpnpFileList* fileList; 25 | 26 | mupnp_log_debug_l4("Entering...\n"); 27 | 28 | fileList = (mUpnpFileList*)malloc(sizeof(mUpnpFileList)); 29 | 30 | if (NULL != fileList) { 31 | mupnp_list_header_init((mUpnpList*)fileList); 32 | fileList->name = NULL; 33 | fileList->path = NULL; 34 | fileList->content = NULL; 35 | } 36 | 37 | mupnp_log_debug_l4("Leaving...\n"); 38 | 39 | return fileList; 40 | } 41 | 42 | /**************************************** 43 | * mupnp_filelist_delete 44 | ****************************************/ 45 | 46 | void mupnp_filelist_delete(mUpnpFileList* fileList) 47 | { 48 | mupnp_log_debug_l4("Entering...\n"); 49 | 50 | mupnp_filelist_clear(fileList); 51 | free(fileList); 52 | 53 | mupnp_log_debug_l4("Leaving...\n"); 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /test/StateVariableTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | 14 | #include "TestDevice.h" 15 | 16 | //////////////////////////////////////// 17 | // testDevice 18 | //////////////////////////////////////// 19 | 20 | #define TEST_UPDATE_STATEVARIABLE_UPDATEVALUE "4649" 21 | 22 | BOOST_AUTO_TEST_CASE(StateVariable) 23 | { 24 | mUpnpDevice* testDev = upnp_test_device_new(); 25 | BOOST_REQUIRE(testDev); 26 | BOOST_REQUIRE(mupnp_device_start(testDev)); 27 | 28 | // Update State Variable 29 | mUpnpService* testDevService = mupnp_device_getservicebyexacttype(testDev, TEST_DEVICE_SERVICE_TYPE); 30 | BOOST_REQUIRE(testDevService != NULL); 31 | mUpnpStateVariable* testDevState = mupnp_service_getstatevariablebyname(testDevService, TEST_DEVICE_STATEVARIABLE_STATUS); 32 | BOOST_REQUIRE(testDevState != NULL); 33 | mupnp_statevariable_setvalue(testDevState, TEST_UPDATE_STATEVARIABLE_UPDATEVALUE); 34 | BOOST_REQUIRE(mupnp_streq(mupnp_statevariable_getvalue(testDevState), TEST_UPDATE_STATEVARIABLE_UPDATEVALUE)); 35 | 36 | BOOST_REQUIRE(mupnp_device_stop(testDev)); 37 | mupnp_device_delete(testDev); 38 | } 39 | -------------------------------------------------------------------------------- /src/mupnp/servicestate_table.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_servicestatetable_new 17 | ****************************************/ 18 | 19 | mUpnpServiceStateTable* mupnp_servicestatetable_new(void) 20 | { 21 | mUpnpServiceStateTable* statevariableTable; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | statevariableTable = (mUpnpServiceStateTable*)malloc(sizeof(mUpnpServiceStateTable)); 26 | 27 | if (NULL != statevariableTable) 28 | mupnp_list_header_init((mUpnpList*)statevariableTable); 29 | 30 | mupnp_log_debug_l4("Leaving...\n"); 31 | 32 | return statevariableTable; 33 | } 34 | 35 | /**************************************** 36 | * mupnp_servicestatetable_delete 37 | ****************************************/ 38 | 39 | void mupnp_servicestatetable_delete(mUpnpServiceStateTable* statevariableTable) 40 | { 41 | mupnp_log_debug_l4("Entering...\n"); 42 | 43 | mupnp_list_remove((mUpnpList*)statevariableTable); 44 | free(statevariableTable); 45 | 46 | mupnp_log_debug_l4("Leaving...\n"); 47 | } 48 | -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | ############################################################ 2 | # 3 | # mUPnP for C 4 | # 5 | # Copyright (C) Satoshi Konno 2005 6 | # 7 | ############################################################ 8 | 9 | mupnp_headers = \ 10 | ./mupnp/xml/xml.h \ 11 | ./mupnp/upnp_status.h \ 12 | ./mupnp/device.h \ 13 | ./mupnp/typedef.h \ 14 | ./mupnp/version.h \ 15 | ./mupnp/controlpoint.h \ 16 | ./mupnp/control/control.h \ 17 | ./mupnp/ssdp/ssdp_server.h \ 18 | ./mupnp/ssdp/ssdp.h \ 19 | ./mupnp/service.h \ 20 | ./mupnp/soap/soap.h \ 21 | ./mupnp/statevariable.h \ 22 | ./mupnp/upnp_limit.h \ 23 | ./mupnp/argument.h \ 24 | ./mupnp/net/socket.h \ 25 | ./mupnp/net/interface.h \ 26 | ./mupnp/net/uri.h \ 27 | ./mupnp/net/url.h \ 28 | ./mupnp/event/property.h \ 29 | ./mupnp/event/subscriber.h \ 30 | ./mupnp/event/subscription.h \ 31 | ./mupnp/event/notify.h \ 32 | ./mupnp/event/event.h \ 33 | ./mupnp/http/http.h \ 34 | ./mupnp/util/cond.h \ 35 | ./mupnp/util/list.h \ 36 | ./mupnp/util/log.h \ 37 | ./mupnp/util/dictionary.h \ 38 | ./mupnp/util/string.h \ 39 | ./mupnp/util/mutex.h \ 40 | ./mupnp/util/thread.h \ 41 | ./mupnp/util/time.h \ 42 | ./mupnp/upnp_function.h \ 43 | ./mupnp/icon.h \ 44 | ./mupnp/action.h \ 45 | ./mupnp/upnp.h \ 46 | ./mupnp/io/file.h 47 | 48 | 49 | mupnp/upnp.h: $(top_builddir)/config.h 50 | sed -e "s/MUPNP_VER/MUPNP_VER \"$(PACKAGE_VERSION)\"/" \ 51 | $(srcdir)/mupnp/upnp.h.in > $(srcdir)/mupnp/upnp.h 52 | 53 | nobase_include_HEADERS = \ 54 | $(mupnp_headers) 55 | -------------------------------------------------------------------------------- /std/av/include/cybergarage/upnp/std/av/cupnpav.h: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cupnpav.h 8 | * 9 | * Revision: 10 | * 2008/06/16 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #ifndef _CG_CLINKCAV_CUPNPAV_H_ 16 | #define _CG_CLINKCAV_CUPNPAV_H_ 17 | 18 | #include 19 | #include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | #define CG_UPNPAV_OBJECT_ID "id" 26 | #define CG_UPNPAV_OBJECT_PARENTID "parentID" 27 | #define CG_UPNPAV_OBJECT_CHILDCOUNT "childCount" 28 | #define CG_UPNPAV_OBJECT_RESTRICTED "restricted" 29 | #define CG_UPNPAV_OBJECT_TITLE "dc:title" 30 | #define CG_UPNPAV_OBJECT_DATE "dc:date" 31 | #define CG_UPNPAV_OBJECT_UPNPCLASS "upnp:class" 32 | #define CG_UPNPAV_OBJECT_ALBUMARTURI "upnp:albumArtURI" 33 | #define CG_UPNPAV_OBJECT_ROOT_ID "0" 34 | 35 | typedef BOOL (*CG_UPNPAV_HTTP_LISTENER)(mUpnpHttpRequest*); 36 | typedef BOOL (*CG_UPNPAV_ACTION_LISTNER)(mUpnpAction*); 37 | typedef BOOL (*CG_UPNPAV_STATEVARIABLE_LISTNER)(mUpnpStateVariable*); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/License: -------------------------------------------------------------------------------- 1 | Cyber Media Gate for Youtube 2 | Copyright (c) 2006 Satoshi Konno 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. The name of the author may not be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | 27 | Cyber Media Gate for Youtube uses FFMPEG, LAME and Expat. -------------------------------------------------------------------------------- /test/XMLTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | //////////////////////////////////////// 17 | // XML 18 | //////////////////////////////////////// 19 | 20 | BOOST_AUTO_TEST_CASE(XMLChildNode) 21 | { 22 | const char* xmlChildNodeName = "cnode"; 23 | const char* xmlChildNodeValue = "cnode_value"; 24 | 25 | mUpnpXmlNode* parentNode = mupnp_xml_node_new(); 26 | BOOST_REQUIRE(parentNode); 27 | 28 | BOOST_REQUIRE(!mupnp_xml_node_removechildnode(parentNode, xmlChildNodeName)); 29 | 30 | // Set child node 31 | 32 | mupnp_xml_node_setchildnode(parentNode, xmlChildNodeName, xmlChildNodeValue); 33 | mUpnpXmlNode* childNode = mupnp_xml_node_getchildnode(parentNode, xmlChildNodeName); 34 | BOOST_REQUIRE(childNode); 35 | BOOST_REQUIRE_EQUAL(strcmp(xmlChildNodeValue, mupnp_xml_node_getvalue(childNode)), 0); 36 | BOOST_REQUIRE_EQUAL(strcmp(xmlChildNodeValue, mupnp_xml_node_getchildnodevalue(parentNode, xmlChildNodeName)), 0); 37 | 38 | // Remove child node 39 | 40 | BOOST_REQUIRE(mupnp_xml_node_removechildnode(parentNode, xmlChildNodeName)); 41 | BOOST_REQUIRE(mupnp_xml_node_getchildnode(parentNode, xmlChildNodeName) == NULL); 42 | } 43 | -------------------------------------------------------------------------------- /std/av/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2002-2003 Satoshi Konno 2 | All rights reserved. 3 | mUPnP for C 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | 14 | CyberLink for C has been supported from IPA, INFORMATION-TECHNOLOGY PROMOTION AGENCY, JAPAN, as a project of Exploratory Software Project. -------------------------------------------------------------------------------- /std/av/src/cybergarage/upnp/std/av/cresource_data.c: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cresource_data.c 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #include 16 | #include 17 | 18 | /**************************************** 19 | * cg_upnpav_resource_data_new 20 | ****************************************/ 21 | 22 | CgUpnpAvResourceData* cg_upnpav_resource_data_new() 23 | { 24 | CgUpnpAvResourceData* resData; 25 | 26 | resData = (CgUpnpAvResourceData*)malloc(sizeof(CgUpnpAvResourceData)); 27 | resData->mimeType = cg_string_new(); 28 | resData->dlnaAttr = cg_string_new(); 29 | 30 | return resData; 31 | } 32 | 33 | /**************************************** 34 | * cg_upnpav_resource_data_delete 35 | ****************************************/ 36 | 37 | void cg_upnpav_resource_data_delete(CgUpnpAvResourceData* resData) 38 | { 39 | cg_string_delete(resData->mimeType); 40 | cg_string_delete(resData->dlnaAttr); 41 | free(resData); 42 | } 43 | 44 | /**************************************** 45 | * cg_upnpav_resource_data_copy 46 | ****************************************/ 47 | 48 | void cg_upnpav_resource_data_copy(CgUpnpAvResourceData* destResData, CgUpnpAvResourceData* srcResData) 49 | { 50 | cg_string_setvalue(destResData->mimeType, cg_string_getvalue(srcResData->mimeType)); 51 | } 52 | -------------------------------------------------------------------------------- /std/av/lib/unix/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LIBRARIES = libmupnpav.a 2 | 3 | AM_CPPFLAGS = -I$(top_srcdir)/include 4 | 5 | ######################################## 6 | # Sources 7 | ######################################## 8 | 9 | clinkcav_source = ../../src/cybergarage/upnp/std/av/ccontent.c \ 10 | ../../src/cybergarage/upnp/std/av/ccontent_list.c \ 11 | ../../src/cybergarage/upnp/std/av/cdidl.c \ 12 | ../../src/cybergarage/upnp/std/av/cmd5.c \ 13 | ../../src/cybergarage/upnp/std/av/cresource.c \ 14 | ../../src/cybergarage/upnp/std/av/cresource_list.c \ 15 | ../../src/cybergarage/upnp/std/av/cresource_data.c \ 16 | ../../src/cybergarage/upnp/std/av/server/cconnectionmgr_service.c \ 17 | ../../src/cybergarage/upnp/std/av/server/ccontentdir_service.c \ 18 | ../../src/cybergarage/upnp/std/av/server/cmediaserver_device.c \ 19 | ../../src/cybergarage/upnp/std/av/cprotocolinfo_list.c \ 20 | ../../src/cybergarage/upnp/std/av/cprotocolinfo.c \ 21 | ../../src/cybergarage/upnp/std/av/renderer/cavtransport_service.c \ 22 | ../../src/cybergarage/upnp/std/av/renderer/cmediarenderer_device.c \ 23 | ../../src/cybergarage/upnp/std/av/renderer/crenderingcontrol_service.c \ 24 | ../../src/cybergarage/upnp/std/av/renderer/cconnectionmgrr_service.c 25 | 26 | ######################################## 27 | # Library 28 | ######################################## 29 | 30 | libmupnpavincludedir = $(includedir)/cybergarage 31 | nobase_libmupnpavinclude_HEADERS = \ 32 | $(clinkcav_header) 33 | 34 | libmupnpav_a_SOURCES = \ 35 | $(clinkcav_source) 36 | libmupnpav_a_CFLAGS = $(AM_CFLAGS) 37 | libmupnpav_a_LIBADD = -------------------------------------------------------------------------------- /wrapper/objc/mUPnP/CGUpnpStateVariable.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for ObjC 4 | * 5 | * Copyright (C) Satoshi Konno 2008 6 | * 7 | * This is licensed under BSD-style license, see file COPYING. 8 | * 9 | ******************************************************************/ 10 | 11 | #import 12 | 13 | #if !defined(_MUPNP_STATEVARIABLE_H_) 14 | typedef void mUpnpStateVariable; 15 | #endif 16 | 17 | /** 18 | * The CGUpnpStateVariable class is a wrapper class for mUpnpStateVariable of mUPnP for C. 19 | */ 20 | @interface CGUpnpStateVariable : NSObject { 21 | } 22 | @property (assign, readonly) mUpnpStateVariable* cObject; 23 | - (id)initWithCObject:(mUpnpStateVariable*)cobj; 24 | /** 25 | * Get the name of the state variable. 26 | * 27 | * @return The name. 28 | */ 29 | - (NSString*)name; 30 | /** 31 | * Get the value of the state variable. 32 | * 33 | * @return The value. 34 | */ 35 | - (NSString*)value; 36 | 37 | /** 38 | * Get an array of the allowed values for the state variable 39 | * 40 | * @return The array. 41 | */ 42 | - (NSArray*)allowedValues; 43 | 44 | /** 45 | * Checks whether value is allowed for this state variable 46 | * 47 | * @param value to be checked 48 | * 49 | * @return YES if true 50 | */ 51 | - (BOOL)isAllowedValue:(NSString*)value; 52 | 53 | /** 54 | * Send query 55 | * 56 | * @return YES if successfull; otherwise NO 57 | */ 58 | - (BOOL)query; 59 | /** 60 | * Get a states code of the last query. 61 | * 62 | * @return The status code 63 | */ 64 | - (NSInteger)statusCode; 65 | @end 66 | -------------------------------------------------------------------------------- /examples/clock/win32/vs2005/upnpclock.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpclock", "upnpclock.vcproj", "{512DF6AA-55BF-4D55-82CB-1BB0A30880F6}" 4 | ProjectSection(ProjectDependencies) = postProject 5 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 6 | EndProjectSection 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {512DF6AA-55BF-4D55-82CB-1BB0A30880F6}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {512DF6AA-55BF-4D55-82CB-1BB0A30880F6}.Debug|Win32.Build.0 = Debug|Win32 18 | {512DF6AA-55BF-4D55-82CB-1BB0A30880F6}.Release|Win32.ActiveCfg = Release|Win32 19 | {512DF6AA-55BF-4D55-82CB-1BB0A30880F6}.Release|Win32.Build.0 = Release|Win32 20 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /examples/upnpdump/win32/vs2005/upnpdump.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpdump", "upnpdump.vcproj", "{43F876F0-AEB9-4F77-A3B7-E2171F6C2295}" 4 | ProjectSection(ProjectDependencies) = postProject 5 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 6 | EndProjectSection 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.Build.0 = Debug|Win32 18 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.ActiveCfg = Release|Win32 19 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.Build.0 = Release|Win32 20 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /examples/upnpavdump/win32/vs2005/upnpavdump.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpavdump", "upnpavdump.vcproj", "{43F876F0-AEB9-4F77-A3B7-E2171F6C2295}" 4 | ProjectSection(ProjectDependencies) = postProject 5 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 6 | EndProjectSection 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.Build.0 = Debug|Win32 18 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.ActiveCfg = Release|Win32 19 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.Build.0 = Release|Win32 20 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /std/av/sample/upnpavdump/macosx/xcode30/upnpavdump.m: -------------------------------------------------------------------------------- 1 | // 2 | // upnpavdump.c 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/05/12. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | void PrintBrowserInfo(CGUpnpAvServer* server, NSString* objectId, int indent) 12 | { 13 | NSMutableString* indentStr = [NSMutableString string]; 14 | for (int n = 0; n < indent; n++) 15 | [indentStr appendString:@" "]; 16 | 17 | NSArray* avObjects = [server browse:objectId]; 18 | for (CGUpnpAvObject* avObj in avObjects) { 19 | NSLog(@"%@ [%@] %@", indentStr, [avObj objectId], [avObj title]); 20 | if ([avObj isContainer]) { 21 | PrintBrowserInfo(server, [avObj objectId], (indent + 1)); 22 | } 23 | else if ([avObj isItem]) { 24 | int resourceNum = 0; 25 | for (CGUpnpAvResource* avRes in [(CGUpnpAvItem*)avObj resources]) { 26 | NSLog(@"%@ res[%d] = %@", indentStr, ++resourceNum, [avRes url]); 27 | } 28 | } 29 | } 30 | } 31 | 32 | int main(int argc, const char* argv[]) 33 | { 34 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 35 | 36 | CGUpnpAvController* avCtrl = [[CGUpnpAvController alloc] init]; 37 | 38 | [avCtrl search]; 39 | 40 | int serverNum = 0; 41 | NSArray* servers = [avCtrl servers]; 42 | for (CGUpnpAvServer* server in servers) { 43 | NSLog(@"[%d] %@", ++serverNum, [server friendlyName]); 44 | PrintBrowserInfo(server, @"0", 0); 45 | } 46 | 47 | if (serverNum <= 0) 48 | NSLog(@"Media Server is not found !!\n"); 49 | 50 | [pool drain]; 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /examples/upnpigddump/win32/vs2005/upnpigddump.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 9.00 2 | # Visual Studio 2005 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpigddump", "upnpigddump.vcproj", "{43F876F0-AEB9-4F77-A3B7-E2171F6C2295}" 4 | ProjectSection(ProjectDependencies) = postProject 5 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 6 | EndProjectSection 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.Build.0 = Debug|Win32 18 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.ActiveCfg = Release|Win32 19 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.Build.0 = Release|Win32 20 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /std/av/src/cybergarage/upnp/std/av/cprotocolinfo_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2009 6 | * 7 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 8 | * 9 | * This is licensed under BSD-style license, 10 | * see file COPYING. 11 | * 12 | * File: cprotocolinfolist.c 13 | * 14 | * Revision: 15 | * 16 | * 07/27/09 17 | * - first revision 18 | * 19 | ******************************************************************/ 20 | 21 | #include 22 | #include 23 | 24 | /**************************************** 25 | * cg_upnp_protocolinflist_new 26 | ****************************************/ 27 | 28 | CgUpnpAvProtocolInfoList* cg_upnpav_protocolinfolist_new() 29 | { 30 | CgUpnpAvProtocolInfo* protocolinfoList; 31 | 32 | cg_log_debug_l4("Entering...\n"); 33 | 34 | protocolinfoList = (CgUpnpAvProtocolInfo*)malloc(sizeof(CgUpnpAvProtocolInfo)); 35 | 36 | if (NULL != protocolinfoList) 37 | cg_list_header_init((CgList*)protocolinfoList); 38 | 39 | return protocolinfoList; 40 | 41 | cg_log_debug_l4("Leaving...\n"); 42 | } 43 | 44 | /**************************************** 45 | * cg_upnpav_protocolinfor_delete 46 | ****************************************/ 47 | 48 | void cg_upnpav_protocolinfolist_delete(CgUpnpAvProtocolInfoList* protocolinfoList) 49 | { 50 | cg_log_debug_l4("Entering...\n"); 51 | 52 | cg_list_remove((CgList*)protocolinfoList); 53 | free(protocolinfoList); 54 | 55 | cg_log_debug_l4("Leaving...\n"); 56 | } 57 | -------------------------------------------------------------------------------- /test/DeviceTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | 14 | #include "TestDevice.h" 15 | 16 | //////////////////////////////////////// 17 | // testDevice 18 | //////////////////////////////////////// 19 | 20 | BOOST_AUTO_TEST_CASE(DeviceTest) 21 | { 22 | mUpnpDevice* testDev; 23 | 24 | testDev = upnp_test_device_new(); 25 | BOOST_REQUIRE(testDev); 26 | BOOST_REQUIRE(strcmp(mupnp_device_getfriendlyname(testDev), TEST_DEVICE_FREINDLYNAME) == 0); 27 | BOOST_REQUIRE(strcmp(mupnp_device_getdevicetype(testDev), TEST_DEVICE_DEVICE_TYPE) == 0); 28 | BOOST_REQUIRE(0 < mupnp_device_getbootid(testDev)); 29 | 30 | // Embedded Devices 31 | int ebdDeviceCnt = 0; 32 | for (mUpnpDevice* ebdDev = mupnp_device_getdevices(testDev); ebdDev; ebdDev = mupnp_device_next(ebdDev)) { 33 | ebdDeviceCnt++; 34 | if (ebdDeviceCnt == 1) 35 | BOOST_REQUIRE(strcmp(mupnp_device_getdevicetype(ebdDev), TEST_DEVICE_EMBEDDEDDEVICE_TYPE1) == 0); 36 | if (ebdDeviceCnt == 2) 37 | BOOST_REQUIRE(strcmp(mupnp_device_getdevicetype(ebdDev), TEST_DEVICE_EMBEDDEDDEVICE_TYPE2) == 0); 38 | } 39 | BOOST_REQUIRE(ebdDeviceCnt == 2); 40 | 41 | BOOST_REQUIRE(mupnp_device_start(testDev)); 42 | 43 | BOOST_REQUIRE(mupnp_device_stop(testDev)); 44 | mupnp_device_delete(testDev); 45 | } 46 | -------------------------------------------------------------------------------- /examples/upnpdump/win32/vs2008/upnpdump.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 10.00 2 | # Visual Studio 2008 3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpdump", "upnpdump.vcproj", "{43F876F0-AEB9-4F77-A3B7-E2171F6C2295}" 4 | ProjectSection(ProjectDependencies) = postProject 5 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 6 | EndProjectSection 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Debug|Win32.Build.0 = Debug|Win32 18 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.ActiveCfg = Release|Win32 19 | {43F876F0-AEB9-4F77-A3B7-E2171F6C2295}.Release|Win32.Build.0 = Release|Win32 20 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /test/win32/vs2005/ClinkTestCase.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClinkTestCase", "ClinkTestCase.vcproj", "{07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\lib\win32\vs2005\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Debug|Win32.Build.0 = Debug|Win32 19 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Release|Win32.ActiveCfg = Release|Win32 20 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Release|Win32.Build.0 = Release|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 24 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /test/win32/vs2008/ClinkTestCase.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClinkTestCase", "ClinkTestCase.vcproj", "{07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\lib\win32\vs2008\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Debug|Win32.Build.0 = Debug|Win32 19 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Release|Win32.ActiveCfg = Release|Win32 20 | {07A2E47D-4AC1-447C-8FD8-22AA559F9D6E}.Release|Win32.Build.0 = Release|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 24 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /examples/upnpavchk/win32/vs2008/upnpavchk.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upnpavchk", "upnpavchk.vcproj", "{48E7CC88-D1F6-4B55-B601-A3D707838784}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\lib\win32\vs2008\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {48E7CC88-D1F6-4B55-B601-A3D707838784}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {48E7CC88-D1F6-4B55-B601-A3D707838784}.Debug|Win32.Build.0 = Debug|Win32 19 | {48E7CC88-D1F6-4B55-B601-A3D707838784}.Release|Win32.ActiveCfg = Release|Win32 20 | {48E7CC88-D1F6-4B55-B601-A3D707838784}.Release|Win32.Build.0 = Release|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 24 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /std/av/lib/win32/vs2008/CyberLinkCAV.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkCAV", "CyberLinkCAV.vcproj", "{A357B2E3-04FC-4B7F-AEC5-0EA101EB2D7D}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {D550D099-9F69-4F30-864C-504D02F72774} = {D550D099-9F69-4F30-864C-504D02F72774} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CyberLinkC", "..\..\..\..\..\lib\win32\vs2008\CyberLinkC.vcproj", "{D550D099-9F69-4F30-864C-504D02F72774}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {A357B2E3-04FC-4B7F-AEC5-0EA101EB2D7D}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {A357B2E3-04FC-4B7F-AEC5-0EA101EB2D7D}.Debug|Win32.Build.0 = Debug|Win32 19 | {A357B2E3-04FC-4B7F-AEC5-0EA101EB2D7D}.Release|Win32.ActiveCfg = Release|Win32 20 | {A357B2E3-04FC-4B7F-AEC5-0EA101EB2D7D}.Release|Win32.Build.0 = Release|Win32 21 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {D550D099-9F69-4F30-864C-504D02F72774}.Debug|Win32.Build.0 = Debug|Win32 23 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.ActiveCfg = Release|Win32 24 | {D550D099-9F69-4F30-864C-504D02F72774}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /test/DictionaryTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | 14 | #include 15 | 16 | //////////////////////////////////////// 17 | // testDictionary 18 | //////////////////////////////////////// 19 | 20 | #define MUPNP_TESTCASE_DICTIONARY_KEY "hello" 21 | #define MUPNP_TESTCASE_DICTIONARY_VALUE "hello_value" 22 | 23 | BOOST_AUTO_TEST_CASE(DictionaryTest) 24 | { 25 | mUpnpDictionary* dir; 26 | const char* dirVal; 27 | 28 | /* Basic Unit Test */ 29 | dir = mupnp_dictionary_new(); 30 | BOOST_REQUIRE((dir != NULL)); 31 | mupnp_dictionary_delete(dir); 32 | 33 | /* Complet Unit Test */ 34 | dir = mupnp_dictionary_new(); 35 | BOOST_REQUIRE((dir != NULL)); 36 | BOOST_REQUIRE((mupnp_dictionary_size(dir) == 0)); 37 | mupnp_dictionary_setvalue(dir, MUPNP_TESTCASE_DICTIONARY_KEY, MUPNP_TESTCASE_DICTIONARY_VALUE); 38 | BOOST_REQUIRE((mupnp_dictionary_size(dir) == 1)); 39 | mupnp_dictionary_setvalue(dir, MUPNP_TESTCASE_DICTIONARY_KEY, MUPNP_TESTCASE_DICTIONARY_VALUE); 40 | BOOST_REQUIRE((mupnp_dictionary_size(dir) == 1)); 41 | dirVal = mupnp_dictionary_getvalue(dir, MUPNP_TESTCASE_DICTIONARY_KEY); 42 | BOOST_REQUIRE((0 < mupnp_strlen(dirVal))); 43 | BOOST_REQUIRE(mupnp_streq(dirVal, MUPNP_TESTCASE_DICTIONARY_VALUE)); 44 | mupnp_dictionary_delete(dir); 45 | } 46 | -------------------------------------------------------------------------------- /.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: doxygen 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the master branch 7 | on: 8 | push: 9 | branches: [ master ] 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | build: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 21 | - uses: actions/checkout@v4 22 | 23 | - name: Doxygen Action 24 | uses: mattnotmitt/doxygen-action@v1.12.0 25 | with: 26 | # Path to Doxyfile 27 | doxyfile-path: "./Doxyfile" # default is ./Doxyfile 28 | # Working directory 29 | working-directory: "." # default is . 30 | 31 | - name: Doxygen Action (ObjC) 32 | uses: mattnotmitt/doxygen-action@v1.12.0 33 | with: 34 | # Path to Doxyfile 35 | doxyfile-path: "./Doxyfile.objc" # default is ./Doxyfile 36 | # Working directory 37 | working-directory: "." # default is . 38 | 39 | - name: Deploy 40 | uses: peaceiris/actions-gh-pages@v4 41 | with: 42 | github_token: ${{ secrets.GITHUB_TOKEN }} 43 | # Default Doxyfile build documentation to html directory. 44 | # Change the directory if changes in Doxyfile 45 | publish_dir: ./doc/html 46 | -------------------------------------------------------------------------------- /examples/common/kb_util.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: kb_util.h 8 | * 9 | * Revision: 10 | * 11 | * 05/11/05 12 | * - first revision 13 | * 14 | ******************************************************************/ 15 | #ifdef HAVE_CONFIG_H 16 | #include "config.h" 17 | #endif 18 | 19 | #if !defined(__MINGW32__) 20 | #include 21 | #include 22 | #include 23 | #include 24 | #endif 25 | 26 | #if defined(__CYGWIN__) && !defined(FIONREAD) 27 | #include 28 | #include 29 | #endif 30 | 31 | #if !defined(__MINGW32__) 32 | static struct termios orgTermAttr; 33 | #endif 34 | 35 | #if defined(HAVE_SYS_IOCTL_H) 36 | #define BSD_COMP /* Get FIONREAD on Solaris2 */ 37 | #include 38 | #endif 39 | #if defined(HAVE_SYS_FILIO_H) /* Get FIONREAD on Solaris 2.5 */ 40 | #include 41 | #endif 42 | 43 | #include "kb_util.h" 44 | 45 | void kbinit() 46 | { 47 | #if !defined(__MINGW32__) 48 | struct termios termAttr; 49 | tcgetattr(0, &orgTermAttr); 50 | termAttr = orgTermAttr; 51 | termAttr.c_lflag &= ~(ICANON | ECHO); 52 | termAttr.c_cc[VTIME] = 0; 53 | termAttr.c_cc[VMIN] = 1; 54 | tcsetattr(0, TCSANOW, &termAttr); 55 | #endif 56 | } 57 | 58 | int kbhit() 59 | { 60 | #if !defined(__MINGW32__) 61 | int ret, n; 62 | ret = ioctl(0, FIONREAD, &n); 63 | if (ret != -1) 64 | return n; 65 | #endif 66 | return 0; 67 | } 68 | 69 | int kbkey() 70 | { 71 | return 0; 72 | } 73 | 74 | void kbexit() 75 | { 76 | #if !defined(__MINGW32__) 77 | tcsetattr(0, TCSANOW, &orgTermAttr); 78 | #endif 79 | } 80 | -------------------------------------------------------------------------------- /std/av/sample/upnpavplayer/macosx/xcode30/DLNAController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import 4 | #import 5 | 6 | @class DLNAImageView; 7 | 8 | @interface DLNAController : NSObject { 9 | IBOutlet NSBrowser* dmcBrowser; 10 | IBOutlet NSImageView* thumbnailView; 11 | IBOutlet NSTableView* infomationView; 12 | IBOutlet NSToolbar* mainToolbar; 13 | CGUpnpAvController* dmc; 14 | DLNAImageView* imageView; 15 | NSView* browserView; 16 | } 17 | @property (readwrite, retain) DLNAImageView* imageView; 18 | @property (readwrite, retain) NSView* browserView; 19 | + (NSMutableString*)pathToColum:(NSBrowser*)browser numberOfRowsInColumn:(NSInteger)column; 20 | + (NSMutableString*)selectedPath:(NSBrowser*)browser; 21 | + (NSBrowserCell*)selectedCell:(NSBrowser*)browser; 22 | + (NSMutableString*)selectedItemPath:(NSBrowser*)browser; 23 | - (IBAction)searchDMS:(id)sender; 24 | - (IBAction)itemSelected:(id)sender; 25 | - (IBAction)doClick:(id)sender; 26 | - (IBAction)doDoubleClick:(id)sender; 27 | - (IBAction)doClickImage:(id)sender; 28 | - (NSInteger)browser:(NSBrowser*)sender numberOfRowsInColumn:(NSInteger)column; 29 | - (void)browser:(NSBrowser*)sender willDisplayCell:(id)cell atRow:(NSInteger)row column:(NSInteger)column; 30 | - (int)numberOfRowsInTableView:(NSTableView*)aTableView; 31 | - (id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex; 32 | - (NSArray*)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar; 33 | - (NSArray*)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar; 34 | - (NSToolbarItem*)toolbar:(NSToolbar*)toolbar itemForItemIdentifier:(NSString*)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag; 35 | @end 36 | -------------------------------------------------------------------------------- /test/ControlPointTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | #include "TestDevice.h" 16 | 17 | //////////////////////////////////////// 18 | // testControlPoint 19 | //////////////////////////////////////// 20 | 21 | BOOST_AUTO_TEST_CASE(ControlPointTest) 22 | { 23 | mUpnpControlPoint* testCp = mupnp_controlpoint_new(); 24 | BOOST_REQUIRE(testCp); 25 | BOOST_REQUIRE(mupnp_controlpoint_start(testCp)); 26 | BOOST_REQUIRE(mupnp_controlpoint_search(testCp, MUPNP_ST_ROOT_DEVICE)); 27 | 28 | mUpnpDevice* testDev = upnp_test_device_new(); 29 | BOOST_REQUIRE(testDev); 30 | BOOST_REQUIRE(mupnp_device_start(testDev)); 31 | 32 | mupnp_sleep(mupnp_controlpoint_getssdpsearchmx(testCp) * 1000 * 2); 33 | 34 | int devCnt = mupnp_controlpoint_getndevices(testCp); 35 | BOOST_REQUIRE(0 < devCnt); 36 | 37 | bool testDevFound = false; 38 | for (int n = 0; n < devCnt; n++) { 39 | mUpnpDevice* dev = mupnp_controlpoint_getdevice(testCp, n); 40 | if (strcmp(mupnp_device_getdevicetype(dev), TEST_DEVICE_DEVICE_TYPE) == 0) { 41 | testDevFound = true; 42 | break; 43 | } 44 | } 45 | BOOST_REQUIRE(testDevFound); 46 | 47 | BOOST_REQUIRE(mupnp_device_stop(testDev)); 48 | mupnp_device_delete(testDev); 49 | 50 | BOOST_REQUIRE(mupnp_controlpoint_stop(testCp)); 51 | mupnp_controlpoint_delete(testCp); 52 | } 53 | -------------------------------------------------------------------------------- /src/mupnp/event/property_list.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * MUPNP_NOUSE_SUBSCRIPTION (Begin) 17 | ****************************************/ 18 | 19 | #if !defined(MUPNP_NOUSE_SUBSCRIPTION) 20 | 21 | /**************************************** 22 | * mupnp_propertylist_new 23 | ****************************************/ 24 | 25 | mUpnpPropertyList* mupnp_propertylist_new(void) 26 | { 27 | mUpnpPropertyList* propertyList; 28 | 29 | mupnp_log_debug_l4("Entering...\n"); 30 | 31 | propertyList = (mUpnpPropertyList*)malloc(sizeof(mUpnpPropertyList)); 32 | 33 | if (NULL != propertyList) 34 | mupnp_list_header_init((mUpnpList*)propertyList); 35 | 36 | return propertyList; 37 | 38 | mupnp_log_debug_l4("Leaving...\n"); 39 | } 40 | 41 | /**************************************** 42 | * mupnp_propertylist_delete 43 | ****************************************/ 44 | 45 | void mupnp_propertylist_delete(mUpnpPropertyList* propertyList) 46 | { 47 | mupnp_log_debug_l4("Entering...\n"); 48 | 49 | mupnp_propertylist_clear(propertyList); 50 | free(propertyList); 51 | 52 | mupnp_log_debug_l4("Leaving...\n"); 53 | } 54 | 55 | /**************************************** 56 | * MUPNP_NOUSE_SUBSCRIPTION (End) 57 | ****************************************/ 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/mupnp/util/dictionary_elem.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_dictionary_element_new 17 | ****************************************/ 18 | 19 | mUpnpDictionaryElement* mupnp_dictionary_element_new(void) 20 | { 21 | mUpnpDictionaryElement* dirElem; 22 | 23 | mupnp_log_debug_l4("Entering...\n"); 24 | 25 | dirElem = (mUpnpDictionaryElement*)malloc(sizeof(mUpnpDictionaryElement)); 26 | 27 | mupnp_log_debug_s("Creating dirElem data into %p\n", dirElem); 28 | 29 | if (NULL != dirElem) { 30 | mupnp_list_node_init((mUpnpList*)dirElem); 31 | dirElem->key = mupnp_string_new(); 32 | dirElem->value = mupnp_string_new(); 33 | } 34 | 35 | mupnp_log_debug_l4("Leaving...\n"); 36 | 37 | return dirElem; 38 | } 39 | 40 | /**************************************** 41 | * mupnp_dictionary_element_delete 42 | ****************************************/ 43 | 44 | bool mupnp_dictionary_element_delete(mUpnpDictionaryElement* dirElem) 45 | { 46 | mupnp_log_debug_l4("Entering...\n"); 47 | 48 | mupnp_list_remove((mUpnpList*)dirElem); 49 | 50 | if (dirElem->key) 51 | mupnp_string_delete(dirElem->key); 52 | if (dirElem->value) 53 | mupnp_string_delete(dirElem->value); 54 | free(dirElem); 55 | 56 | mupnp_log_debug_l4("Leaving...\n"); 57 | 58 | return true; 59 | } 60 | -------------------------------------------------------------------------------- /src/mupnp/net/url.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | /**************************************** 19 | * mupnp_net_getmodifierhosturl 20 | ****************************************/ 21 | 22 | const char* mupnp_net_getmodifierhosturl(const char* host, int port, const char* uri, const char* begin, const char* end, char* buf, size_t bufSize) 23 | { 24 | bool isIPv6Host; 25 | 26 | mupnp_log_debug_l4("Entering...\n"); 27 | 28 | isIPv6Host = mupnp_net_isipv6address(host); 29 | 30 | #if defined(HAVE_SNPRINTF) 31 | snprintf(buf, bufSize, 32 | #else 33 | sprintf(buf, 34 | #endif 35 | "%shttp://%s%s%s:%d%s%s", 36 | begin, 37 | ((isIPv6Host == true) ? "[" : ""), 38 | host, 39 | ((isIPv6Host == true) ? "]" : ""), 40 | port, 41 | uri, 42 | end); 43 | 44 | mupnp_log_debug_l4("Leaving...\n"); 45 | 46 | return buf; 47 | } 48 | 49 | /**************************************** 50 | * mupnp_net_gethosturl 51 | ****************************************/ 52 | 53 | const char* mupnp_net_gethosturl(const char* host, int port, const char* uri, char* buf, size_t bufSize) 54 | { 55 | mupnp_log_debug_l4("Entering...\n"); 56 | 57 | return mupnp_net_getmodifierhosturl(host, port, uri, "", "", buf, bufSize); 58 | 59 | mupnp_log_debug_l4("Leaving...\n"); 60 | } 61 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvController.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/06/25. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #import 13 | 14 | @class CGUpnpAvServer; 15 | @class CGUpnpAvObject; 16 | @class CGUpnpAvRenderer; 17 | 18 | /** 19 | * The CGUpnpControlPoint class is a wrapper class for CgUpnpControlPoint of mUPnP for C to 20 | * program using only Objective-C directly on MacOSX. 21 | * Currently, the only basic methods are wrapped to control UPnP devices. 22 | */ 23 | @interface CGUpnpAvController : CGUpnpControlPoint { 24 | } 25 | /** 26 | * Activate some background threads of the control point such as SSDP and 27 | * HTTP servers to listen messages and events of UPnP. You must call this 28 | * method before you can actually use a control point. 29 | * 30 | * @return TRUE if successful; otherwise FALSE 31 | * 32 | */ 33 | - (NSArray*)servers; 34 | - (CGUpnpAvServer*)serverForUDN:(NSString*)aUdn; 35 | - (CGUpnpAvServer*)serverForFriendlyName:(NSString*)aFriendlyName; 36 | - (CGUpnpAvServer*)serverForPath:(NSString*)aPath; 37 | - (CGUpnpAvServer*)serverForIndexPath:(NSIndexPath*)aIndexPath; 38 | - (CGUpnpAvObject*)objectForTitlePath:(NSString*)aServerAndTitlePath; 39 | - (CGUpnpAvObject*)objectForIndexPath:(NSIndexPath*)aServerAndTitleIndexPath; 40 | - (NSArray*)browseDirectChildrenWithTitlePath:(NSString*)aServerAndTitlePath; 41 | - (NSArray*)browseDirectChildrenWithIndexPath:(NSIndexPath*)aServerAndTitleIndexPath; 42 | 43 | - (NSArray*)renderers; 44 | - (CGUpnpAvRenderer*)rendererForUDN:(NSString*)aUdn; 45 | 46 | - (void)search; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /include/mupnp/typedef.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #ifndef _MUPNP_TYPEDEF_H_ 13 | #define _MUPNP_TYPEDEF_H_ 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #if defined(WINCE) && !defined(WIN32) 20 | #define WIN32 1 21 | #endif 22 | 23 | #if (defined(WIN32) || defined(__CYGWIN__)) && !defined(ITRON) 24 | #include 25 | #include 26 | #elif defined(BTRON) || defined(TENGINE) 27 | #include 28 | #elif defined(ITRON) 29 | #include 30 | #endif 31 | 32 | #if defined(__APPLE_CPP__) || defined(__APPLE_CC__) 33 | #include 34 | #endif 35 | 36 | #ifdef HAVE_CONFIG_H 37 | #include "config.h" 38 | #endif 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | /**************************************** 45 | * Compiler 46 | ****************************************/ 47 | 48 | #if __STDC_VERSION__ >= 199901L 49 | #define C99 50 | #endif 51 | 52 | /**************************************** 53 | * Data Type 54 | ****************************************/ 55 | 56 | #if defined(C99) || defined(HAVE_STDBOOL_H) 57 | #include 58 | #else 59 | #if !defined(bool) 60 | #define bool int 61 | #endif 62 | #if !defined(true) 63 | #define true 1 64 | #endif 65 | #if !defined(false) 66 | #define false 0 67 | #endif 68 | #endif 69 | 70 | typedef unsigned char mUpnpByte; 71 | 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /std/av/wrapper/objc/CyberLink/CGUpnpAvObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // CGUpnpAvObject.h 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/07/01. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #if defined(TARGET_OS_IPHONE) 10 | #import 11 | #endif 12 | 13 | #import 14 | 15 | #if !defined(_CG_CLINKCAV_CONTENT_H_) 16 | typedef void CgUpnpAvContent; 17 | #endif 18 | 19 | /** 20 | * The CGUpnpAvObject class is a wrapper class for CgUpnpAvObject of mUPnP for C. 21 | */ 22 | 23 | #define CGUPNPAV_OBJECT_MOVIE_FILEEXT @"mov" 24 | #define CGUPNPAV_OBJECT_SOUND_FILEEXT @"snd" 25 | #define CGUPNPAV_OBJECT_IMAGE_FILEEXT @"img" 26 | 27 | @interface CGUpnpAvObject : CGXmlNode { 28 | } 29 | @property (retain) CGUpnpAvObject* parent; 30 | @property (retain) id userObject; 31 | + (NSArray*)arrayWithXMLString:(NSString*)aXmlString; 32 | - (id)init; 33 | #if !defined(TARGET_OS_IPHONE) 34 | - (id)initWithXMLNode:(NSXMLElement*)aXmlNode; 35 | #else 36 | - (id)initWithXMLNode:(CgXmlNode*)aXmlNode; 37 | - (id)initWithMediaContent:(CgUpnpAvContent*)aMediaContent; 38 | #endif 39 | - (BOOL)isEqual:(id)anObject; 40 | - (BOOL)isContainer; 41 | - (BOOL)isItem; 42 | - (void)setParent:(CGUpnpAvObject*)aParent; 43 | - (CGUpnpAvObject*)parent; 44 | - (CGUpnpAvObject*)ancestor; 45 | - (NSString*)objectId; 46 | - (NSUInteger)childCount; 47 | - (NSString*)title; 48 | - (NSString*)upnpClass; 49 | - (NSString*)date; 50 | - (NSString*)albumArtURI; 51 | - (void)setObjectId:(NSString*)aValue; 52 | - (void)setTitle:(NSString*)aValue; 53 | - (void)setUpnpClass:(NSString*)aValue; 54 | - (BOOL)isObjectId:(NSString*)aObjectId; 55 | - (BOOL)isTitle:(NSString*)aTitle; 56 | - (BOOL)isUpnpClass:(NSString*)aUpnpClass; 57 | - (NSString*)toFileNameString; 58 | @end 59 | -------------------------------------------------------------------------------- /test/NetworkTest.cpp: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | 14 | #include 15 | 16 | //////////////////////////////////////// 17 | // testNetworkInterface 18 | //////////////////////////////////////// 19 | 20 | BOOST_AUTO_TEST_CASE(NetworkInterface) 21 | { 22 | #if defined(HAVE_SOCKADDR_DL) || defined(HAVE_SIOCGIFHWADDR) 23 | mUpnpByte macAddr[MUPNP_NET_MACADDR_SIZE]; 24 | mUpnpByte nullMacAddr[MUPNP_NET_MACADDR_SIZE]; 25 | memset(nullMacAddr, 0, MUPNP_NET_MACADDR_SIZE); 26 | #endif 27 | 28 | mUpnpNetworkInterfaceList* netIfList = mupnp_net_interfacelist_new(); 29 | BOOST_REQUIRE(netIfList); 30 | BOOST_REQUIRE(0 < mupnp_net_gethostinterfaces(netIfList)); 31 | for (mUpnpNetworkInterface* netIf = mupnp_net_interfacelist_gets(netIfList); netIf; netIf = mupnp_net_interface_next(netIf)) { 32 | char* ipaddr = mupnp_net_interface_getaddress(netIf); 33 | BOOST_REQUIRE(0 < mupnp_strlen(ipaddr)); 34 | BOOST_REQUIRE(mupnp_streq(ipaddr, "0.0.0.0") == false); 35 | #if defined(HAVE_SOCKADDR_DL) || defined(HAVE_SIOCGIFHWADDR) 36 | mupnp_net_interface_getmacaddress(netIf, macAddr); 37 | BOOST_REQUIRE(memcmp(macAddr, nullMacAddr, MUPNP_NET_MACADDR_SIZE) != 0); 38 | #endif 39 | // BOOST_REQUIRE(0 < mupnp_strlen(mupnp_net_interface_getname(netIf))); 40 | // BOOST_REQUIRE(0 < mupnp_strlen(mupnp_net_interface_getnetmask(netIf))); 41 | } 42 | mupnp_net_interfacelist_delete(netIfList); 43 | } 44 | -------------------------------------------------------------------------------- /src/mupnp/xml/xml_function.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_xml_escapechars 17 | ****************************************/ 18 | 19 | char* mupnp_xml_escapechars(mUpnpString* str) 20 | { 21 | char* fromChars[5]; 22 | char* toChars[5]; 23 | 24 | mupnp_log_debug_l4("Entering...\n"); 25 | 26 | fromChars[0] = "&"; 27 | fromChars[1] = ">"; 28 | fromChars[2] = "<"; 29 | fromChars[3] = "\""; 30 | fromChars[4] = "'"; 31 | 32 | toChars[0] = "&"; 33 | toChars[1] = ">"; 34 | toChars[2] = "<"; 35 | toChars[3] = """; 36 | toChars[4] = "'"; 37 | 38 | mupnp_log_debug_l4("Leaving...\n"); 39 | 40 | return mupnp_string_replace(str, fromChars, toChars, (sizeof(fromChars) / sizeof(fromChars[0]))); 41 | } 42 | 43 | char* mupnp_xml_unescapechars(mUpnpString* str) 44 | { 45 | char* fromChars[5]; 46 | char* toChars[5]; 47 | 48 | mupnp_log_debug_l4("Entering...\n"); 49 | 50 | fromChars[0] = "&"; 51 | fromChars[1] = ">"; 52 | fromChars[2] = "<"; 53 | fromChars[3] = """; 54 | fromChars[4] = "'"; 55 | 56 | toChars[0] = "&"; 57 | toChars[1] = ">"; 58 | toChars[2] = "<"; 59 | toChars[3] = "\""; 60 | toChars[4] = "'"; 61 | 62 | mupnp_log_debug_l4("Leaving...\n"); 63 | 64 | return mupnp_string_replace(str, fromChars, toChars, (sizeof(fromChars) / sizeof(fromChars[0]))); 65 | } 66 | -------------------------------------------------------------------------------- /examples/upnpdump/macosx/xcode30/upnpdump.m: -------------------------------------------------------------------------------- 1 | // 2 | // upnpdump.c 3 | // mUPnP for C 4 | // 5 | // Created by Satoshi Konno on 08/05/12. 6 | // Copyright 2008 Satoshi Konno. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | void PrintDevice(CGUpnpDevice* dev) 13 | { 14 | static int devNum = 0; 15 | int serviceNum = 0; 16 | int actionNum = 0; 17 | int argNum = 0; 18 | int statVarNum = 0; 19 | 20 | NSLog(@"[%d] %@", ++devNum, [dev friendlyName]); 21 | NSLog(@" deviceType = %@", [dev deviceType]); 22 | 23 | NSArray* serviceArray = [dev services]; 24 | for (CGUpnpService* service in serviceArray) { 25 | NSLog(@" [%d] service = %@", ++serviceNum, [service serviceType]); 26 | 27 | NSArray* actionArray = [service actions]; 28 | actionNum = 0; 29 | for (CGUpnpAction* action in actionArray) { 30 | // NSLog(@" [%d] action = %@", ++actionNum, [action name]); 31 | NSDictionary* argDir = [action arguments]; 32 | argNum = 0; 33 | for (NSString* name in argDir) { 34 | // NSLog(@" [%d] argument = %@", ++argNum, name); 35 | } 36 | } 37 | 38 | NSArray* statVarArray = [service stateVariables]; 39 | statVarNum = 0; 40 | for (CGUpnpStateVariable* statVar in statVarArray) { 41 | // NSLog(@" [%d] stateVariable = %@", ++statVarNum, [statVar name]); 42 | } 43 | } 44 | } 45 | 46 | int main(int argc, const char* argv[]) 47 | { 48 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 49 | 50 | CGUpnpControlPoint* ctrlPoint = [[CGUpnpControlPoint alloc] init]; 51 | [ctrlPoint search]; 52 | NSArray* devArray = [ctrlPoint devices]; 53 | for (CGUpnpDevice* dev in devArray) 54 | PrintDevice(dev); 55 | 56 | [pool drain]; 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /src/mupnp/service_ssdp_server.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | /**************************************** 19 | * mupnp_service_ssdpmessagereceived 20 | ****************************************/ 21 | 22 | void mupnp_service_ssdpmessagereceived(mUpnpService* service, mUpnpSSDPPacket* ssdpPkt) 23 | { 24 | mUpnpDevice* dev; 25 | const char* ssdpST; 26 | const char* serviceType; 27 | char serviceNT[MUPNP_SSDP_HEADER_LINE_MAXSIZE]; 28 | char serviceUSN[MUPNP_SSDP_HEADER_LINE_MAXSIZE]; 29 | 30 | mupnp_log_debug_l4("Entering...\n"); 31 | 32 | ssdpST = mupnp_ssdp_packet_getst(ssdpPkt); 33 | if (mupnp_strlen(ssdpST) <= 0) 34 | return; 35 | 36 | dev = mupnp_service_getdevice(service); 37 | 38 | mupnp_service_getnotifyservicetypent(service, serviceNT, sizeof(serviceNT)); 39 | mupnp_service_getnotifyservicetypeusn(service, serviceUSN, sizeof(serviceUSN)); 40 | 41 | if (mupnp_st_isalldevice(ssdpST) == true) { 42 | mupnp_device_postsearchresponse(dev, ssdpPkt, serviceNT, serviceUSN); 43 | } 44 | else if (mupnp_st_isurn(ssdpST) == true) { 45 | serviceType = mupnp_service_getservicetype(service); 46 | if (mupnp_streq(ssdpST, serviceType) == true) 47 | mupnp_device_postsearchresponse(dev, ssdpPkt, serviceType, serviceUSN); 48 | } 49 | 50 | mupnp_log_debug_l4("Leaving...\n"); 51 | } 52 | -------------------------------------------------------------------------------- /std/av/sample/common/ckeyboard.c: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | 5 | /****************************************************************** 6 | * 7 | * mUPnP for C 8 | * 9 | * Copyright (C) Satoshi Konno 2005 10 | * 11 | * File: kb_util.h 12 | * 13 | * Revision: 14 | * 15 | * 05/11/05 16 | * - first revision 17 | * 18 | ******************************************************************/ 19 | 20 | #if !defined(WIN32) && !defined(__MINGW32__) 21 | #include 22 | #include 23 | #include 24 | #include 25 | #endif 26 | 27 | #if defined(__CYGWIN__) && !defined(FIONREAD) 28 | #include 29 | #include 30 | #endif 31 | 32 | #if defined(HAVE_SYS_IOCTL_H) 33 | #define BSD_COMP /* Get FIONREAD on Solaris2 */ 34 | #include 35 | #endif 36 | #if defined(HAVE_SYS_FILIO_H) /* Get FIONREAD on Solaris 2.5 */ 37 | #include 38 | #endif 39 | 40 | #if !defined(WIN32) && !defined(__MINGW32__) 41 | static struct termios orgTermAttr; 42 | #endif 43 | #include "ckeyboard.h" 44 | 45 | void mupnp_kb_init() 46 | { 47 | #if !defined(WIN32) && !defined(__MINGW32__) 48 | struct termios termAttr; 49 | tcgetattr(0, &orgTermAttr); 50 | termAttr = orgTermAttr; 51 | termAttr.c_lflag &= ~(ICANON | ECHO); 52 | termAttr.c_cc[VTIME] = 0; 53 | termAttr.c_cc[VMIN] = 1; 54 | tcsetattr(0, TCSANOW, &termAttr); 55 | #endif 56 | } 57 | 58 | int mupnp_kb_hit() 59 | { 60 | #if !defined(WIN32) && !defined(__MINGW32__) 61 | int ret, n; 62 | ret = ioctl(0, FIONREAD, &n); 63 | if (ret != -1) 64 | return n; 65 | #endif 66 | return 0; 67 | } 68 | 69 | int mupnp_kb_key() 70 | { 71 | return 0; 72 | } 73 | 74 | void mupnp_kb_exit() 75 | { 76 | #if !defined(WIN32) && !defined(__MINGW32__) 77 | tcsetattr(0, TCSANOW, &orgTermAttr); 78 | #endif 79 | } 80 | -------------------------------------------------------------------------------- /std/av/src/cybergarage/upnp/std/av/cdidl.c: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * 7 | * File: cdidl.c 8 | * 9 | * Revision: 10 | * 05/11/05 11 | * - first release. 12 | * 13 | ************************************************************/ 14 | 15 | #include 16 | 17 | /**************************************** 18 | * Constants 19 | ****************************************/ 20 | 21 | #define CG_UPNPAV_DMS_DIDL_NAME "DIDL-Lite" 22 | #define CG_UPNPAV_DMS_DIDL_XMLNS "xmlns" 23 | #define CG_UPNPAV_DMS_DIDL_XMLNS_URL "urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" 24 | #define CG_UPNPAV_DMS_DIDL_XMLNS_DC "xmlns:dc" 25 | #define CG_UPNPAV_DMS_DIDL_XMLNS_DC_URL "http://purl.org/dc/elements/1.1/" 26 | #define CG_UPNPAV_DMS_DIDL_XMLNS_UPNP "xmlns:upnp" 27 | #define CG_UPNPAV_DMS_DIDL_XMLNS_UPNP_URL "urn:schemas-upnp-org:metadata-1-0/upnp/" 28 | #define CG_UPNPAV_DMS_DIDL_XMLNS_DLNA "xmlns:dlna" 29 | #define CG_UPNPAV_DMS_DIDL_XMLNS_DLNA_URL "urn:schemas-dlna-org:metadata-1-0/" 30 | 31 | /**************************************** 32 | * cg_upnpav_didl_node_new 33 | ****************************************/ 34 | 35 | CgXmlNode* cg_upnpav_didl_node_new() 36 | { 37 | CgXmlNode* node; 38 | 39 | node = cg_xml_node_new(); 40 | 41 | cg_xml_node_setname(node, CG_UPNPAV_DMS_DIDL_NAME); 42 | cg_xml_node_setattribute(node, CG_UPNPAV_DMS_DIDL_XMLNS, CG_UPNPAV_DMS_DIDL_XMLNS_URL); 43 | cg_xml_node_setattribute(node, CG_UPNPAV_DMS_DIDL_XMLNS_DC, CG_UPNPAV_DMS_DIDL_XMLNS_DC_URL); 44 | cg_xml_node_setattribute(node, CG_UPNPAV_DMS_DIDL_XMLNS_UPNP, CG_UPNPAV_DMS_DIDL_XMLNS_UPNP_URL); 45 | cg_xml_node_setattribute(node, CG_UPNPAV_DMS_DIDL_XMLNS_DLNA, CG_UPNPAV_DMS_DIDL_XMLNS_DLNA_URL); 46 | 47 | return node; 48 | } 49 | -------------------------------------------------------------------------------- /coverage: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Test coverage workflow locally 3 | 4 | set -e 5 | 6 | echo "=== Testing Coverage Workflow Locally ===" 7 | 8 | # Clean up any previous builds 9 | echo "Cleaning previous build..." 10 | make distclean 2>/dev/null || true 11 | 12 | # Bootstrap 13 | #echo "Running bootstrap..." 14 | #./bootstrap 15 | 16 | # Configure with coverage 17 | echo "Configuring with coverage enabled..." 18 | ./configure --enable-test --enable-code-coverage --enable-examples 19 | 20 | # Build 21 | echo "Building project..." 22 | make -j $(nproc) 23 | 24 | # Run tests 25 | echo "Running tests..." 26 | make check -j $(nproc) || { 27 | echo "Tests failed! Check test/unix/test-suite.log" 28 | if [ -f test/unix/test-suite.log ]; then 29 | echo "=== Test Suite Log ===" 30 | cat test/unix/test-suite.log 31 | fi 32 | exit 1 33 | } 34 | 35 | # Generate coverage 36 | echo "Generating coverage report..." 37 | make check-code-coverage 38 | 39 | # Check if coverage files exist 40 | echo "Checking coverage files..." 41 | if ls mupnp-*-coverage.info 1> /dev/null 2>&1; then 42 | echo "✅ Coverage info file generated" 43 | ls -la mupnp-*-coverage.info 44 | else 45 | echo "❌ No coverage info file found" 46 | exit 1 47 | fi 48 | 49 | if [ -d coverage-report ]; then 50 | echo "✅ HTML coverage report generated" 51 | echo "📊 Open file://$(pwd)/coverage-report/index.html to view coverage" 52 | else 53 | echo "❌ No HTML coverage report found" 54 | exit 1 55 | fi 56 | 57 | # Show coverage summary 58 | echo "" 59 | echo "=== Coverage Summary ===" 60 | if command -v lcov >/dev/null 2>&1; then 61 | lcov --summary mupnp-*-coverage.info 2>/dev/null || true 62 | fi 63 | 64 | echo "" 65 | echo "✅ Coverage workflow test completed successfully!" 66 | echo "📋 Files ready for Codecov upload:" 67 | ls -la mupnp-*-coverage.info 68 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: clinkc 2 | Section: libs 3 | Priority: optional 4 | Maintainer: Mikael Saarenpää 5 | Build-Depends: debhelper (>= 4.0.0), libcurl3-dev (>= 7.13.0), libxml2-dev (>= 2.6.0) 6 | Standards-Version: 3.6.0 7 | 8 | Package: clinkc-dev 9 | Section: devel 10 | Architecture: any 11 | Depends: clinkc0, libcurl3-dev (>= 7.13.0), libxml2-dev (>= 2.6.0) 12 | Description: Development files for mUPnP for C UPnP library 13 | mUPnP for C is a toolkit for creating UPnP devices and control points. 14 | Main features are automatic discovery, search, expiration handling and 15 | different controlling methods for UPnP control points and advertizing and 16 | eventing for UPnP devices. 17 | . 18 | This package contains header files and API documentation which are needed 19 | for developing UPnP applications with mUPnP for C. 20 | 21 | Package: clinkc0 22 | Section: libs 23 | Architecture: any 24 | Depends: libcurl3 (>= 7.13.0), libxml2 (>= 2.6.0) 25 | Description: mUPnP for C UPnP library 26 | mUPnP for C is a toolkit for creating UPnP devices and control points. 27 | Main features are automatic discovery, search, expiration handling and 28 | different controlling methods for UPnP control points and advertizing and 29 | eventing for UPnP devices. 30 | . 31 | This package contains the dynamically loadable library needed by 32 | applications which use CyberLinkC for C. 33 | 34 | Package: clinkc0-dbg 35 | Section: libs 36 | Architecture: any 37 | Depends: clinkc0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends} 38 | Description: mUPnP for C UPnP library 39 | mUPnP for C is a toolkit for creating UPnP devices and control points. 40 | Main features are automatic discovery, search, expiration handling and 41 | different controlling methods for UPnP control points and advertizing and 42 | eventing for UPnP devices. 43 | . 44 | This package contains the debug symbols for the actual library. 45 | 46 | -------------------------------------------------------------------------------- /wrapper/objc/mUPnP/CGUpnpIcon.m: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for ObjC 4 | * 5 | * Copyright (C) Satoshi Konno 2008 6 | * 7 | * This is licensed under BSD-style license, see file COPYING. 8 | * 9 | ******************************************************************/ 10 | 11 | #include 12 | 13 | #import "CGUpnpIcon.h" 14 | 15 | @implementation CGUpnpIcon 16 | 17 | @synthesize cObject; 18 | #if defined(TARGET_OS_IPHONE) 19 | @synthesize resourceName; 20 | #endif 21 | 22 | - (id)initWithCObject:(mUpnpIcon*)cobj 23 | { 24 | if ((self = [super init]) == nil) 25 | return nil; 26 | cObject = cobj; 27 | return self; 28 | } 29 | 30 | - (id)init 31 | { 32 | if ((self = [self initWithCObject:NULL]) == nil) 33 | return nil; 34 | return self; 35 | } 36 | 37 | - (void)dealloc 38 | { 39 | self.resourceName = nil; 40 | 41 | [super dealloc]; 42 | } 43 | 44 | - (NSString*)url 45 | { 46 | if (!cObject) 47 | return nil; 48 | return [[[NSString alloc] initWithUTF8String:mupnp_icon_geturl(cObject)] autorelease]; 49 | } 50 | 51 | - (NSString*)mimeType 52 | { 53 | if (!cObject) 54 | return nil; 55 | return [[[NSString alloc] initWithUTF8String:mupnp_icon_getmimetype(cObject)] autorelease]; 56 | } 57 | 58 | - (NSInteger)width 59 | { 60 | if (!cObject) 61 | return 0; 62 | return mupnp_icon_getwidth(cObject); 63 | } 64 | 65 | - (NSInteger)height 66 | { 67 | if (!cObject) 68 | return 0; 69 | return mupnp_icon_getheight(cObject); 70 | } 71 | 72 | - (NSInteger)depth 73 | { 74 | if (!cObject) 75 | return 0; 76 | return mupnp_icon_getdepth(cObject); 77 | } 78 | 79 | #if defined(TARGET_OS_IPHONE) 80 | - (void)setResourceName:(NSString*)aResourceName 81 | { 82 | // UIImage *image = [UIImage imageNamed:aResourceName]; 83 | // CGSize imageSize = CGSizeMake(CGImageGetWidth([image CGImage]), CGImageGetHeight([image CGImage])); 84 | } 85 | #endif 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = include lib 2 | if MUPNP_ENABLE_EXAMPLES 3 | SUBDIRS += examples 4 | endif 5 | if MUPNP_ENABLE_TEST 6 | SUBDIRS += test 7 | endif 8 | 9 | ############################## 10 | # Code coverage 11 | ############################## 12 | 13 | include $(top_srcdir)/aminclude_static.am 14 | 15 | clean-local: code-coverage-clean 16 | distclean-local: code-coverage-dist-clean 17 | # distclean-local: code-coverage-dist-clean 18 | 19 | ############################## 20 | # Dist 21 | ############################## 22 | 23 | devdocsdir = $(datadir)/doc/mupnp-dev 24 | docsdir = $(datadir)/doc/mupnp0 25 | 26 | EXTRA_DIST = debian/changelog \ 27 | debian/mupnp0.install \ 28 | debian/mupnp-dev.install \ 29 | debian/compat \ 30 | debian/control \ 31 | debian/copyright \ 32 | debian/rules \ 33 | debian/docs \ 34 | include/cybergarage/upnp/cupnp.h.in 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = mupnp.pc 38 | 39 | dist_docs_DATA = \ 40 | COPYING 41 | 42 | dist_devdocs_DATA = \ 43 | ChangeLog \ 44 | COPYING \ 45 | Doxyfile 46 | 47 | #nobase_devdocs_DATA = \ 48 | # doxygen/html/* \ 49 | # doxygen-objc/html/* 50 | 51 | deb: dist 52 | -mkdir $(top_builddir)/debian-build 53 | -cp $(top_builddir)/../$(PACKAGE)*.orig.tar.gz $(top_builddir)/debian-build/ 54 | cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz 55 | cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D 56 | -rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) 57 | 58 | ############################## 59 | # Doxygen 60 | ############################## 61 | 62 | doxygen: doxygen/html/* doxygen/html/* 63 | 64 | doxygen/html/*: 65 | cd $(srcdir) && doxygen Doxyfile 66 | # scp -r doxygen skonno,clinkc@frs.sourceforge.net:/home/groups/c/cl/clinkc/htdocs 67 | 68 | doxygen-objc/html/*: 69 | cd $(srcdir) && doxygen Doxyfile.objc 70 | # scp -r doxygen-objc skonno,clinkobjc@frs.sourceforge.net:/home/groups/c/cl/clinkobjc/htdocs -------------------------------------------------------------------------------- /src/mupnp/ssdp/httpmu_socket.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | 15 | /**************************************** 16 | * mupnp_httpmu_socket_bind 17 | ****************************************/ 18 | 19 | bool mupnp_httpmu_socket_bind(mUpnpHttpMuSocket* sock, const char* mcastAddr, int port, const char* bindAddr) 20 | { 21 | mupnp_log_debug_l4("Entering...\n"); 22 | 23 | if (mupnp_socket_bind(sock, port, bindAddr, false, true) == false) 24 | return false; 25 | 26 | if (mupnp_socket_joingroup(sock, mcastAddr, bindAddr) == false) { 27 | mupnp_socket_close(sock); 28 | return false; 29 | } 30 | 31 | mupnp_log_debug_l4("Leaving...\n"); 32 | 33 | return true; 34 | } 35 | 36 | /**************************************** 37 | * mupnp_httpmu_socket_recv 38 | ****************************************/ 39 | 40 | ssize_t mupnp_httpmu_socket_recv(mUpnpHttpMuSocket* sock, mUpnpSSDPPacket* ssdpPkt) 41 | { 42 | mUpnpDatagramPacket* dgmPkt; 43 | char* ssdpData; 44 | ssize_t recvLen; 45 | 46 | mupnp_log_debug_l4("Entering...\n"); 47 | 48 | dgmPkt = mupnp_ssdp_packet_getdatagrampacket(ssdpPkt); 49 | recvLen = mupnp_socket_recv(sock, dgmPkt); 50 | 51 | if (recvLen <= 0) 52 | return recvLen; 53 | 54 | ssdpData = mupnp_socket_datagram_packet_getdata(dgmPkt); 55 | 56 | /* set header information to the packets headerlist, 57 | this will leave only the request line in the datagram packet 58 | which is need to verify the message */ 59 | mupnp_ssdp_packet_setheader(ssdpPkt, ssdpData); 60 | 61 | mupnp_log_debug_l4("Leaving...\n"); 62 | 63 | return recvLen; 64 | } 65 | -------------------------------------------------------------------------------- /examples/upnpbrowser/ios/Classes/UPnPDeviceTableViewCell.m: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for Objective-C 4 | * 5 | * UPnPDeviceTableViewCell.m 6 | * 7 | * Copyright (C) Satoshi Konno 2011 8 | * 9 | * This is licensed under BSD-style license, see file COPYING. 10 | * 11 | ******************************************************************/ 12 | 13 | #import "UPnPDeviceTableViewCell.h" 14 | #import 15 | 16 | @implementation UPnPDeviceTableViewCell 17 | 18 | - (UIImage*)getIconImage:(NSString*)iconUrl 19 | { 20 | NSLog(@"getIconImage = %@", iconUrl); 21 | NSURL* url = [NSURL URLWithString:iconUrl]; 22 | if (url == nil) 23 | return nil; 24 | NSData* data = [NSData dataWithContentsOfURL:url]; 25 | if (url == nil) 26 | return nil; 27 | UIImage* iconImage = [[UIImage alloc] initWithData:data]; 28 | if (iconImage != nil) 29 | [iconImage autorelease]; 30 | return iconImage; 31 | } 32 | 33 | - (void)setDevice:(CGUpnpDevice*)upnpDevice 34 | { 35 | [self setName:[upnpDevice friendlyName]]; 36 | [self setMime:[upnpDevice manufacturer]]; 37 | [self setDate:[upnpDevice ipaddress]]; 38 | 39 | UIImage* iconImage = nil; 40 | CGUpnpIcon* smallestIcon = [upnpDevice smallestIconWithMimeType:@"image/png"]; 41 | if (smallestIcon == nil) 42 | smallestIcon = [upnpDevice smallestIconWithMimeType:@"image/jpeg"]; 43 | if (smallestIcon != nil) { 44 | NSString* iconUrl = [upnpDevice absoluteIconUrl:smallestIcon]; 45 | NSLog(@"iconUrl = %@", iconUrl); 46 | if (0 < [iconUrl length]) 47 | iconImage = [self getIconImage:iconUrl]; 48 | } 49 | 50 | if (iconImage == nil) 51 | iconImage = [UIImage imageNamed:@"icon_device.png"]; 52 | 53 | UIImageView* imageView = (UIImageView*)[self.contentView viewWithTag:UPNPAV_CELL_IMAGE]; 54 | [imageView setImage:iconImage]; 55 | 56 | [self setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; 57 | } 58 | 59 | - (void)dealloc 60 | { 61 | [super dealloc]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/filesystem/wince/vs2005/CDmsMobilePhoto.h: -------------------------------------------------------------------------------- 1 | // CDmsMobilePhoto.h : main header file for the CDmsMobilePhoto application 2 | // 3 | #pragma once 4 | 5 | #ifndef __AFXWIN_H__ 6 | #error "include 'stdafx.h' before including this file for PCH" 7 | #endif 8 | 9 | #ifdef POCKETPC2003_UI_MODEL 10 | #include "resourceppc.h" 11 | #endif 12 | #ifdef SMARTPHONE2003_UI_MODEL 13 | #include "resourcesp.h" 14 | #endif 15 | 16 | // CCDmsMobilePhotoApp: 17 | // See CDmsMobilePhoto.cpp for the implementation of this class 18 | // 19 | 20 | #include "cdms_filesys.h" 21 | #include 22 | 23 | #define CDMS_MOBILE_PHOTO_TIMER (10 * 1000) 24 | #define CDMS_MOBILE_PHOTO_APPNAME "Cyber Media Gate for Windows Mobile" 25 | 26 | class CCDmsMobilePhotoApp : public CWinApp { 27 | mUpnpMediaServer* dms; 28 | 29 | mUpnpString* shideShowRoot; 30 | mUpnpFileList* slideShowFileList; 31 | mUpnpFile* nextSlideShowFile; 32 | 33 | public: 34 | CCDmsMobilePhotoApp(); 35 | ~CCDmsMobilePhotoApp(); 36 | 37 | // Overrides 38 | public: 39 | virtual BOOL InitInstance(); 40 | 41 | // Implementation 42 | public: 43 | #ifndef WIN32_PLATFORM_WFSP 44 | afx_msg void OnAppAbout(); 45 | #endif // !WIN32_PLATFORM_WFSP 46 | 47 | afx_msg void OnAppOption(); 48 | 49 | DECLARE_MESSAGE_MAP() 50 | 51 | public: 52 | void SetSlideShowRoot(char* dir) 53 | { 54 | mupnp_string_setvalue(shideShowRoot, dir); 55 | } 56 | 57 | char* GetSlideShowRoot() 58 | { 59 | return mupnp_string_getvalue(shideShowRoot); 60 | } 61 | 62 | mUpnpMediaServer* GetDMS() 63 | { 64 | return dms; 65 | } 66 | 67 | mUpnpFile* GetNextSlideShowFIle(); 68 | 69 | int GetUpdateInterval() 70 | { 71 | return CDMS_MOBILE_PHOTO_TIMER; 72 | } 73 | 74 | void SetUpdateTimer() 75 | { 76 | m_pMainWnd->SetTimer(CDMS_MOBILE_PHOTO_TIMER, GetUpdateInterval(), 0); 77 | } 78 | 79 | void KillUpdateTimer() 80 | { 81 | m_pMainWnd->KillTimer(CDMS_MOBILE_PHOTO_TIMER); 82 | } 83 | }; 84 | 85 | extern CCDmsMobilePhotoApp theApp; 86 | -------------------------------------------------------------------------------- /std/av/sample/upnpavserver/youtube/win32/vs2005/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, 3 | // but are changed infrequently 4 | 5 | #pragma once 6 | 7 | #ifndef _SECURE_ATL 8 | #define _SECURE_ATL 1 9 | #endif 10 | 11 | #ifndef VC_EXTRALEAN 12 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 13 | #endif 14 | 15 | // Modify the following defines if you have to target a platform prior to the ones specified below. 16 | // Refer to MSDN for the latest info on corresponding values for different platforms. 17 | #ifndef WINVER // Allow use of features specific to Windows XP or later. 18 | #define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. 19 | #endif 20 | 21 | #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 22 | #define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. 23 | #endif 24 | 25 | #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. 26 | #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 27 | #endif 28 | 29 | #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 30 | #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. 31 | #endif 32 | 33 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 34 | 35 | // turns off MFC's hiding of some common and often safely ignored warning messages 36 | #define _AFX_ALL_WARNINGS 37 | 38 | #include // MFC extensions 39 | #include // MFC core and standard components 40 | 41 | #ifndef _AFX_NO_OLE_SUPPORT 42 | #include // MFC support for Internet Explorer 4 Common Controls 43 | #endif 44 | #ifndef _AFX_NO_AFXCMN_SUPPORT 45 | #include // MFC support for Windows Common Controls 46 | #endif // _AFX_NO_AFXCMN_SUPPORT 47 | 48 | #include // MFC socket extensions 49 | -------------------------------------------------------------------------------- /src/mupnp/upnp_status.c: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for C 4 | * 5 | * Copyright (C) Satoshi Konno 2005 6 | * Copyright (C) 2006 Nokia Corporation. All rights reserved. 7 | * 8 | * This is licensed under BSD-style license, see file COPYING. 9 | * 10 | ******************************************************************/ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | /**************************************** 17 | * mupnp_status_new 18 | ****************************************/ 19 | 20 | mUpnpStatus* mupnp_status_new(void) 21 | { 22 | mUpnpStatus* upnpStat; 23 | 24 | mupnp_log_debug_l4("Entering...\n"); 25 | 26 | upnpStat = (mUpnpStatus*)malloc(sizeof(mUpnpStatus)); 27 | 28 | if (NULL != upnpStat) { 29 | upnpStat->code = 0; 30 | upnpStat->description = mupnp_string_new(); 31 | } 32 | 33 | return upnpStat; 34 | 35 | mupnp_log_debug_l4("Leaving...\n"); 36 | } 37 | 38 | /**************************************** 39 | * mupnp_status_delete 40 | ****************************************/ 41 | 42 | void mupnp_status_delete(mUpnpStatus* upnpStat) 43 | { 44 | mupnp_log_debug_l4("Entering...\n"); 45 | 46 | mupnp_string_delete(upnpStat->description); 47 | free(upnpStat); 48 | 49 | mupnp_log_debug_l4("Leaving...\n"); 50 | } 51 | 52 | /**************************************** 53 | * mupnp_status_code2string 54 | ****************************************/ 55 | 56 | char* mupnp_status_code2string(int code) 57 | { 58 | mupnp_log_debug_l4("Entering...\n"); 59 | 60 | switch (code) { 61 | case MUPNP_STATUS_INVALID_ACTION: 62 | return "Invalid Action"; 63 | case MUPNP_STATUS_INVALID_ARGS: 64 | return "Invalid Args"; 65 | case MUPNP_STATUS_OUT_OF_SYNC: 66 | return "Out of Sync"; 67 | case MUPNP_STATUS_INVALID_VAR: 68 | return "Invalid Var"; 69 | case MUPNP_STATUS_ACTION_FAILED: 70 | return "Action Failed"; 71 | } 72 | return ""; 73 | 74 | mupnp_log_debug_l4("Leaving...\n"); 75 | } 76 | -------------------------------------------------------------------------------- /wrapper/objc/mUPnP/CGUpnpAction.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * 3 | * mUPnP for ObjC 4 | * 5 | * Copyright (C) Satoshi Konno 2008 6 | * 7 | * This is licensed under BSD-style license, see file COPYING. 8 | * 9 | ******************************************************************/ 10 | 11 | #import 12 | #import 13 | 14 | #if !defined(_MUPNP_ACTION_H_) 15 | typedef void mUpnpAction; 16 | #endif 17 | 18 | /** 19 | * The CGUpnpAction class is a wrapper class for mUpnpAction of mUPnP for C. 20 | */ 21 | @interface CGUpnpAction : NSObject { 22 | } 23 | @property (assign, readonly) mUpnpAction* cObject; 24 | - (id)initWithCObject:(mUpnpAction*)cobj; 25 | /** 26 | * Get the name of the action. 27 | * 28 | * @return The name. 29 | */ 30 | - (NSString*)name; 31 | /** 32 | * Get all arguments in the action as a NSDictionary object. 33 | * 34 | * @return NSDictionary of the arguments. 35 | */ 36 | - (NSDictionary*)arguments; 37 | /** 38 | * Set a value of the specified argument from the action by the argument's name directly. 39 | * 40 | * @param value The value to set 41 | * @param name The name of the argument to look for 42 | * @return YES if successfull; otherwise NO 43 | */ 44 | - (BOOL)setArgumentValue:(NSString*)value forName:(NSString*)name; 45 | /** 46 | * Get a value of the specified argument from the action by the argument's name directly. 47 | * 48 | * @param name The name of the argument to look for 49 | * @return The target value if successfull; otherwise NULL 50 | */ 51 | - (NSString*)argumentValueForName:(NSString*)name; 52 | /** 53 | * Send action 54 | * 55 | * @return YES if successfull; otherwise NO 56 | */ 57 | - (BOOL)post; 58 | /** 59 | * Send action 60 | * 61 | * @param arguments Arguments to set 62 | * 63 | * @return YES if successfull; otherwise NO 64 | */ 65 | - (BOOL)postWithArguments:(NSDictionary*)arguments; 66 | /** 67 | * Get a states code of the last post. 68 | * 69 | * @return The status code 70 | */ 71 | - (NSInteger)statusCode; 72 | @end 73 | --------------------------------------------------------------------------------