├── .gitignore ├── LICENSE ├── README.md ├── projects ├── scpdcodegenerator │ ├── BasicParser.h │ ├── BasicParser.m │ ├── BasicParserAsset.h │ ├── BasicParserAsset.m │ ├── SCDPPArser.h │ ├── SCDPPArser.m │ ├── main.mm │ ├── scpdcodegenerator.1 │ └── scpdcodegenerator.xcodeproj │ │ ├── bruno.mode1v3 │ │ ├── bruno.pbxuser │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── bruno.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ └── bruno.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints.xcbkptlist │ │ └── xcschemes │ │ ├── scpdcodegenerator.xcscheme │ │ └── xcschememanagement.plist ├── xcode4 │ ├── upnpx │ │ ├── upnpx.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.pbxproj.orig │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcuserdata │ │ │ │ └── bruno.xcuserdatad │ │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── upnpx │ │ │ └── upnpx-Prefix.pch │ ├── upnpxdemo.xcworkspace │ │ └── contents.xcworkspacedata │ └── upnpxdemo │ │ ├── Default-568h@2x.png │ │ ├── upnpxdemo.xcodeproj │ │ └── project.pbxproj │ │ └── upnpxdemo │ │ ├── FolderViewController.h │ │ ├── FolderViewController.m │ │ ├── FolderViewController.xib │ │ ├── PlayBack.h │ │ ├── PlayBack.m │ │ ├── RootViewController.h │ │ ├── RootViewController.m │ │ ├── en.lproj │ │ ├── InfoPlist.strings │ │ ├── MainWindow.xib │ │ └── RootViewController.xib │ │ ├── main.m │ │ ├── upnpxdemo-Info.plist │ │ ├── upnpxdemo-Prefix.pch │ │ ├── upnpxdemoAppDelegate.h │ │ └── upnpxdemoAppDelegate.m └── xcode7 │ ├── upnpx │ ├── upnpx.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.pbxproj.orig │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── upnpx (Mac).xcscheme │ │ │ ├── upnpx (iOS).xcscheme │ │ │ └── upnpx (tvOS).xcscheme │ └── upnpx │ │ ├── Info.plist │ │ ├── UIImage.h │ │ ├── UIImage.m │ │ ├── iphoneport.h │ │ ├── upnpx-Prefix.pch │ │ └── upnpx.h │ ├── upnpxdemo.xcworkspace │ └── contents.xcworkspacedata │ └── upnpxdemo │ ├── Default-568h@2x.png │ ├── upnpxdemo.xcodeproj │ └── project.pbxproj │ └── upnpxdemo │ ├── FolderViewController.h │ ├── FolderViewController.m │ ├── FolderViewController.xib │ ├── PlayBack.h │ ├── PlayBack.m │ ├── RootViewController.h │ ├── RootViewController.m │ ├── en.lproj │ ├── InfoPlist.strings │ ├── MainWindow.xib │ └── RootViewController.xib │ ├── main.m │ ├── upnpxdemo-Info.plist │ ├── upnpxdemo-Prefix.pch │ ├── upnpxdemoAppDelegate.h │ └── upnpxdemoAppDelegate.m ├── src ├── api │ ├── BasicDeviceParser.h │ ├── BasicHTTPServer_ObjC.h │ ├── BasicParser.h │ ├── BasicParserAsset.h │ ├── BasicServiceParser.h │ ├── BasicUPnPDevice.h │ ├── BasicUPnPService.h │ ├── BinaryLight1Device.h │ ├── DeviceFactory.h │ ├── DigitalSecurityCamera1Device.h │ ├── DimmableLight1Device.h │ ├── InternetGateway2Device.h │ ├── LAN1Device.h │ ├── LastChangeParser.h │ ├── MediaPlaylist.h │ ├── MediaRenderer1Device.h │ ├── MediaServer1BasicObject.h │ ├── MediaServer1ContainerObject.h │ ├── MediaServer1Device.h │ ├── MediaServer1ItemObject.h │ ├── MediaServer1ItemRes.h │ ├── MediaServerBasicObjectParser.h │ ├── NSString+UPnPExtentions.h │ ├── OrderedDictionary.h │ ├── SSDPDB_ObjC.h │ ├── SoapAction.h │ ├── SoapActionsAVTransport1.h │ ├── SoapActionsCallManagement1.h │ ├── SoapActionsConfigurationManagement1.h │ ├── SoapActionsConnectionManager1.h │ ├── SoapActionsContentDirectory1.h │ ├── SoapActionsDeviceProtection1.h │ ├── SoapActionsDigitalSecurityCameraMotionImage1.h │ ├── SoapActionsDigitalSecurityCameraSettings1.h │ ├── SoapActionsDigitalSecurityCameraStillImage1.h │ ├── SoapActionsDimming1.h │ ├── SoapActionsInputConfig1.h │ ├── SoapActionsLANHostConfigManagement1.h │ ├── SoapActionsLayer3Forwarding1.h │ ├── SoapActionsMediaManagement1.h │ ├── SoapActionsMessaging1.h │ ├── SoapActionsRendering.h │ ├── SoapActionsRenderingControl1.h │ ├── SoapActionsSwitchPower1.h │ ├── SoapActionsWANCableLinkConfig1.h │ ├── SoapActionsWANCommonInterfaceConfig1.h │ ├── SoapActionsWANDSLLinkConfig1.h │ ├── SoapActionsWANEthernetLinkConfig1.h │ ├── SoapActionsWANIPConnection1.h │ ├── SoapActionsWANIPConnection2.h │ ├── SoapActionsWANIPv6FirewallControl1.h │ ├── SoapActionsWANPOTSLinkConfig1.h │ ├── SoapActionsWANPPPConnection1.h │ ├── StateVariable.h │ ├── StateVariableList.h │ ├── StateVariableRange.h │ ├── TelephonyClient1Device.h │ ├── TelephonyServer1Device.h │ ├── UPnPDB.h │ ├── UPnPEventParser.h │ ├── UPnPEvents.h │ ├── UPnPManager.h │ ├── UPnPServiceConstants.h │ ├── UPnPServiceConstantsAVTransport1.h │ ├── UPnPServiceConstantsConnectionManager1.h │ ├── UPnPServiceConstantsContentDirectory1.h │ ├── UPnPServiceConstantsRenderingControl1.h │ ├── WAN2Device.h │ ├── WANConnection1Device.h │ └── WANConnection2Device.h ├── common │ ├── osal.h │ ├── tools.cpp │ └── tools.h ├── eventserver │ ├── BasicHTTPServer_ObjC.mm │ ├── SocketServer_ObjC.h │ ├── SocketServer_ObjC.mm │ ├── basichttpobserver.h │ ├── basichttpserver.cpp │ ├── basichttpserver.h │ ├── httpsession.cpp │ ├── httpsession.h │ ├── socketServerobserver.h │ ├── socketserver.cpp │ ├── socketserver.h │ ├── socketserverconnection.cpp │ └── socketserverconnection.h ├── port │ ├── ios │ │ └── iphoneport.h │ └── macos │ │ ├── UIImage.h │ │ ├── UIImage.m │ │ └── iphoneport.h ├── ssdp │ ├── SSDPDB_ObjC.mm │ ├── main.mm │ ├── ssdp.cpp │ ├── ssdp.h │ ├── ssdpdb.cpp │ ├── ssdpdb.h │ ├── ssdpdbdevice.cpp │ ├── ssdpdbdevice.h │ ├── ssdpdbobserver.h │ ├── ssdphttp.cpp │ ├── ssdphttp.h │ ├── ssdpmessage.cpp │ ├── ssdpmessage.h │ ├── ssdpmsearch.cpp │ ├── ssdpmsearch.h │ ├── ssdpnotify.cpp │ ├── ssdpnotify.h │ ├── ssdpnotifyalive.cpp │ ├── ssdpnotifyalive.h │ ├── ssdpnotifybye.cpp │ ├── ssdpnotifybye.h │ ├── ssdpnotifyupdate.cpp │ ├── ssdpnotifyupdate.h │ ├── ssdpobserver.h │ ├── ssdpparser.cpp │ ├── ssdpparser.h │ ├── ssdpsearchreq.cpp │ ├── ssdpsearchreq.h │ ├── ssdpsearchresp.cpp │ ├── ssdpsearchresp.h │ ├── ssdptools.cpp │ ├── ssdptools.h │ ├── upnp.cpp │ └── upnp.h └── upnp │ ├── BasicDeviceParser.m │ ├── BasicParser.m │ ├── BasicParserAsset.m │ ├── BasicServiceParser.m │ ├── BasicUPnPDevice.m │ ├── BasicUPnPService.m │ ├── BinaryLight1Device.m │ ├── CocoaTools.m │ ├── DeviceFactory.m │ ├── DigitalSecurityCamera1Device.m │ ├── DimmableLigh1tDevice.m │ ├── InternetGateway2Device.m │ ├── LAN1Device.m │ ├── LastChangeParser.m │ ├── MediaPlaylist.m │ ├── MediaRenderer1Device.m │ ├── MediaServer1BasicObject.m │ ├── MediaServer1ContainerObject.m │ ├── MediaServer1Device.m │ ├── MediaServer1ItemObject.m │ ├── MediaServer1ItemRes.m │ ├── MediaServerBasicObjectParser.m │ ├── OrderedDictionary.m │ ├── SoapAction.m │ ├── SoapActionsAVTransport1.m │ ├── SoapActionsCallManagement1.m │ ├── SoapActionsConfigurationManagement1.m │ ├── SoapActionsConnectionManager1.m │ ├── SoapActionsContentDirectory1.m │ ├── SoapActionsDeviceProtection1.m │ ├── SoapActionsDigitalSecurityCameraMotionImage1.m │ ├── SoapActionsDigitalSecurityCameraSettings1.m │ ├── SoapActionsDigitalSecurityCameraStillImage1.m │ ├── SoapActionsDimming1.m │ ├── SoapActionsInputConfig1.m │ ├── SoapActionsLANHostConfigManagement1.m │ ├── SoapActionsLayer3Forwarding1.m │ ├── SoapActionsMediaManagement1.m │ ├── SoapActionsMessaging1.m │ ├── SoapActionsRendering.m │ ├── SoapActionsRenderingControl1.m │ ├── SoapActionsSwitchPower1.m │ ├── SoapActionsWANCableLinkConfig1.m │ ├── SoapActionsWANCommonInterfaceConfig1.m │ ├── SoapActionsWANDSLLinkConfig1.m │ ├── SoapActionsWANEthernetLinkConfig1.m │ ├── SoapActionsWANIPConnection1.m │ ├── SoapActionsWANIPConnection2.m │ ├── SoapActionsWANIPv6FirewallControl1.m │ ├── SoapActionsWANPOTSLinkConfig1.m │ ├── SoapActionsWANPPPConnection1.m │ ├── StateVariable.m │ ├── StateVariableList.m │ ├── StateVariableRange.m │ ├── TelephonyClient1Device.m │ ├── TelephonyServer1Device.m │ ├── UPnPDB.m │ ├── UPnPEventParser.m │ ├── UPnPEvents.m │ ├── UPnPManager.m │ ├── UPnPServiceConstantsAVTransport1.m │ ├── UPnPServiceConstantsConnectionManager1.m │ ├── UPnPServiceConstantsContentDirectory1.m │ ├── UPnPServiceConstantsRenderingControl1.m │ ├── WAN2Device.m │ ├── WANConnection1Device.m │ └── WANConnection2Device.m ├── tutorial ├── license.md ├── pages │ ├── addressing.md │ ├── build-upnpx.md │ ├── compatibility.md │ ├── control.md │ ├── description.md │ ├── discovery.md │ ├── eventing.md │ ├── images │ │ ├── build_result.png │ │ ├── demo_screen_1.png │ │ ├── demo_screen_2.png │ │ ├── demo_screen_3.png │ │ ├── demo_screen_4.png │ │ ├── draglibupnpx.png │ │ ├── includepaths.png │ │ ├── linkstdc.png │ │ ├── locate_project.png │ │ ├── navapp.png │ │ ├── scheme.png │ │ ├── ssdpscreen.png │ │ └── xcode4 │ │ │ ├── add_demoproject.png │ │ │ ├── add_files.png │ │ │ ├── add_libupnpx.png │ │ │ ├── add_upnpx.png │ │ │ ├── navbased.png │ │ │ ├── newproject.png │ │ │ ├── save_workspace.png │ │ │ ├── set_scheme.png │ │ │ └── workspace.png │ ├── libupnpx.md │ ├── new-device.md │ └── presentation.md └── readme.md └── upnpx.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | xcshareddata 20 | 21 | #CocoaPods 22 | Pods 23 | 24 | upnpx.framework.zip 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012, Bruno Keymolen 2 | Copyright (c) 2013, Jonathan Guan, Mujtaba Hassanpur, Gleb Pinigin 3 | Copyright (c) 2013-2014, Felix Paul Kühne 4 | Contributions by Andrejs Cernikovs (c) 2012, Sebastian Peischl (c) 2014 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | list of conditions and the following disclaimer in the documentation and/or 15 | other materials provided with the distribution. 16 | 17 | * Neither the name of the {organization} nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | upnpx 2 | ===== 3 | 4 | Fork of the discontinued upnpx library by Bruno Keymolen. 5 | 6 | Including various logic and stability improvements over the last version. 7 | 8 | ===== 9 | 10 | Copyright (c) 2011-2012, Bruno Keymolen 11 | 12 | Copyright (c) 2013, Jonathan Guan, Mujtaba Hassanpur, Gleb Pinigin 13 | 14 | Copyright (c) 2013-2014, Felix Paul Kühne 15 | 16 | Contributions by Andrejs Cernikovs (c) 2012, Sebastian Peischl (c) 2014, Sebastian Roth (c) 2014. 17 | 18 | All rights reserved. 19 | 20 | ===== 21 | 22 | Redistribution and use in source and binary forms, with or without modification, 23 | are permitted provided that the following conditions are met: 24 | 25 | * Redistributions of source code must retain the above copyright notice, this 26 | list of conditions and the following disclaimer. 27 | 28 | * Redistributions in binary form must reproduce the above copyright notice, this 29 | list of conditions and the following disclaimer in the documentation and/or 30 | other materials provided with the distribution. 31 | 32 | * Neither the name of the {organization} nor the names of its 33 | contributors may be used to endorse or promote products derived from 34 | this software without specific prior written permission. 35 | 36 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 37 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 38 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 39 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 40 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 41 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 43 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 45 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 46 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/BasicParser.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "BasicParserAsset.h" 37 | 38 | 39 | @interface BasicParser : NSObject { 40 | @public 41 | NSMutableArray *mElementStack; //NSString 42 | NSMutableArray *mAssets; //BasicParserAssets 43 | BOOL mSupportNamespaces; 44 | } 45 | 46 | -(id)init; 47 | -(id)initWithNamespaceSupport:(BOOL)namespaceSupport; 48 | -(void)dealloc; 49 | -(void)clearAllAssets; 50 | -(int)addAsset:(NSArray*)path callfunction:(SEL)function functionObject:(id)funcObj setStringValueFunction:(SEL)valueFunction setStringValueObject:(id)obj; 51 | -(int)parseFromURL:(NSURL*)url; 52 | -(int)parseFromData:(NSData*)data; 53 | 54 | -(BasicParserAsset*)getAssetForElementStack:(NSMutableArray*)stack; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/BasicParserAsset.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | 37 | 38 | @interface BasicParserAsset : NSObject { 39 | NSArray *path; 40 | SEL function; 41 | id functionObject; 42 | SEL stringValueFunction; 43 | id stringValueObject; 44 | NSMutableString *stringCache; 45 | } 46 | 47 | -(id)initWithPath:(NSArray*)thePath setStringValueFunction:(SEL)theValueFunction setStringValueObject:(id)obj callFunction:(SEL)theFunction functionObject:(id)funcobj; 48 | -(void)dealloc; 49 | 50 | @property (readwrite, retain) NSArray *path; 51 | @property (readonly) SEL function; 52 | @property (readonly) id functionObject; 53 | @property (readonly) SEL stringValueFunction; 54 | @property (readonly) id stringValueObject; 55 | @property (readwrite, retain) NSMutableString *stringCache; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/main.mm: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #include 36 | #import "SCDPPArser.h" 37 | 38 | 39 | int main (int argc, char * const argv[]) { 40 | if(argc != 3){ 41 | printf("Usage : scpdcodegenerator \nexample:./scpdcodegenerator RenderingControl1.xml RenderingControl1"); 42 | return -1; 43 | } 44 | 45 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 46 | 47 | NSString *loc = [NSString stringWithCString:argv[1]]; 48 | NSString *name = [NSString stringWithCString:argv[2]]; 49 | // NSString *ns = [NSString stringWithCString:argv[3]]; 50 | 51 | SCDPPArser *parser = [[SCDPPArser alloc] initWithXMLLocation:loc output:name];// nameSpace:ns]; 52 | int r = [parser parse]; 53 | [parser release]; 54 | 55 | [pool release]; 56 | 57 | if(r < 0){ 58 | printf("Parse Error.\n"); 59 | } 60 | 61 | 62 | return 0; 63 | } 64 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/scpdcodegenerator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/scpdcodegenerator.xcodeproj/xcuserdata/bruno.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 17 | 18 | 29 | 30 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /projects/scpdcodegenerator/scpdcodegenerator.xcodeproj/xcuserdata/bruno.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | scpdcodegenerator.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8DD76F620486A84900D96B5E 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /projects/xcode4/upnpx/upnpx.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /projects/xcode4/upnpx/upnpx.xcodeproj/project.xcworkspace/xcuserdata/bruno.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceUserSettings_BuildLocationStyle 6 | 2 7 | IDEWorkspaceUserSettings_BuildSubfolderNameStyle 8 | 0 9 | IDEWorkspaceUserSettings_DerivedDataLocationStyle 10 | 0 11 | IDEWorkspaceUserSettings_LiveSourceIssuesEnabled 12 | 13 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges 14 | 15 | IDEWorkspaceUserSettings_SnapshotLocationStyle 16 | 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /projects/xcode4/upnpx/upnpx/upnpx-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpx' target in the 'upnpx' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/projects/xcode4/upnpxdemo/Default-568h@2x.png -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/FolderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FolderViewController.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 02/07/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MediaServer1Device.h" 11 | 12 | @interface FolderViewController : UITableViewController { 13 | NSString *m_rootId; 14 | NSString *m_title; 15 | MediaServer1Device *m_device; 16 | NSMutableArray *m_playList; //MediaServer1BasicObject (can be: MediaServer1ContainerObject, MediaServer1ItemObject) 17 | UILabel *titleLabel; 18 | } 19 | 20 | @property (strong) UILabel *titleLabel; 21 | 22 | -(instancetype)initWithMediaDevice:(MediaServer1Device*)device andHeader:(NSString*)header andRootId:(NSString*)rootId NS_DESIGNATED_INITIALIZER; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/PlayBack.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBack.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 03/03/12. 6 | // Copyright 2012 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MediaRenderer1Device.h" 12 | #import "MediaServer1Device.h" 13 | #import "BasicUPnPService.h" 14 | 15 | @interface PlayBack : NSObject { 16 | MediaRenderer1Device *__weak renderer; 17 | MediaServer1Device *server; 18 | NSMutableArray *playlist; //MediaServer1BasicObject (can be: MediaServer1ContainerObject, MediaServer1ItemObject) 19 | NSInteger pos; 20 | } 21 | 22 | +(PlayBack*)GetInstance; 23 | 24 | -(void)setRenderer:(MediaRenderer1Device*)rend; 25 | -(int)Play:(NSMutableArray*)playList position:(NSInteger)position; 26 | -(int)Play:(NSInteger)position; 27 | 28 | //BasicUPnPServiceObserver 29 | -(void)UPnPEvent:(BasicUPnPService*)sender events:(NSDictionary*)events; 30 | 31 | @property (strong) MediaServer1Device *server; 32 | @property (weak, readonly) MediaRenderer1Device *renderer; 33 | @property (strong) NSMutableArray *playlist; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "UPnPDB.h" 12 | 13 | @interface RootViewController : UITableViewController { 14 | UITableView *__weak menuView; 15 | NSArray *mDevices; //BasicUPnPDevice* 16 | UILabel *titleLabel; 17 | } 18 | 19 | @property (weak) IBOutlet UITableView *menuView; 20 | @property (strong) UILabel *titleLabel; 21 | 22 | //protocol UPnPDBObserver 23 | -(void)UPnPDBWillUpdate:(UPnPDB*)sender; 24 | -(void)UPnPDBUpdated:(UPnPDB*)sender; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/upnpxdemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.keymolen.upnpx 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | 34 | NSMainNibFile 35 | MainWindow 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/upnpxdemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpxdemo' target in the 'upnpxdemo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/upnpxdemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // upnpxdemoAppDelegate.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface upnpxdemoAppDelegate : NSObject { 12 | 13 | } 14 | 15 | @property (nonatomic, strong) IBOutlet UIWindow *window; 16 | 17 | @property (nonatomic, strong) IBOutlet UINavigationController *navigationController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /projects/xcode4/upnpxdemo/upnpxdemo/upnpxdemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // upnpxdemoAppDelegate.m 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import "upnpxdemoAppDelegate.h" 10 | 11 | @implementation upnpxdemoAppDelegate 12 | 13 | 14 | @synthesize window=_window; 15 | 16 | @synthesize navigationController=_navigationController; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | // Override point for customization after application launch. 21 | // Add the navigation controller's view to the window and display. 22 | self.window.rootViewController = self.navigationController; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | /* 30 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 31 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 32 | */ 33 | } 34 | 35 | - (void)applicationDidEnterBackground:(UIApplication *)application 36 | { 37 | /* 38 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 39 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 40 | */ 41 | } 42 | 43 | - (void)applicationWillEnterForeground:(UIApplication *)application 44 | { 45 | /* 46 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 47 | */ 48 | } 49 | 50 | - (void)applicationDidBecomeActive:(UIApplication *)application 51 | { 52 | /* 53 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 54 | */ 55 | } 56 | 57 | - (void)applicationWillTerminate:(UIApplication *)application 58 | { 59 | /* 60 | Called when the application is about to terminate. 61 | Save data if appropriate. 62 | See also applicationDidEnterBackground:. 63 | */ 64 | } 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx/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 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx/UIImage.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | # if TARGET_OS_MAC 35 | #import 36 | 37 | @class UIImage; 38 | 39 | @interface UIImage : NSImage { 40 | } 41 | 42 | 43 | +(UIImage*)imageWithData:(NSData *)data; 44 | 45 | 46 | @end 47 | 48 | #endif -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx/UIImage.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #if TARGET_OS_MAC 35 | #import "UIImage.h" 36 | 37 | 38 | @implementation UIImage 39 | 40 | 41 | +(UIImage*)imageWithData:(NSData *)data{ 42 | UIImage *ret = [[[UIImage alloc] initWithData:data] autorelease]; 43 | return ret; 44 | } 45 | 46 | 47 | 48 | @end 49 | #endif -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx/iphoneport.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _IPHONE_PORT 36 | #define _IPHONE_PORT 37 | 38 | #ifndef __cplusplus 39 | #import "UIImage.h" 40 | #endif 41 | 42 | #endif -------------------------------------------------------------------------------- /projects/xcode7/upnpx/upnpx/upnpx-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpx' target in the 'upnpx' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/projects/xcode7/upnpxdemo/Default-568h@2x.png -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/FolderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FolderViewController.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 02/07/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MediaServer1Device.h" 11 | 12 | @class MediaServer1BasicObject; 13 | 14 | @interface FolderViewController : UITableViewController 15 | 16 | @property(strong, nonatomic) NSString *m_rootId; 17 | @property(strong, nonatomic) NSString *m_title; 18 | @property(strong, nonatomic) MediaServer1Device *m_device; 19 | @property(strong, nonatomic) NSMutableArray *m_playList; 20 | 21 | @property(strong, nonatomic) UILabel *titleLabel; 22 | 23 | -(instancetype)initWithMediaDevice:(MediaServer1Device*)device andHeader:(NSString*)header andRootId:(NSString*)rootId NS_DESIGNATED_INITIALIZER; 24 | 25 | - (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE; 26 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil NS_UNAVAILABLE; 27 | - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/PlayBack.h: -------------------------------------------------------------------------------- 1 | // 2 | // PlayBack.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 03/03/12. 6 | // Copyright 2012 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MediaRenderer1Device.h" 12 | #import "MediaServer1Device.h" 13 | #import "BasicUPnPService.h" 14 | 15 | @interface PlayBack : NSObject { 16 | MediaRenderer1Device *__weak renderer; 17 | MediaServer1Device *server; 18 | NSMutableArray *playlist; //MediaServer1BasicObject (can be: MediaServer1ContainerObject, MediaServer1ItemObject) 19 | NSInteger pos; 20 | } 21 | 22 | +(PlayBack*)GetInstance; 23 | 24 | -(void)setRenderer:(MediaRenderer1Device*)rend; 25 | -(int)Play:(NSMutableArray*)playList position:(NSInteger)position; 26 | -(int)Play:(NSInteger)position; 27 | 28 | //BasicUPnPServiceObserver 29 | -(void)UPnPEvent:(BasicUPnPService*)sender events:(NSDictionary*)events; 30 | 31 | @property (strong) MediaServer1Device *server; 32 | @property (weak, readonly) MediaRenderer1Device *renderer; 33 | @property (strong) NSMutableArray *playlist; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "UPnPDB.h" 12 | 13 | @interface RootViewController : UITableViewController 14 | 15 | @property(strong, nonatomic) NSArray *mDevices; 16 | 17 | @property(weak, nonatomic) IBOutlet UITableView *menuView; 18 | @property(strong, nonatomic) UILabel *titleLabel; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/upnpxdemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | 34 | NSMainNibFile 35 | MainWindow 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/upnpxdemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'upnpxdemo' target in the 'upnpxdemo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/upnpxdemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // upnpxdemoAppDelegate.h 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface upnpxdemoAppDelegate : NSObject { 12 | 13 | } 14 | 15 | @property (nonatomic, strong) IBOutlet UIWindow *window; 16 | 17 | @property (nonatomic, strong) IBOutlet UINavigationController *navigationController; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /projects/xcode7/upnpxdemo/upnpxdemo/upnpxdemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // upnpxdemoAppDelegate.m 3 | // upnpxdemo 4 | // 5 | // Created by Bruno Keymolen on 28/05/11. 6 | // Copyright 2011 Bruno Keymolen. All rights reserved. 7 | // 8 | 9 | #import "upnpxdemoAppDelegate.h" 10 | 11 | @implementation upnpxdemoAppDelegate 12 | 13 | 14 | @synthesize window=_window; 15 | 16 | @synthesize navigationController=_navigationController; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | // Override point for customization after application launch. 21 | // Add the navigation controller's view to the window and display. 22 | self.window.rootViewController = self.navigationController; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | /* 30 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 31 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 32 | */ 33 | } 34 | 35 | - (void)applicationDidEnterBackground:(UIApplication *)application 36 | { 37 | /* 38 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 39 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 40 | */ 41 | } 42 | 43 | - (void)applicationWillEnterForeground:(UIApplication *)application 44 | { 45 | /* 46 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 47 | */ 48 | } 49 | 50 | - (void)applicationDidBecomeActive:(UIApplication *)application 51 | { 52 | /* 53 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 54 | */ 55 | } 56 | 57 | - (void)applicationWillTerminate:(UIApplication *)application 58 | { 59 | /* 60 | Called when the application is about to terminate. 61 | Save data if appropriate. 62 | See also applicationDidEnterBackground:. 63 | */ 64 | } 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /src/api/BasicParser.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | 37 | @class BasicParserAsset; 38 | @interface BasicParser : NSObject { 39 | @public 40 | NSMutableArray *mElementStack;//NSString 41 | NSMutableArray *mAssets;//BasicParserAssets 42 | BOOL mSupportNamespaces; 43 | NSDictionary * elementAttributeDict; 44 | NSString *currentElementName; 45 | } 46 | 47 | -(instancetype)initWithNamespaceSupport:(BOOL)namespaceSupport; 48 | 49 | -(void)clearAllAssets; 50 | -(int)addAsset:(NSArray*)path callfunction:(SEL)function functionObject:(id)funcObj setStringValueFunction:(SEL)valueFunction setStringValueObject:(id)obj; 51 | -(int)parseFromURL:(NSURL*)url; 52 | -(int)parseFromData:(NSData*)data; 53 | 54 | -(BasicParserAsset*)getAssetForElementStack:(NSMutableArray*)stack; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /src/api/BasicParserAsset.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | 37 | 38 | @interface BasicParserAsset : NSObject 39 | 40 | - (instancetype)initWithPath:(NSArray *)thePath setStringValueFunction:(SEL)theValueFunction setStringValueObject:(id)obj callFunction:(SEL)theFunction functionObject:(id)funcobj NS_DESIGNATED_INITIALIZER; 41 | - (instancetype)init NS_UNAVAILABLE; 42 | 43 | @property (readwrite, retain) NSArray *path; 44 | @property (readonly) SEL function; 45 | @property (readonly) id functionObject; 46 | @property (readonly) SEL stringValueFunction; 47 | @property (readonly) id stringValueObject; 48 | @property (readwrite, retain) NSMutableString *stringCache; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /src/api/BinaryLight1Device.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | #import "SoapActionsSwitchPower1.h" 36 | #import "BasicUPnPService.h" 37 | #import "BasicUPnPDevice.h" 38 | 39 | /* 40 | * Services: 41 | * M - SwitchPower:1 42 | */ 43 | 44 | @interface BinaryLight1Device : BasicUPnPDevice { 45 | SoapActionsSwitchPower1 *mSwitchPower; 46 | } 47 | 48 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsSwitchPower1 *switchPower; 49 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *switchPowerService; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /src/api/DeviceFactory.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | #import "BasicUPnPDevice.h" 36 | #import "SSDPDB_ObjC.h" 37 | 38 | @interface DeviceFactory : NSObject { 39 | 40 | } 41 | 42 | -(BasicUPnPDevice*)allocDeviceForSSDPDevice:(SSDPDBDevice_ObjC*)ssdp; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /src/api/DimmableLight1Device.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "BasicUPnPDevice.h" 37 | #import "SoapActionsDimming1.h" 38 | #import "SoapActionsSwitchPower1.h" 39 | 40 | @interface DimmableLight1Device : BasicUPnPDevice { 41 | SoapActionsSwitchPower1 *mSwitchPower; 42 | SoapActionsDimming1 *mDimming; 43 | } 44 | 45 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsSwitchPower1 *switchPower; 46 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsDimming1 *dimming; 47 | 48 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *switchPowerService; 49 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *dimmingService; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /src/api/InternetGateway2Device.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | #import "BasicUPnPDevice.h" 36 | 37 | #import "SoapActionsLayer3Forwarding1.h" 38 | 39 | /* 40 | * Services: 41 | * O - Layer3Forwarding:1 42 | */ 43 | 44 | @interface InternetGateway2Device : BasicUPnPDevice { 45 | SoapActionsLayer3Forwarding1 *mLayer3Forwarding; 46 | } 47 | 48 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsLayer3Forwarding1 *layer3Forwarding; 49 | 50 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *layer3ForwardingService; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /src/api/LAN1Device.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | #import "BasicUPnPDevice.h" 36 | 37 | #import "SoapActionsLANHostConfigManagement1.h" 38 | 39 | /* 40 | * Services: 41 | * O - LANHostConfigManagement:1 42 | */ 43 | 44 | @interface LAN1Device : BasicUPnPDevice { 45 | SoapActionsLANHostConfigManagement1 *mLanHostConfigManagement; 46 | } 47 | 48 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsLANHostConfigManagement1 *lanHostConfigManagement; 49 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *lanHostConfigManagementService; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /src/api/LastChangeParser.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "BasicParser.h" 37 | 38 | @interface LastChangeParser : BasicParser { 39 | NSMutableDictionary *events; 40 | } 41 | 42 | -(instancetype)initWithEventDictionary:(NSMutableDictionary*)foundEvents NS_DESIGNATED_INITIALIZER; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /src/api/MediaServer1BasicObject.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | 36 | 37 | @interface MediaServer1BasicObject : NSObject { 38 | NSString *objectID; 39 | NSString *parentID; 40 | NSString *objectClass; 41 | NSString *title; 42 | NSString *albumArt; 43 | NSString *artist; 44 | 45 | BOOL isContainer; 46 | } 47 | 48 | @property (readwrite, retain)NSString *objectID; 49 | @property (readwrite, retain)NSString *parentID; 50 | @property (readwrite, retain)NSString *title; 51 | @property (readwrite, retain)NSString *objectClass; 52 | @property (readwrite)BOOL isContainer; 53 | @property (readwrite, retain) NSString *albumArt; 54 | @property (readwrite, retain) NSString *artist; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /src/api/MediaServer1ContainerObject.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "MediaServer1BasicObject.h" 37 | 38 | @interface MediaServer1ContainerObject : MediaServer1BasicObject { 39 | NSString *childCount; 40 | } 41 | 42 | @property(retain, nonatomic) NSString *childCount; 43 | 44 | @property (readwrite, retain) NSMutableArray *creators; 45 | @property (readwrite, retain) NSMutableArray *authors; 46 | @property (readwrite, retain) NSMutableArray *directors; 47 | @property (readwrite, retain) NSString *longDescription; 48 | @property (readwrite, retain) NSString *lastPlaybackPosition; 49 | @property (readwrite, retain) NSString *lastPlaybacktime; 50 | @property (readwrite, retain) NSString *playbackCount; 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /src/api/NSString+UPnPExtentions.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | 37 | @interface NSString (UPnPExtentions) 38 | 39 | - (NSString *)XMLUnEscape; 40 | - (NSString *)XMLEscape; 41 | 42 | - (int)HMS2Seconds; 43 | + (NSString *)Seconds2HMS:(int)seconds; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /src/api/OrderedDictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // OrderedDictionary.h 3 | // OrderedDictionary 4 | // 5 | // Created by Matt Gallagher on 19/12/08. 6 | // Copyright 2008 Matt Gallagher. All rights reserved. 7 | // 8 | // Permission is given to use this source code file without charge in any 9 | // project, commercial or otherwise, entirely at your risk, with the condition 10 | // that any redistribution (in part or whole) of source code must retain 11 | // this copyright and permission notice. Attribution in compiled projects is 12 | // appreciated but not required. 13 | // 14 | 15 | //#import 16 | 17 | @interface OrderedDictionary : NSMutableDictionary 18 | { 19 | NSMutableDictionary *dictionary; 20 | NSMutableArray *array; 21 | } 22 | 23 | - (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex; 24 | - (id)keyAtIndex:(NSUInteger)anIndex; 25 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) NSEnumerator *reverseKeyEnumerator; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /src/api/SoapAction.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import "BasicParser.h" 35 | 36 | @interface SoapAction : BasicParser 37 | 38 | @property (nonatomic, strong) NSURLResponse *response; 39 | @property (nonatomic, strong) NSError *error; 40 | 41 | -(instancetype)initWithActionURL:(NSURL*)aUrl eventURL:(NSURL*)eUrl upnpnamespace:(NSString*)ns NS_DESIGNATED_INITIALIZER; 42 | -(NSInteger)action:(NSString*)soapAction parameters:(NSDictionary*)parameters returnValues:(NSDictionary*)output; 43 | 44 | -(void)setStringValueForFoundAsset:(NSString*)value; 45 | 46 | @end 47 | 48 | @interface SoapAction (Factory) 49 | 50 | + (SoapAction *)soapActionWithURN:(NSString*)urn andBaseNSURL:(NSURL*)baseURL andControlURL:(NSString*)controlURL andEventURL:(NSString*)eventURL; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /src/api/SoapActionsConfigurationManagement1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsConfigurationManagement1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)GetSupportedDataModelsWithOutSupportedDataModels:(NSMutableString*)supporteddatamodels; 14 | -(NSInteger)GetSupportedParametersWithStartingNode:(NSString*)startingnode SearchDepth:(NSString*)searchdepth OutResult:(NSMutableString*)result; 15 | -(NSInteger)GetInstancesWithStartingNode:(NSString*)startingnode SearchDepth:(NSString*)searchdepth OutResult:(NSMutableString*)result; 16 | -(NSInteger)GetValuesWithParameters:(NSString*)parameters OutParameterValueList:(NSMutableString*)parametervaluelist; 17 | -(NSInteger)GetSelectedValuesWithStartingNode:(NSString*)startingnode Filter:(NSString*)filter OutParameterValueList:(NSMutableString*)parametervaluelist; 18 | -(NSInteger)SetValuesWithParameterValueList:(NSString*)parametervaluelist OutStatus:(NSMutableString*)status; 19 | -(NSInteger)CreateInstanceWithMultiInstanceName:(NSString*)multiinstancename ChildrenInitialization:(NSString*)childreninitialization OutInstanceIdentifier:(NSMutableString*)instanceidentifier OutStatus:(NSMutableString*)status; 20 | -(NSInteger)DeleteInstanceWithInstanceIdentifier:(NSString*)instanceidentifier OutStatus:(NSMutableString*)status; 21 | -(NSInteger)GetAttributesWithParameters:(NSString*)parameters OutNodeAttributeValueList:(NSMutableString*)nodeattributevaluelist; 22 | -(NSInteger)SetAttributesWithNodeAttributeValueList:(NSString*)nodeattributevaluelist OutStatus:(NSMutableString*)status; 23 | -(NSInteger)GetInconsistentStatusWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 24 | -(NSInteger)GetConfigurationUpdateWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 25 | -(NSInteger)GetCurrentConfigurationVersionWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 26 | -(NSInteger)GetSupportedDataModelsUpdateWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 27 | -(NSInteger)GetSupportedParametersUpdateWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 28 | -(NSInteger)GetAttributeValuesUpdateWithOutStateVariableValue:(NSMutableString*)statevariablevalue; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /src/api/SoapActionsDeviceProtection1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsDeviceProtection1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)SendSetupMessageWithProtocolType:(NSString*)protocoltype InMessage:(NSString*)inmessage OutOutMessage:(NSMutableString*)outmessage; 14 | -(NSInteger)GetSupportedProtocolsWithOutProtocolList:(NSMutableString*)protocollist; 15 | -(NSInteger)GetAssignedRolesWithOutRoleList:(NSMutableString*)rolelist; 16 | -(NSInteger)GetRolesForActionWithDeviceUDN:(NSString*)deviceudn ServiceId:(NSString*)serviceid ActionName:(NSString*)actionname OutRoleList:(NSMutableString*)rolelist OutRestrictedRoleList:(NSMutableString*)restrictedrolelist; 17 | -(NSInteger)GetUserLoginChallengeWithProtocolType:(NSString*)protocoltype Name:(NSString*)name OutSalt:(NSMutableString*)salt OutChallenge:(NSMutableString*)challenge; 18 | -(NSInteger)UserLoginWithProtocolType:(NSString*)protocoltype Challenge:(NSString*)challenge Authenticator:(NSString*)authenticator; 19 | @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger UserLogout; 20 | -(NSInteger)GetACLDataWithOutACL:(NSMutableString*)acl; 21 | -(NSInteger)AddIdentityListWithIdentityList:(NSString*)identitylist OutIdentityListResult:(NSMutableString*)identitylistresult; 22 | -(NSInteger)RemoveIdentityWithIdentity:(NSString*)identity; 23 | -(NSInteger)SetUserLoginPasswordWithProtocolType:(NSString*)protocoltype Name:(NSString*)name Stored:(NSString*)stored Salt:(NSString*)salt; 24 | -(NSInteger)AddRolesForIdentityWithIdentity:(NSString*)identity RoleList:(NSString*)rolelist; 25 | -(NSInteger)RemoveRolesForIdentityWithIdentity:(NSString*)identity RoleList:(NSString*)rolelist; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /src/api/SoapActionsInputConfig1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsInputConfig1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)GetInputCapabilityWithOutSupportedCapabilities:(NSMutableString*)supportedcapabilities; 14 | -(NSInteger)GetInputConnectionListWithOutCurrentConnectionList:(NSMutableString*)currentconnectionlist; 15 | -(NSInteger)SetInputSessionWithSelectedCapability:(NSString*)selectedcapability ReceiverInfo:(NSString*)receiverinfo PeerDeviceInfo:(NSString*)peerdeviceinfo ConnectionInfo:(NSString*)connectioninfo OutSessionID:(NSMutableString*)sessionid; 16 | -(NSInteger)StartInputSessionWithSessionID:(NSString*)sessionid; 17 | -(NSInteger)StopInputsessionWithSessionID:(NSString*)sessionid; 18 | -(NSInteger)SwitchInputSessionWithSessionID:(NSString*)sessionid; 19 | -(NSInteger)SetMultiInputModeWithNewMultiInputMode:(NSString*)newmultiinputmode; 20 | -(NSInteger)SetMonopolizedSenderWithOwnerDeviceInfo:(NSString*)ownerdeviceinfo OwnedSessionID:(NSString*)ownedsessionid; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /src/api/SoapActionsLayer3Forwarding1.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | 36 | #import 37 | #import "SoapAction.h" 38 | 39 | @interface SoapActionsLayer3Forwarding1 : SoapAction { 40 | } 41 | 42 | //SOAP 43 | 44 | -(NSInteger)SetDefaultConnectionServiceWithNewDefaultConnectionService:(NSString*)newdefaultconnectionservice; 45 | -(NSInteger)GetDefaultConnectionServiceWithOutNewDefaultConnectionService:(NSMutableString*)newdefaultconnectionservice; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /src/api/SoapActionsMediaManagement1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsMediaManagement1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)GetMediaCapabilitiesWithTSMediaCapabilityInfo:(NSString*)tsmediacapabilityinfo OutSupportedMediaCapabilityInfo:(NSMutableString*)supportedmediacapabilityinfo; 14 | -(NSInteger)GetMediaSessionInfoWithTargetMediaSessionID:(NSString*)targetmediasessionid OutMediaSessionInfoList:(NSMutableString*)mediasessioninfolist; 15 | -(NSInteger)ModifyMediaSessionWithTargetMediaSessionID:(NSString*)targetmediasessionid NewMediaCapabilityInfo:(NSString*)newmediacapabilityinfo OutTCMediaCapabilityInfo:(NSMutableString*)tcmediacapabilityinfo; 16 | -(NSInteger)StartMediaSessionWithTSMediaCapabilityInfo:(NSString*)tsmediacapabilityinfo OutMediaSessionID:(NSMutableString*)mediasessionid OutTCMediaCapabilityInfo:(NSMutableString*)tcmediacapabilityinfo; 17 | -(NSInteger)StopMediaSessionWithTargetMediaSessionID:(NSString*)targetmediasessionid; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /src/api/SoapActionsMessaging1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsMessaging1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)GetTelephonyIdentityWithOutTelephonyIdentity:(NSMutableString*)telephonyidentity; 14 | -(NSInteger)GetMessagingCapabilitiesWithOutSupportedCapabilities:(NSMutableString*)supportedcapabilities; 15 | -(NSInteger)GetNewMessagesWithOutNewMessages:(NSMutableString*)newmessages; 16 | -(NSInteger)SearchMessagesWithMessageClass:(NSString*)messageclass MessageFolder:(NSString*)messagefolder MessageStatus:(NSString*)messagestatus SessionID:(NSString*)sessionid OutMessageList:(NSMutableString*)messagelist; 17 | -(NSInteger)ReadMessageWithMessageID:(NSString*)messageid OutMessageRequested:(NSMutableString*)messagerequested; 18 | -(NSInteger)SendMessageWithMessageToSend:(NSString*)messagetosend OutMessageID:(NSMutableString*)messageid; 19 | -(NSInteger)DeleteMessageWithMessageID:(NSString*)messageid; 20 | -(NSInteger)CreateSessionWithSessionClass:(NSString*)sessionclass SessionRecipients:(NSString*)sessionrecipients Subject:(NSString*)subject SupportedContentType:(NSString*)supportedcontenttype OutSessionID:(NSMutableString*)sessionid; 21 | -(NSInteger)ModifySessionWithSessionID:(NSString*)sessionid SessionRecipientsToAdd:(NSString*)sessionrecipientstoadd SessionRecipientsToRemove:(NSString*)sessionrecipientstoremove Subject:(NSString*)subject SupportedContentType:(NSString*)supportedcontenttype SessionClass:(NSString*)sessionclass; 22 | -(NSInteger)AcceptSessionWithSessionID:(NSString*)sessionid; 23 | -(NSInteger)GetSessionUpdatesWithOutSessionUpdates:(NSMutableString*)sessionupdates; 24 | -(NSInteger)GetSessionsWithSessionID:(NSString*)sessionid SessionClass:(NSString*)sessionclass SessionStatus:(NSString*)sessionstatus OutSessionsList:(NSMutableString*)sessionslist; 25 | -(NSInteger)JoinSessionWithSessionID:(NSString*)sessionid; 26 | -(NSInteger)LeaveSessionWithSessionID:(NSString*)sessionid; 27 | -(NSInteger)CloseSessionWithSessionID:(NSString*)sessionid; 28 | -(NSInteger)StartFileTransferWithFileInfoList:(NSString*)fileinfolist; 29 | -(NSInteger)CancelFileTransferWithSessionID:(NSString*)sessionid; 30 | -(NSInteger)GetFileTransferSessionWithSessionID:(NSString*)sessionid OutFileInfoList:(NSMutableString*)fileinfolist; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /src/api/SoapActionsSwitchPower1.h: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // 3 | // MIT License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010, 2011 Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | // 26 | // ****************************************************************** 27 | 28 | #import 29 | #import "SoapAction.h" 30 | 31 | @interface SoapActionsSwitchPower1 : SoapAction { 32 | } 33 | 34 | //SOAP 35 | 36 | -(NSInteger)SetTargetWithnewTargetValue:(NSString*)newtargetvalue; 37 | -(NSInteger)GetTargetWithOutRetTargetValue:(NSMutableString*)rettargetvalue; 38 | -(NSInteger)GetStatusWithOutResultStatus:(NSMutableString*)resultstatus; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /src/api/SoapActionsWANCommonInterfaceConfig1.h: -------------------------------------------------------------------------------- 1 | //Auto Generated file. 2 | //This file is part of the upnox project. 3 | //Copyright 2010 - 2011 Bruno Keymolen, all rights reserved. 4 | 5 | #import 6 | #import "SoapAction.h" 7 | 8 | @interface SoapActionsWANCommonInterfaceConfig1 : SoapAction { 9 | } 10 | 11 | //SOAP 12 | 13 | -(NSInteger)SetEnabledForInternetWithNewEnabledForInternet:(NSString*)newenabledforinternet; 14 | -(NSInteger)GetEnabledForInternetWithOutNewEnabledForInternet:(NSMutableString*)newenabledforinternet; 15 | -(NSInteger)GetCommonLinkPropertiesWithOutNewWANAccessType:(NSMutableString*)newwanaccesstype OutNewLayer1UpstreamMaxBitRate:(NSMutableString*)newlayer1upstreammaxbitrate OutNewLayer1DownstreamMaxBitRate:(NSMutableString*)newlayer1downstreammaxbitrate OutNewPhysicalLinkStatus:(NSMutableString*)newphysicallinkstatus; 16 | -(NSInteger)GetWANAccessProviderWithOutNewWANAccessProvider:(NSMutableString*)newwanaccessprovider; 17 | -(NSInteger)GetMaximumActiveConnectionsWithOutNewMaximumActiveConnections:(NSMutableString*)newmaximumactiveconnections; 18 | -(NSInteger)GetTotalBytesSentWithOutNewTotalBytesSent:(NSMutableString*)newtotalbytessent; 19 | -(NSInteger)GetTotalBytesReceivedWithOutNewTotalBytesReceived:(NSMutableString*)newtotalbytesreceived; 20 | -(NSInteger)GetTotalPacketsSentWithOutNewTotalPacketsSent:(NSMutableString*)newtotalpacketssent; 21 | -(NSInteger)GetTotalPacketsReceivedWithOutNewTotalPacketsReceived:(NSMutableString*)newtotalpacketsreceived; 22 | -(NSInteger)GetActiveConnectionWithNewActiveConnectionIndex:(NSString*)newactiveconnectionindex OutNewActiveConnDeviceContainer:(NSMutableString*)newactiveconndevicecontainer OutNewActiveConnectionServiceID:(NSMutableString*)newactiveconnectionserviceid; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /src/api/SoapActionsWANEthernetLinkConfig1.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | 36 | #import 37 | #import "SoapAction.h" 38 | 39 | @interface SoapActionsWANEthernetLinkConfig1 : SoapAction { 40 | } 41 | 42 | //SOAP 43 | 44 | -(NSInteger)GetEthernetLinkStatusWithOutNewEthernetLinkStatus:(NSMutableString*)newethernetlinkstatus; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /src/api/StateVariableList.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "StateVariable.h" 37 | #import "StateVariable.h" 38 | 39 | 40 | @interface StateVariableList : StateVariable { 41 | NSMutableArray *list; 42 | } 43 | 44 | -(void)empty; 45 | 46 | -(void)copyFromStateVariableList:(StateVariableList*)stateVar; 47 | 48 | @property(readonly) NSMutableArray *list; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /src/api/StateVariableRange.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "StateVariable.h" 37 | 38 | @interface StateVariableRange : StateVariable { 39 | int min; 40 | int max; 41 | } 42 | 43 | -(void)empty; 44 | 45 | -(int)setMinWithString:(NSString*)val; 46 | -(int)setMaxWithString:(NSString*)val; 47 | 48 | -(void)copyFromStateVariableRange:(StateVariableRange*)stateVar; 49 | 50 | @property(readwrite) int min; 51 | @property(readwrite) int max; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /src/api/UPnPEventParser.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "BasicParser.h" 37 | #import "LastChangeParser.h" 38 | 39 | 40 | @interface UPnPEventParser : BasicParser { 41 | NSMutableDictionary *events; 42 | NSString *elementValue; 43 | LastChangeParser *lastChangeParser; 44 | } 45 | 46 | @property (readonly) NSMutableDictionary *events; 47 | @property (retain, nonatomic) NSString *elementValue; 48 | 49 | - (void)propertyName:(NSString *)startStop; 50 | - (void)lastChangeElement:(NSString *)startStop; 51 | - (void)reinit; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /src/api/UPnPManager.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | #import "SSDPDB_ObjC.h" 37 | #import "UPnPDB.h" 38 | #import "DeviceFactory.h" 39 | #import "MediaRenderer1Device.h" 40 | #import "UPnPEvents.h" 41 | #import "MediaPlaylist.h" 42 | 43 | 44 | @interface UPnPManager : NSObject 45 | 46 | + (UPnPManager *)GetInstance; 47 | 48 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 49 | 50 | @property (readonly) SSDPDB_ObjC *SSDP; 51 | @property (readonly) UPnPDB *DB; 52 | @property (retain, nonatomic) DeviceFactory* deviceFactory; 53 | @property (retain, nonatomic) MediaRenderer1Device *defaultMediaRenderer1; 54 | @property (readonly) UPnPEvents *upnpEvents; 55 | @property (readonly) MediaPlaylist *defaultPlaylist; 56 | 57 | - (void)clearAllDevices; 58 | 59 | - (void)restartSSDPSearchWithCompletionBlock:(void(^)())completionBlock; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /src/api/UPnPServiceConstants.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | 36 | //TODO: Frank Gregor started these constant includes due to get rid of all the 'magic strings' to prevent possible error sources. 37 | // This isn't a complete transition. I started with just the services I needed for my project. 38 | #import "UPnPServiceConstantsAVTransport1.h" 39 | #import "UPnPServiceConstantsRenderingControl1.h" 40 | #import "UPnPServiceConstantsConnectionManager1.h" 41 | #import "UPnPServiceConstantsContentDirectory1.h" 42 | -------------------------------------------------------------------------------- /src/api/UPnPServiceConstantsConnectionManager1.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | FOUNDATION_EXPORT NSString *const UPnPServiceURN_ConnectionManager1; 36 | -------------------------------------------------------------------------------- /src/api/UPnPServiceConstantsContentDirectory1.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | FOUNDATION_EXPORT NSString *const UPnPServiceURN_ContentDirectory1; 36 | -------------------------------------------------------------------------------- /src/api/UPnPServiceConstantsRenderingControl1.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | FOUNDATION_EXPORT NSString *const UPnPServiceURN_RenderingControl1; 36 | 37 | -------------------------------------------------------------------------------- /src/api/WAN2Device.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import 35 | #import "BasicUPnPDevice.h" 36 | 37 | #import "SoapActionsWANCommonInterfaceConfig1.h" 38 | 39 | 40 | /* 41 | * Services: 42 | * R - WANCommonInterfaceConfig:1 43 | */ 44 | 45 | @interface WAN2Device : BasicUPnPDevice { 46 | SoapActionsWANCommonInterfaceConfig1 *mCommonInterfaceConfig; 47 | } 48 | 49 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) SoapActionsWANCommonInterfaceConfig1 *commonInterfaceConfig; 50 | 51 | @property (NS_NONATOMIC_IOSONLY, readonly, strong) BasicUPnPService *commonInterfaceConfigService; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /src/common/tools.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _TOOLS_H_ 36 | #define _TOOLS_H_ 37 | 38 | #include "osal.h" 39 | 40 | #define UUID_LEN 36 41 | 42 | void hexdump(u8* buf, u32 len); 43 | int createUUID(char uuid[UUID_LEN]); 44 | u8* lefttrim(u8* buf, u32 len); 45 | u32 righttrim(u8* buf, u32 len); 46 | int caseinstringcmp(u8* string1, u32 len1, u8* string2, u32 len2); 47 | void trimspaces(u8** buf, u32* len); 48 | int getchar(u8* buf, u32 len, char c); 49 | int getchar(u8* buf, u32 len, char c, int seq); 50 | 51 | 52 | #endif //_TOOLS_H_ -------------------------------------------------------------------------------- /src/eventserver/basichttpobserver.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _BASICHTTPOBSERVER_H 36 | #define _BASICHTTPOBSERVER_H 37 | 38 | #include 39 | 40 | using namespace std; 41 | 42 | 43 | class BasicHTTPObserver{ 44 | public: 45 | //Methods to hook into the HTTP Server 46 | virtual bool CanProcessMethod(string *method) = 0; 47 | virtual bool Request(char *senderIP, unsigned short senderPort, string *method, string *path, string *version, map *headers, char *body, int bodylen) = 0; 48 | virtual bool Response(int *returncode, map *headers, char **body, unsigned long *bodylen) = 0; 49 | }; 50 | 51 | 52 | #endif //_BASICHTTPOBSERVER_H -------------------------------------------------------------------------------- /src/eventserver/socketServerobserver.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SOCKETSERVEROBSERVER_H 36 | #define _SOCKETSERVEROBSERVER_H 37 | 38 | #include 39 | #include 40 | 41 | class SocketServerObserver{ 42 | public: 43 | virtual int DataReceived(struct sockaddr_in *sender, size_t len, unsigned char *buf) = 0; 44 | virtual ssize_t DataToSend(ssize_t *len, unsigned char **buf) = 0; 45 | }; 46 | 47 | #endif //_SOCKETSERVEROBSERVER_H -------------------------------------------------------------------------------- /src/eventserver/socketserverconnection.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | 36 | #ifndef _SOCKETSERVERCONNECTION_H 37 | #define _SOCKETSERVERCONNECTION_H 38 | 39 | #include "osal.h" 40 | #include 41 | 42 | 43 | class SocketServerConnection{ 44 | public: 45 | SocketServerConnection(SOCKET socket, struct sockaddr_in *sender); 46 | ~SocketServerConnection(); 47 | 48 | SOCKET GetSocket(); 49 | ssize_t ReadDataFromSocket(struct sockaddr_in **sender); 50 | ssize_t SendDataOnSocket(unsigned char *sendbuf, size_t len); 51 | 52 | int ErrorOnSocket(); 53 | bool isActive; 54 | 55 | u8* GetBuffer(); 56 | 57 | struct sockaddr_in mSender; 58 | 59 | private: 60 | SOCKET mSocket; 61 | u8 *mBuffer; 62 | int mBufferSize; 63 | 64 | }; 65 | 66 | 67 | #endif //_SOCKETSERVERCONNECTION_H 68 | -------------------------------------------------------------------------------- /src/port/ios/iphoneport.h: -------------------------------------------------------------------------------- 1 | // ****************************************************************** 2 | // 3 | // This file is part of UPnPX. 4 | // 5 | // UPnPX is free software: you can redistribute it and/or modify 6 | // it under the terms of the GNU Lesser General Public License as 7 | // published by the Free Software Foundation, either version 3 of the 8 | // License, or (at your option) any later version. 9 | // 10 | // UPnPX is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY;without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with UPnPX. If not, see . 17 | // 18 | // Copyright (C)2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 19 | // 20 | // ****************************************************************** 21 | 22 | #ifndef _IPHONE_PORT 23 | #define _IPHONE_PORT 24 | 25 | #ifndef __cplusplus 26 | #import 27 | #endif 28 | 29 | #define UPNPX_PREFFERED_IFACE "en" 30 | #define UPNPX_IPHONE 31 | 32 | 33 | #endif -------------------------------------------------------------------------------- /src/port/macos/UIImage.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import 36 | 37 | @class UIImage; 38 | 39 | @interface UIImage : NSImage { 40 | } 41 | 42 | 43 | +(UIImage*)imageWithData:(NSData *)data; 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /src/port/macos/UIImage.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "UIImage.h" 36 | 37 | 38 | @implementation UIImage 39 | 40 | 41 | +(UIImage*)imageWithData:(NSData *)data{ 42 | UIImage *ret = [[[UIImage alloc] initWithData:data] autorelease]; 43 | return ret; 44 | } 45 | 46 | 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /src/port/macos/iphoneport.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _IPHONE_PORT 36 | #define _IPHONE_PORT 37 | 38 | #ifndef __cplusplus 39 | #import "UIImage.h" 40 | #endif 41 | 42 | #endif -------------------------------------------------------------------------------- /src/ssdp/ssdpdbdevice.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #include "ssdpdbdevice.h" 35 | 36 | SSDPDBDevice::SSDPDBDevice(){ 37 | isroot=0; 38 | isservice=0; 39 | isdevice=0; 40 | uuid = ""; 41 | urn=""; 42 | type=""; 43 | version=""; 44 | host=""; 45 | usn=""; 46 | lastupdate=0; 47 | cachecontrol=0; 48 | ip=0; 49 | port=0; 50 | memset(&parsedusn, 0, sizeof(ssdpuuid)); 51 | } 52 | 53 | 54 | SSDPDBDevice::~SSDPDBDevice(){ 55 | } -------------------------------------------------------------------------------- /src/ssdp/ssdpdbdevice.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPDBDEVICE_H 36 | #define _SSDPDBDEVICE_H 37 | 38 | #include "ssdptools.h" 39 | #include 40 | #include 41 | 42 | using namespace std; 43 | 44 | class SSDPDBDevice{ 45 | public: 46 | SSDPDBDevice(); 47 | ~SSDPDBDevice(); 48 | u8 isdevice; 49 | u8 isroot; 50 | u8 isservice; 51 | string uuid; 52 | string urn; 53 | string usn; 54 | ssdpuuid parsedusn; 55 | string type; 56 | string version; 57 | string host; 58 | string location; 59 | 60 | u32 ip; 61 | u16 port; 62 | 63 | u32 cachecontrol; 64 | time_t lastupdate; 65 | 66 | 67 | private: 68 | SSDPDBDevice(const SSDPDBDevice &src); 69 | SSDPDBDevice& operator= (const SSDPDBDevice &src); 70 | }; 71 | 72 | 73 | #endif //_SSDPDBDEVICE_H 74 | -------------------------------------------------------------------------------- /src/ssdp/ssdpdbobserver.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPDBOBSERVER_H 36 | #define _SSDPDBOBSERVER_H 37 | 38 | #include "osal.h" 39 | 40 | 41 | enum SSDPDBMessageType{ 42 | SSDPDBMsg_DeviceUpdate = 1, 43 | SSDPDBMsg_ServiceUpdate 44 | }; 45 | 46 | 47 | typedef struct SSDPDBMsg{ 48 | SSDPDBMessageType type; 49 | }SSDPDBMsg; 50 | 51 | 52 | class SSDPDBObserver{ 53 | public: 54 | virtual int SSDPDBMessage(SSDPDBMsg* msg) = 0; 55 | }; 56 | 57 | 58 | 59 | #endif //_SSDPOBSERVER_H 60 | -------------------------------------------------------------------------------- /src/ssdp/ssdphttp.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #include "ssdphttp.h" 36 | 37 | SSDP_TYPE SSDPHTTP::GetType(){ 38 | return SSDP_TYPE_HTTP; 39 | } 40 | -------------------------------------------------------------------------------- /src/ssdp/ssdphttp.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPHTTP_H 36 | #define _SSDPHTTP_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpmessage.h" 40 | 41 | class SSDPHTTP: public SSDPMessage{ 42 | //What type of message can we handle 43 | SSDP_TYPE GetType(); 44 | //Process the message 45 | virtual int Process(struct sockaddr* sender, std::vector msgheaders)=0; 46 | //ReInit 47 | void ReInit()=0; 48 | }; 49 | 50 | #endif //_SSDPHTTP_H 51 | -------------------------------------------------------------------------------- /src/ssdp/ssdpmsearch.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #include "ssdpmsearch.h" 35 | 36 | 37 | SSDP_TYPE SSDPMSearch::GetType(){ 38 | return SSDP_TYPE_MSEARCH; 39 | } 40 | -------------------------------------------------------------------------------- /src/ssdp/ssdpmsearch.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPMSEARCH_H 36 | #define _SSDPMSEARCH_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpmessage.h" 40 | 41 | class SSDPMSearch: public SSDPMessage{ 42 | //What type of message can we handle 43 | SSDP_TYPE GetType(); 44 | //Process the message 45 | virtual int Process(struct sockaddr* sender, std::vector msgheaders)=0; 46 | //ReInit 47 | void ReInit()=0; 48 | 49 | }; 50 | 51 | #endif //_SSDPMSEARCH_H 52 | -------------------------------------------------------------------------------- /src/ssdp/ssdpnotify.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #include "ssdpnotify.h" 35 | 36 | 37 | SSDP_TYPE SSDPNotify::GetType(){ 38 | return SSDP_TYPE_NOTIFY; 39 | } 40 | -------------------------------------------------------------------------------- /src/ssdp/ssdpnotify.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPNOTIFY_H 36 | #define _SSDPNOTIFY_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpmessage.h" 40 | 41 | class SSDPNotify: public SSDPMessage{ 42 | //What type of message can we handle 43 | SSDP_TYPE GetType(); 44 | //Process the message 45 | virtual int Process(struct sockaddr* sender, std::vector msgheaders)=0; 46 | //ReInit 47 | void ReInit()=0; 48 | }; 49 | 50 | #endif //_SSDPNOTIFY_H 51 | -------------------------------------------------------------------------------- /src/ssdp/ssdpnotifyalive.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPNOTIFYALIVE_H 36 | #define _SSDPNOTIFYALIVE_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpnotify.h" 40 | 41 | class SSDPNotifyAlive: public SSDPNotify{ 42 | public: 43 | SSDPNotifyAlive(); 44 | //Process the message 45 | int Process(struct sockaddr* sender, std::vector msgheaders); 46 | //ReInit 47 | void ReInit(); 48 | }; 49 | 50 | #endif //_SSDPNOTIFYALIVE_H 51 | -------------------------------------------------------------------------------- /src/ssdp/ssdpnotifybye.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPNOTIFYBYE_H 36 | #define _SSDPNOTIFYBYE_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpnotify.h" 40 | 41 | class SSDPNotifyBye: public SSDPNotify{ 42 | public: 43 | SSDPNotifyBye(); 44 | //Process the message 45 | int Process(struct sockaddr* sender, std::vector msgheaders); 46 | //ReInit 47 | void ReInit(); 48 | }; 49 | 50 | #endif //_SSDPNOTIFYBYE_H 51 | -------------------------------------------------------------------------------- /src/ssdp/ssdpnotifyupdate.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #include "ssdpnotifyupdate.h" 36 | 37 | SSDPNotifyUpdate::SSDPNotifyUpdate(){ 38 | AddSignatureHeader((char*)"HOST", (char*)""); 39 | AddSignatureHeader((char*)"LOCATION", (char*)""); 40 | AddSignatureHeader((char*)"NT", (char*)""); 41 | AddSignatureHeader((char*)"NTS", (char*)"ssdp:update"); 42 | AddSignatureHeader((char*)"USN", (char*)""); 43 | /* 44 | AddSignatureHeader("BOOTID.UPNP.ORG", ""); 45 | AddSignatureHeader("CONFIGID.UPNP.ORG", ""); 46 | AddSignatureHeader("NEXTBOOTID.UPNP.ORG", ""); 47 | */ 48 | } 49 | 50 | void SSDPNotifyUpdate::ReInit(){ 51 | } 52 | 53 | int SSDPNotifyUpdate::Process(struct sockaddr* sender, std::vector msgheaders){ 54 | //The only reason seem to be to update the "BOOTID.UPNP.ORG" field which my devices don't send anyway 55 | return 0; 56 | } -------------------------------------------------------------------------------- /src/ssdp/ssdpnotifyupdate.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #ifndef _SSDPNOTIFYUPDATE_H 35 | #define _SSDPNOTIFYUPDATE_H 36 | 37 | #include "ssdptools.h" 38 | #include "ssdpnotify.h" 39 | 40 | class SSDPNotifyUpdate: public SSDPNotify{ 41 | public: 42 | SSDPNotifyUpdate(); 43 | //Process the message 44 | int Process(struct sockaddr* sender, std::vector msgheaders); 45 | //ReInit 46 | void ReInit(); 47 | }; 48 | 49 | #endif //_SSDPNOTIFYUPDATE_H 50 | -------------------------------------------------------------------------------- /src/ssdp/ssdpobserver.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPOBSERVER_H 36 | #define _SSDPOBSERVER_H 37 | 38 | #include "osal.h" 39 | #include "ssdpparser.h" 40 | 41 | 42 | class SSDPObserver{ 43 | public: 44 | virtual int SSDPMessage(SSDPParser *parsedmsg) = 0; 45 | }; 46 | 47 | 48 | 49 | #endif //_SSDPOBSERVER_H -------------------------------------------------------------------------------- /src/ssdp/ssdpparser.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPPARSER_H_ 36 | #define _SSDPPARSER_H_ 37 | 38 | #include "osal.h" 39 | #include 40 | #include "ssdptools.h" 41 | #include "ssdpmessage.h" 42 | #include "ssdpdb.h" 43 | 44 | using namespace std; 45 | 46 | class SSDPParser{ 47 | public: 48 | SSDPParser(SSDPDB* db); 49 | ~SSDPParser(); 50 | int ReInit(); 51 | int Parse(struct sockaddr* sender, u8* buf, u32 len); 52 | SSDP_TYPE GetType(); 53 | private: 54 | int ReadLine(u8 *buf, u32 len, u8 **restbuf, u32 *restlen); 55 | SSDP_TYPE mType; 56 | vector mHeaders; 57 | vector mMessages; 58 | SSDPDB* mDB; 59 | private: 60 | SSDPParser(const SSDPParser &src); 61 | SSDPParser& operator= (const SSDPParser &src); 62 | }; 63 | 64 | #endif //_SSDPPARSER_H_ -------------------------------------------------------------------------------- /src/ssdp/ssdpsearchreq.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #include "ssdpsearchreq.h" 36 | 37 | SSDPSearchReq::SSDPSearchReq(){ 38 | AddSignatureHeader((char*)"HOST", (char*)""); 39 | AddSignatureHeader((char*)"MAN", (char*)"ssdp:discover"); 40 | AddSignatureHeader((char*)"ST", (char*)""); 41 | } 42 | 43 | void SSDPSearchReq::ReInit(){ 44 | } 45 | 46 | int SSDPSearchReq::Process(struct sockaddr* sender, std::vector msgheaders){ 47 | //At the moment we don't advertise ourselves 48 | return 0; 49 | } -------------------------------------------------------------------------------- /src/ssdp/ssdpsearchreq.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPSEARCHREQ_H 36 | #define _SSDPSEARCHREQ_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdpmsearch.h" 40 | 41 | class SSDPSearchReq: public SSDPMSearch{ 42 | public: 43 | SSDPSearchReq(); 44 | //Process the message 45 | int Process(struct sockaddr* sender, std::vector msgheaders); 46 | //ReInit 47 | void ReInit(); 48 | }; 49 | 50 | #endif //_SSDPSEARCHREQ_H 51 | -------------------------------------------------------------------------------- /src/ssdp/ssdpsearchresp.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #ifndef _SSDPSEARCHRESP_H 36 | #define _SSDPSEARCHRESP_H 37 | 38 | #include "ssdptools.h" 39 | #include "ssdphttp.h" 40 | 41 | class SSDPSearchResp: public SSDPHTTP{ 42 | public: 43 | SSDPSearchResp(); 44 | //Process the message 45 | int Process(struct sockaddr* sender, std::vector msgheaders); 46 | //ReInit 47 | void ReInit(); 48 | }; 49 | 50 | #endif //_SSDPSEARCHRESP_H 51 | -------------------------------------------------------------------------------- /src/ssdp/upnp.cpp: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #include "upnp.h" 36 | 37 | UPNP* UPNP::_mInstance = 0; 38 | 39 | UPNP* UPNP::GetInstance(){ 40 | if(_mInstance == 0){ 41 | _mInstance = new UPNP(); 42 | } 43 | return _mInstance; 44 | } 45 | 46 | 47 | UPNP::UPNP(){ 48 | mSSDP = new SSDP(); 49 | } 50 | 51 | 52 | SSDP* UPNP::GetSSDP(){ 53 | return mSSDP; 54 | } -------------------------------------------------------------------------------- /src/ssdp/upnp.h: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #ifndef _UPNP_H_ 35 | #define _UPNP_H_ 36 | 37 | #include "ssdp.h" 38 | 39 | class UPNP{ 40 | public: 41 | static UPNP* GetInstance(); 42 | private: 43 | static UPNP* _mInstance; 44 | public: 45 | SSDP* GetSSDP(); 46 | private: 47 | UPNP(); 48 | ~UPNP(); 49 | UPNP(const UPNP &orig); 50 | UPNP& operator= (const UPNP &orig); 51 | SSDP* mSSDP; 52 | }; 53 | 54 | 55 | #endif //_UPNP_H_ 56 | -------------------------------------------------------------------------------- /src/upnp/BinaryLight1Device.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "BinaryLight1Device.h" 36 | 37 | 38 | @implementation BinaryLight1Device 39 | 40 | -(void)dealloc{ 41 | 42 | [mSwitchPower release]; 43 | 44 | [super dealloc]; 45 | } 46 | 47 | -(BasicUPnPService*)switchPowerService{ 48 | return [self getServiceForType:@"urn:schemas-upnp-org:service:SwitchPower:1"]; 49 | } 50 | 51 | 52 | -(SoapActionsSwitchPower1*)switchPower{ 53 | if(mSwitchPower == nil){ 54 | mSwitchPower = (SoapActionsSwitchPower1*)[[self getServiceForType:@"urn:schemas-upnp-org:service:SwitchPower:1"] soap]; 55 | [mSwitchPower retain]; 56 | } 57 | 58 | return mSwitchPower; 59 | } 60 | 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /src/upnp/InternetGateway2Device.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "InternetGateway2Device.h" 36 | 37 | 38 | @implementation InternetGateway2Device 39 | 40 | -(void)dealloc{ 41 | 42 | [mLayer3Forwarding release]; 43 | 44 | [super dealloc]; 45 | } 46 | 47 | -(SoapActionsLayer3Forwarding1*)layer3Forwarding{ 48 | if(mLayer3Forwarding == nil){ 49 | mLayer3Forwarding = (SoapActionsLayer3Forwarding1*)[[self getServiceForType:@"urn:schemas-upnp-org:service:Layer3Forwarding:1"] soap]; 50 | [mLayer3Forwarding retain]; 51 | } 52 | return mLayer3Forwarding; 53 | } 54 | 55 | 56 | -(BasicUPnPService*)layer3ForwardingService{ 57 | return [self getServiceForType:@"urn:schemas-upnp-org:service:Layer3Forwarding:1"]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /src/upnp/LAN1Device.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "LAN1Device.h" 36 | 37 | 38 | @implementation LAN1Device 39 | 40 | -(void)dealloc{ 41 | 42 | [mLanHostConfigManagement release]; 43 | 44 | [super dealloc]; 45 | } 46 | 47 | -(SoapActionsLANHostConfigManagement1*)lanHostConfigManagement{ 48 | if(mLanHostConfigManagement == nil){ 49 | mLanHostConfigManagement = (SoapActionsLANHostConfigManagement1*)[[self getServiceForType:@"urn:schemas-upnp-org:service:LANHostConfigManagement:1"] soap]; 50 | [mLanHostConfigManagement retain]; 51 | } 52 | return mLanHostConfigManagement; 53 | } 54 | 55 | 56 | -(BasicUPnPService*)lanHostConfigManagementService{ 57 | return [self getServiceForType:@"urn:schemas-upnp-org:service:LANHostConfigManagement:1"]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /src/upnp/MediaServer1BasicObject.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "MediaServer1BasicObject.h" 36 | 37 | 38 | @implementation MediaServer1BasicObject 39 | 40 | @synthesize objectID; 41 | @synthesize parentID; 42 | @synthesize title; 43 | @synthesize isContainer; 44 | @synthesize objectClass; 45 | @synthesize albumArt; 46 | @synthesize artist; 47 | 48 | -(void)dealloc{ 49 | [objectID release]; 50 | [parentID release]; 51 | [title release]; 52 | [objectClass release]; 53 | [albumArt release]; 54 | [artist release]; 55 | 56 | [super dealloc]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /src/upnp/MediaServer1ContainerObject.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "MediaServer1ContainerObject.h" 36 | 37 | 38 | @implementation MediaServer1ContainerObject 39 | 40 | @synthesize childCount; 41 | 42 | -(void)dealloc{ 43 | [childCount release]; 44 | [super dealloc]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /src/upnp/StateVariableList.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | #import "StateVariableList.h" 35 | 36 | 37 | @implementation StateVariableList 38 | 39 | @synthesize list; 40 | 41 | -(instancetype)init{ 42 | self = [super init]; 43 | 44 | if (self) { 45 | variableType = StateVariable_Type_List; 46 | list = [[NSMutableArray alloc] init]; 47 | [self empty]; 48 | } 49 | 50 | return self; 51 | } 52 | 53 | -(void)dealloc{ 54 | [list release]; 55 | [super dealloc]; 56 | } 57 | 58 | -(void)empty{ 59 | [super empty]; 60 | [list removeAllObjects]; 61 | } 62 | 63 | -(void)copyFromStateVariableList:(StateVariableList*)stateVar{ 64 | [super copyFromStateVariable:(StateVariable*)stateVar]; 65 | [list release]; 66 | list = [[NSMutableArray alloc] initWithArray:[stateVar list]]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /src/upnp/UPnPServiceConstantsConnectionManager1.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | NSString *const UPnPServiceURN_ConnectionManager1 = @"urn:schemas-upnp-org:service:ConnectionManager:1"; 36 | -------------------------------------------------------------------------------- /src/upnp/UPnPServiceConstantsContentDirectory1.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | NSString *const UPnPServiceURN_ContentDirectory1 = @"urn:schemas-upnp-org:service:ContentDirectory:1"; 36 | -------------------------------------------------------------------------------- /src/upnp/UPnPServiceConstantsRenderingControl1.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2016, Frank Gregor, email: phranck@cocoanaut.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | NSString *const UPnPServiceURN_RenderingControl1 = @"urn:schemas-upnp-org:service:RenderingControl:1"; 36 | 37 | -------------------------------------------------------------------------------- /src/upnp/WAN2Device.m: -------------------------------------------------------------------------------- 1 | // ********************************************************************************** 2 | // 3 | // BSD License. 4 | // This file is part of upnpx. 5 | // 6 | // Copyright (c) 2010-2011, Bruno Keymolen, email: bruno.keymolen@gmail.com 7 | // All rights reserved. 8 | // 9 | // Redistribution and use in source and binary forms, with or without modification, 10 | // are permitted provided that the following conditions are met: 11 | // 12 | // Redistributions of source code must retain the above copyright notice, 13 | // this list of conditions and the following disclaimer. 14 | // Redistributions in binary form must reproduce the above copyright notice, this 15 | // list of conditions and the following disclaimer in the documentation and/or other 16 | // materials provided with the distribution. 17 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 18 | // used to endorse or promote products derived from this software without specific 19 | // prior written permission. 20 | // 21 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR 27 | // PROFITS;OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | // POSSIBILITY OF SUCH DAMAGE. 31 | // 32 | // ********************************************************************************** 33 | 34 | 35 | #import "WAN2Device.h" 36 | 37 | 38 | @implementation WAN2Device 39 | 40 | -(void)dealloc{ 41 | 42 | [mCommonInterfaceConfig release]; 43 | 44 | [super dealloc]; 45 | } 46 | 47 | -(SoapActionsWANCommonInterfaceConfig1*)commonInterfaceConfig{ 48 | if(mCommonInterfaceConfig == nil){ 49 | mCommonInterfaceConfig = (SoapActionsWANCommonInterfaceConfig1*)[[self getServiceForType:@"urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"] soap]; 50 | [mCommonInterfaceConfig retain]; 51 | } 52 | return mCommonInterfaceConfig; 53 | } 54 | 55 | -(BasicUPnPService*)commonInterfaceConfigService{ 56 | return [self getServiceForType:@"urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1"]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /tutorial/license.md: -------------------------------------------------------------------------------- 1 | {{{ 2 | // ********************************************************************************** 3 | // 4 | // BSD License. 5 | // This file is part of upnpx. 6 | // 7 | // Copyright (c) 2010-2013, Bruno Keymolen, email: bruno.keymolen@gmail.com 8 | // 9 | // 2013-2013 code parts by Jonathan Guan, Mujtaba Hassanpur 10 | // 11 | // All rights reserved. 12 | // 13 | // questions; email: bruno.keymolen@gmail.com 14 | // 15 | // Redistribution and use in source and binary forms, with or without modification, 16 | // are permitted provided that the following conditions are met: 17 | // 18 | // Redistributions of source code must retain the above copyright notice, 19 | // this list of conditions and the following disclaimer. 20 | // Redistributions in binary form must reproduce the above copyright notice, this 21 | // list of conditions and the following disclaimer in the documentation and/or other 22 | // materials provided with the distribution. 23 | // Neither the name of "Bruno Keymolen" nor the names of its contributors may be 24 | // used to endorse or promote products derived from this software without specific 25 | // prior written permission. 26 | // 27 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 28 | // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 30 | // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 31 | // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 32 | // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 | // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 34 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 | // POSSIBILITY OF SUCH DAMAGE. 37 | // 38 | // ********************************************************************************** 39 | }}} -------------------------------------------------------------------------------- /tutorial/pages/addressing.md: -------------------------------------------------------------------------------- 1 | [Home](../) → [Discovery](discovery.md) 2 | 3 | # upnpx Tutorial 4 | ## 1. Addressing 5 | 6 | > UPnP specifications: _"Through addressing, devices and control points get a network address"_. 7 | 8 | Basically this means that your device has to get an IP address. Since the OS handles this task we are lucky and don't have to do much. Just be sure you actually are connected to the network and have an IP address before using **upnpx**. 9 | 10 | [Home](../) → [Discovery](discovery.md) 11 | -------------------------------------------------------------------------------- /tutorial/pages/build-upnpx.md: -------------------------------------------------------------------------------- 1 | [Home](../) 2 | 3 | # upnpx Tutorial 4 | ## Building static libupnpx.a library 5 | 6 | Before using the library you have to build the **upnpx** static library `libupnpx.a`. 7 | 8 | 9 | 1. Open the desired project with Xcode. We use the one from the [upnpx for Xcode 7](../../projects/xcode7/upnpx/upnpx.xcodeproj) project. 10 | ![Locate the project](images/locate_project.png) 11 | 12 | 2. Select the required scheme (target). There are several schemes (for OSX, iOS and tvOS) available. You can build either static libraries or frameworks depending on your needs. 13 | 14 | ![Select your scheme](images/scheme.png) 15 | 16 | 3. Build it. The result is the **upnpx** static library or framework for the platform you selected (the location of the build product depends on the chosen project and scheme). 17 | ![Build Result](images/build_result.png) 18 | 19 | 20 | [Home](../) 21 | -------------------------------------------------------------------------------- /tutorial/pages/compatibility.md: -------------------------------------------------------------------------------- 1 | [Home](../) 2 | 3 | # upnpx Tutorial 4 | ## Compatibility 5 | 6 | **upnpx** is confirmed working, by users, with the following: 7 | 8 | * [LiveBox 2](http://ayuda.orange.es/internet/configuracion-y-descargas/routers-y-modems/livebox-2-0.html) 9 | * [PS AUDIO PWD DAC with Bridge UPnP](http://www.psaudio.com/products/directstream-dac/) 10 | * [Mediatomb](http://mediatomb.cc) 11 | * [ushare](http://ushare.geexbox.org) 12 | * [iMediaShare for iPhone](http://www.imediashare.tv) 13 | * [asset on Windows 7](http://www.dbpoweramp.com/asset-upnp-dlna.htm) 14 | * [minidlna on Ubuntu Linux](http://sourceforge.net/projects/minidlna/) 15 | * [EyeConnect](https://www.elgato.com/en/support-eyeconnect-update) 16 | * [Twonky](http://www.twonkey.com) 17 | * [Windows Media Sharing (Tested with Windows 7)](http://windows.microsoft.com/en-US/windows-vista/Share-your-media-in-Windows-Media-Player-with-other-people-or-devices) 18 | * [LaCie 2big Network 2](http://www.lacie.com) 19 | * [Grace Wireless Internet Radio](https://gracedigital.com/category/internet-radio/) 20 | * [FreeCom Internet Radio](http://www.freecom.com) 21 | 22 | **upnpx** is expected to work together with any UPnP ready device. 23 | If you have tested it and confirmed working with anything not listed here, please let me know so I can add it to the list: bruno.keymolen@gmail.com or phranck@cocoanaut.com. 24 | 25 | [Home](../) 26 | -------------------------------------------------------------------------------- /tutorial/pages/eventing.md: -------------------------------------------------------------------------------- 1 | [Control](control.md) ← [Home](../) → [Presentation](presentation.md) 2 | 3 | # upnpx Tutorial 4 | ## 5. Eventing 5 | 6 | > UPnP specifications: _"Through eventing, control points listen to state changes in device(s)."_ 7 | 8 | 9 | ### 1. Implement the Interface BasicUPnPServiceObserver 10 | 11 | The `BasicUPnPServiceObserver` protocol is declared in [BasicUPnPService.h](../../src/api/BasicUPnPService.h#L43-L45). 12 | ```Objective-C 13 | @protocol BasicUPnPServiceObserver 14 | - (void)UPnPEvent:(BasicUPnPService*)sender events:(NSDictionary*)events; 15 | @end 16 | ``` 17 | 18 | 19 | ### 2. Register your Class as an Observer (be sure to do this only once) 20 | 21 | The code snippet has been extracted from [`PlayBack.m`](../../projects/xcode7/upnpxdemo/upnpxdemo/PlayBack.m#L54-L58) of the [Xcode 7 example](../../projects/xcode7/upnpxdemo). 22 | ```Objective-C 23 | if(renderer!=nil){ 24 | if([[renderer avTransportService] isObserver:(BasicUPnPServiceObserver*)self] == NO){ 25 | [[renderer avTransportService] addObserver:(BasicUPnPServiceObserver*)self]; 26 | } 27 | } 28 | ``` 29 | 30 | 31 | ### 3. Receive the events 32 | 33 | The code snippet has been extracted from [`PlayBack.m`](../../projects/xcode7/upnpxdemo/upnpxdemo/PlayBack.m#L115-L125) of the [Xcode 7 example](../../projects/xcode7/upnpxdemo). 34 | For detailed informations about _"AVTransport:1"_ service specifications please take a look at the [AVTransport:1 Service Template]([http://upnp.org/specs/av/UPnP-av-AVTransport-v1-Service.pdf] 35 | ). 36 | 37 | ```Objective-C 38 | //BasicUPnPServiceObserver 39 | - (void)UPnPEvent:(BasicUPnPService*)sender events:(NSDictionary*)events { 40 | if(sender == [renderer avTransportService]){ 41 | NSString *newState = events[@"TransportState"]; 42 | 43 | if([newState isEqualToString:@"STOPPED"]){ 44 | //Do your stuff, play next song etc... 45 | NSLog(@"Event: 'STOPPED', Play next track of playlist."); 46 | [self Play:pos+1]; //Next 47 | } 48 | } 49 | } 50 | ``` 51 | 52 | [Control](control.md) ← [Home](../) → [Presentation](presentation.md) 53 | -------------------------------------------------------------------------------- /tutorial/pages/images/build_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/build_result.png -------------------------------------------------------------------------------- /tutorial/pages/images/demo_screen_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/demo_screen_1.png -------------------------------------------------------------------------------- /tutorial/pages/images/demo_screen_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/demo_screen_2.png -------------------------------------------------------------------------------- /tutorial/pages/images/demo_screen_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/demo_screen_3.png -------------------------------------------------------------------------------- /tutorial/pages/images/demo_screen_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/demo_screen_4.png -------------------------------------------------------------------------------- /tutorial/pages/images/draglibupnpx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/draglibupnpx.png -------------------------------------------------------------------------------- /tutorial/pages/images/includepaths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/includepaths.png -------------------------------------------------------------------------------- /tutorial/pages/images/linkstdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/linkstdc.png -------------------------------------------------------------------------------- /tutorial/pages/images/locate_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/locate_project.png -------------------------------------------------------------------------------- /tutorial/pages/images/navapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/navapp.png -------------------------------------------------------------------------------- /tutorial/pages/images/scheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/scheme.png -------------------------------------------------------------------------------- /tutorial/pages/images/ssdpscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/ssdpscreen.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/add_demoproject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/add_demoproject.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/add_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/add_files.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/add_libupnpx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/add_libupnpx.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/add_upnpx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/add_upnpx.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/navbased.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/navbased.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/newproject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/newproject.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/save_workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/save_workspace.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/set_scheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/set_scheme.png -------------------------------------------------------------------------------- /tutorial/pages/images/xcode4/workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fkuehne/upnpx/3f8a09e7de93cf3d941525d59dfa77b0320d6e36/tutorial/pages/images/xcode4/workspace.png -------------------------------------------------------------------------------- /tutorial/pages/presentation.md: -------------------------------------------------------------------------------- 1 | [Eventing](eventing.md) ← [Home](../) 2 | 3 | # upnpx Tutorial 4 | ## 6. Presentation 5 | 6 | > UPnP specifications: _"If a device has a URL for presentation, then the control point can retrieve a page from this URL, load the page into a browser and, depending on the capabilities of the page, allow a user to control the device and/or view device status. The degree to which each of these can be accomplished depends on the specific capabilities of the presentation page and device."_ 7 | 8 | [Eventing](eventing.md) ← [Home](../) 9 | -------------------------------------------------------------------------------- /tutorial/readme.md: -------------------------------------------------------------------------------- 1 | # upnpx Tutorial 2 | 3 | ## Preamble 4 | 5 | This tutorial isn't the original of the **upnpx** project, it is an complete rewrite/reformat by Frank Gregor (), because the [original upnpx Wiki](https://code.google.com/p/upnpx/wiki/tutorial) on Google Code has been archived by someone and is broken/unsusable right now. If you are using **upnpx** and want to contribute to this documentation feel free to contact me. 6 | 7 | ## Tutorial Overview 8 | 9 | Good UPnP documentation is available at the [project website](http://upnp.org). 10 | 11 | The complete architecture is described in detail in the [UPNP Device Architecture Document](http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0.pdf). 12 | A UPnP session exist of several steps: 13 | 1. [Addressing](pages/addressing.md) 14 | _"Through addressing, devices and control points get a network address"_ 15 | 2. [Discovery](pages/discovery.md) 16 | _"Through discovery, control points find interesting device(s)"_ 17 | 3. [Description](pages/description.md) 18 | _"...the control point MUST retrieve a description of the device..."_ 19 | 4. [Control](pages/control.md) 20 | _"Through control, control points invoke actions on devices and poll for values."_ 21 | 5. [Eventing](pages/eventing.md) 22 | _"Through eventing, control points listen to state changes in device(s)."_ 23 | 6. [Presentation](pages/presentation.md) 24 | 25 | **upnpx** is an implementation of the [UPnP Specifications](http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v2.0.pdf) and has API functions for the different steps. This tutorial give simple examples how to use the **upnpx** API in order to build your own UPnP Control Point. 26 | 27 | This tutorial handles the 6 individual steps and starts at [Addressing](pages/addressing.md). 28 | 29 | ## New UPnP devices 30 | 31 | Sometimes you may need to add a new UPnP ready device to let **upnpx** give support for. See the tutorial for how to [add a new device](pages/new-device.md) to the **upnpx** stack. 32 | 33 | ## Compatibility 34 | 35 | **upnpx** has been proofed in a number of projects. Please take a look at the [compatibility page](pages/compatibility.md). 36 | 37 | ## Building static libupnpx.a library 38 | 39 | Before using the library you have to build the **upnpx** static library `libupnpx.a`. Jump to the [build upnpx](pages/build-upnpx.md) page to get an insight. 40 | 41 | -------------------------------------------------------------------------------- /upnpx.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'upnpx' 3 | s.version = '1.4.3' 4 | s.license = 'BSD' 5 | s.ios.deployment_target = "6.1" 6 | s.osx.deployment_target = "10.8" 7 | s.tvos.deployment_target = '9.0' 8 | s.summary = 'Open Source Mac OS X / iOS Cocoa UPnP Stack.' 9 | s.homepage = 'https://github.com/fkuehne/upnpx' 10 | s.authors = { 'Felix Paul Kühne' => 'fkuehne@videolan.org', 'Bruno Keymolen' => 'bruno.keymolen@gmail.com', 'Paul Williamson' => 'squarefrog@gmail.com' } 11 | s.source = { :git => 'https://github.com/fkuehne/upnpx.git', :tag => s.version.to_s } 12 | 13 | s.description = 'Static OS X & iOS UPnP library written in Cocoa (UPnP) and C++ (SSDP).' \ 14 | 'The Current implementation has support for control point/client only.' 15 | 16 | s.ios.source_files = 'src/{api,common,eventserver,ssdp,upnp}/*.{h,m,mm,c,cpp}', 'src/port/ios/*.{h,m}' 17 | s.tvos.source_files = 'src/{api,common,eventserver,ssdp,upnp}/*.{h,m,mm,c,cpp}', 'src/port/ios/*.{h,m}' 18 | s.osx.source_files = 'src/{api,common,eventserver,ssdp,upnp}/*.{h,m,mm,c,cpp}', 'src/port/macos/*.{h,m}' 19 | s.ios.public_header_files = 'src/api/*.h', 'src/port/ios/*.h' 20 | s.tvos.public_header_files = 'src/api/*.h', 'src/port/ios/*.h' 21 | s.osx.public_header_files = 'src/api/*.h', 'src/port/macos/*.h' 22 | s.library = 'c++' 23 | s.xcconfig = { 24 | 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11', 25 | 'CLANG_CXX_LIBRARY' => 'libc++' 26 | } 27 | s.requires_arc = false 28 | s.libraries = 'c++' 29 | s.static_framework = true 30 | end 31 | --------------------------------------------------------------------------------