├── scripts └── startup.bat ├── lib ├── jmdns.jar ├── servlet-api-2.5.jar ├── jetty-io-7.2.2.v20101205.jar ├── jetty-http-7.2.2.v20101205.jar ├── jetty-util-7.2.2.v20101205.jar ├── jetty-server-7.2.2.v20101205.jar ├── jetty-continuation-7.2.2.v20101205.jar ├── jmdns.NOTICE.txt ├── jetty.notice.html ├── jmdns.LICENSE ├── jetty.LICENSE-APACHE-2.0.txt ├── jetty.LICENSE-ECLIPSE-1.0.html └── jmdns.LICENSE-LGPL.txt ├── resource ├── images │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_228ef1_256x240.png │ ├── ui-icons_ef8c08_256x240.png │ ├── ui-icons_ffd27a_256x240.png │ ├── ui-icons_ffffff_256x240.png │ ├── ui-bg_flat_10_000000_40x100.png │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ └── ui-bg_highlight-soft_75_ffe45c_1x100.png ├── index.html ├── main.js └── jquery-ui-1.8.7.custom.css ├── LICENSE ├── src └── net │ └── ioncannon │ └── ap4j │ ├── command │ ├── StopCommand.java │ ├── StatusCommand.java │ ├── RateCommand.java │ ├── ScrubCommand.java │ ├── PlayCommand.java │ └── DeviceCommand.java │ ├── service │ ├── DeviceConnectionService.java │ ├── AirPlayJmDNSServiceListener.java │ ├── JettyResourceService.java │ └── JettyCommandService.java │ ├── main │ ├── MDNSRunnable.java │ ├── JettyRunnable.java │ └── Main.java │ └── model │ ├── Device.java │ ├── DeviceResponse.java │ ├── UserPreference.java │ └── DeviceConnection.java └── README.md /scripts/startup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | java -jar AP4JPlayer.jar 4 | -------------------------------------------------------------------------------- /lib/jmdns.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jmdns.jar -------------------------------------------------------------------------------- /lib/servlet-api-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/servlet-api-2.5.jar -------------------------------------------------------------------------------- /lib/jetty-io-7.2.2.v20101205.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jetty-io-7.2.2.v20101205.jar -------------------------------------------------------------------------------- /lib/jetty-http-7.2.2.v20101205.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jetty-http-7.2.2.v20101205.jar -------------------------------------------------------------------------------- /lib/jetty-util-7.2.2.v20101205.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jetty-util-7.2.2.v20101205.jar -------------------------------------------------------------------------------- /lib/jetty-server-7.2.2.v20101205.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jetty-server-7.2.2.v20101205.jar -------------------------------------------------------------------------------- /lib/jetty-continuation-7.2.2.v20101205.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/lib/jetty-continuation-7.2.2.v20101205.jar -------------------------------------------------------------------------------- /resource/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /resource/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /resource/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /resource/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /resource/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /resource/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /resource/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /resource/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /resource/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /resource/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /resource/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /resource/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /resource/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /resource/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carsonmcdonald/AP4J-Player/HEAD/resource/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /lib/jmdns.NOTICE.txt: -------------------------------------------------------------------------------- 1 | =============================================================== 2 | == NOTICE File for JmDNS == 3 | =============================================================== 4 | 5 | Java Multicast Domain Name Server (JmDNS) 6 | 7 | This project was originally developed by Arthur van Hoff under the GNU 8 | Lesser General Public License as jRendevous. It was moved to Sourceforge 9 | by Rick Blair and renamed to JmDNS with the Arthur's kind permission. 10 | 11 | Currently it has been re-released under the Apache License, Version 2.0. 12 | 13 | Details of the Apache License, Version 2.0 can be found at: 14 | http://www.apache.org/licenses/ 15 | 16 | 17 | For other details please see the README.txt file. 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Carson McDonald 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /resource/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Main Menu 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 19 | 20 | 21 | 22 | Devices available for playback:
23 |
24 | Loading... 25 |
26 | 27 | Enter the URL of a video:
28 |
29 |
30 | 31 |
32 | Load Video URL 33 |
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/StopCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | /** 4 | * Copyright (c) 2011 Carson McDonald 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | public class StopCommand extends DeviceCommand 26 | { 27 | public String getCommandString() 28 | { 29 | return constructCommand("stop", null); 30 | } 31 | } -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/StatusCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | /** 4 | * Copyright (c) 2011 Carson McDonald 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | public class StatusCommand extends DeviceCommand 26 | { 27 | public String getCommandString() 28 | { 29 | return constructCommand("status", null); 30 | } 31 | } -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/RateCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | /** 4 | * Copyright (c) 2011 Carson McDonald 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | public class RateCommand extends DeviceCommand 26 | { 27 | public RateCommand(double rate) 28 | { 29 | addParameter("value", rate); 30 | } 31 | 32 | public String getCommandString() 33 | { 34 | return constructCommand("rate", null); 35 | } 36 | } -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/ScrubCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | /** 4 | * Copyright (c) 2011 Carson McDonald 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | public class ScrubCommand extends DeviceCommand 26 | { 27 | /** 28 | * In this mode this is a request for the current location of the stream. 29 | */ 30 | public ScrubCommand() 31 | { 32 | requestType = "GET"; 33 | } 34 | 35 | public ScrubCommand(double position) 36 | { 37 | addParameter("position", position); 38 | } 39 | 40 | public String getCommandString() 41 | { 42 | return constructCommand("scrub", null); 43 | } 44 | } -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/PlayCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | /** 4 | * Copyright (c) 2011 Carson McDonald 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | public class PlayCommand extends DeviceCommand 26 | { 27 | private String contentURL; 28 | private double startPosition; 29 | 30 | public PlayCommand(String contentURL, double startPosition) 31 | { 32 | this.contentURL = contentURL; 33 | this.startPosition = startPosition; 34 | } 35 | 36 | public String getCommandString() 37 | { 38 | return constructCommand("play", 39 | String.format("Content-Location: %s\n" + 40 | "Start-Position: %f\n", contentURL, startPosition)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/service/DeviceConnectionService.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.service; 2 | 3 | import net.ioncannon.ap4j.model.DeviceConnection; 4 | import net.ioncannon.ap4j.model.Device; 5 | 6 | import java.util.Map; 7 | import java.util.HashMap; 8 | 9 | /** 10 | * Copyright (c) 2011 Carson McDonald 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining a copy 13 | * of this software and associated documentation files (the "Software"), to deal 14 | * in the Software without restriction, including without limitation the rights 15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | * copies of the Software, and to permit persons to whom the Software is 17 | * furnished to do so, subject to the following conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be included in 20 | * all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | * THE SOFTWARE. 29 | */ 30 | 31 | public class DeviceConnectionService 32 | { 33 | private static Map deviceConnectionMap = new HashMap(); 34 | 35 | public static DeviceConnection getConnection(Device device) 36 | { 37 | if(!deviceConnectionMap.containsKey(device.getId())) 38 | { 39 | deviceConnectionMap.put(device.getId(), new DeviceConnection(device)); 40 | } 41 | return deviceConnectionMap.get(device.getId()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/main/MDNSRunnable.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.main; 2 | 3 | import net.ioncannon.ap4j.service.AirPlayJmDNSServiceListener; 4 | 5 | import javax.jmdns.JmDNS; 6 | import java.io.IOException; 7 | import java.util.logging.Logger; 8 | import java.util.logging.Level; 9 | 10 | /** 11 | * Copyright (c) 2011 Carson McDonald 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining a copy 14 | * of this software and associated documentation files (the "Software"), to deal 15 | * in the Software without restriction, including without limitation the rights 16 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | * copies of the Software, and to permit persons to whom the Software is 18 | * furnished to do so, subject to the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included in 21 | * all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | * THE SOFTWARE. 30 | */ 31 | 32 | public class MDNSRunnable implements Runnable 33 | { 34 | private static Logger logger = Logger.getLogger(MDNSRunnable.class.getName()); 35 | 36 | private JmDNS jmDNS = null; 37 | 38 | public void run() 39 | { 40 | try 41 | { 42 | jmDNS = JmDNS.create(); 43 | jmDNS.addServiceListener("_airplay._tcp.local.", new AirPlayJmDNSServiceListener()); 44 | } 45 | catch (Exception e) 46 | { 47 | logger.log(Level.SEVERE, e.getMessage(), e); 48 | Main.shutdown(); 49 | } 50 | } 51 | 52 | public void shutdown() 53 | { 54 | if(jmDNS != null) 55 | { 56 | try 57 | { 58 | jmDNS.close(); 59 | } 60 | catch (IOException e) 61 | { 62 | logger.log(Level.SEVERE, e.getMessage(), e); 63 | } 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | AirPlay For Java 2 | ============================ 3 | 4 | A Java application that enables playing compatible videos on AirPlay devices. 5 | 6 | ## DESCRIPTION 7 | 8 | This is a simple AirPlay player put together using [Jetty](http://www.eclipse.org/jetty/), [JmDNS](http://jmdns.sourceforge.net/), 9 | [JQuery](http://jquery.com/), and [JQueryUI](http://jqueryui.com/) that will allow you to play videos on an AirPlay compatible 10 | device such as the AppleTV V2. This application has been tested on Windows, Mac and Linux using the Java 6 JDK from Oracle. 11 | 12 | ## FEATURES 13 | 14 | - User interface to control of playback of video. 15 | 16 | ## REQUIREMENTS 17 | 18 | Java 6 and Apache Ant are required to build this project. 19 | 20 | ## INSTALL 21 | 22 | Compile using Ant then run the resulting jar by running the startup.bat file on windows, double clicking on the AP4JPlayer.jar 23 | file or by using the following command in a terminal: 24 | 25 | java -jar AP4JPlayer.jar 26 | 27 | ## Usage 28 | 29 | After starting the application use a web browser to access the user interface at http://localhost:7070/ 30 | 31 | On startup the application will detect AirPlay devices on your network and display them in the user interface. Copy a 32 | URL into the play video entry field and then click the play video link. 33 | 34 | If you have a firewall you may need to make sure that it will allow mDNS broadcasts. 35 | 36 | ## LICENSE 37 | 38 | Copyright (c) 2011 Carson McDonald 39 | 40 | Permission is hereby granted, free of charge, to any person obtaining a copy 41 | of this software and associated documentation files (the "Software"), to deal 42 | in the Software without restriction, including without limitation the rights 43 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 44 | copies of the Software, and to permit persons to whom the Software is 45 | furnished to do so, subject to the following conditions: 46 | 47 | The above copyright notice and this permission notice shall be included in 48 | all copies or substantial portions of the Software. 49 | 50 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 51 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 52 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 53 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 54 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 55 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 56 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/main/JettyRunnable.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.main; 2 | 3 | import org.eclipse.jetty.server.Server; 4 | import org.eclipse.jetty.server.handler.HandlerList; 5 | import org.eclipse.jetty.server.handler.DefaultHandler; 6 | 7 | import net.ioncannon.ap4j.service.JettyCommandService; 8 | import net.ioncannon.ap4j.service.JettyResourceService; 9 | 10 | import java.util.logging.Logger; 11 | import java.util.logging.Level; 12 | 13 | /** 14 | * Copyright (c) 2011 Carson McDonald 15 | * 16 | * Permission is hereby granted, free of charge, to any person obtaining a copy 17 | * of this software and associated documentation files (the "Software"), to deal 18 | * in the Software without restriction, including without limitation the rights 19 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 20 | * copies of the Software, and to permit persons to whom the Software is 21 | * furnished to do so, subject to the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be included in 24 | * all copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 32 | * THE SOFTWARE. 33 | */ 34 | 35 | public class JettyRunnable implements Runnable 36 | { 37 | private static Logger logger = Logger.getLogger(JettyRunnable.class.getName()); 38 | 39 | private Server server = new Server(7070); 40 | 41 | public void run() 42 | { 43 | try 44 | { 45 | HandlerList handlers = new HandlerList(); 46 | handlers.addHandler(new JettyCommandService()); 47 | handlers.addHandler(new JettyResourceService()); 48 | handlers.addHandler(new DefaultHandler()); 49 | 50 | server.setHandler(handlers); 51 | server.setStopAtShutdown(true); 52 | 53 | server.start(); 54 | server.join(); 55 | 56 | logger.info("Jetty terminated."); 57 | } 58 | catch(Exception e) 59 | { 60 | logger.log(Level.SEVERE, e.getMessage(), e); 61 | Main.shutdown(); 62 | } 63 | } 64 | 65 | public void shutdown() 66 | { 67 | try 68 | { 69 | server.getHandler().stop(); 70 | server.stop(); 71 | } 72 | catch (Exception e) 73 | { 74 | logger.log(Level.SEVERE, e.getMessage(), e); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/model/Device.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.model; 2 | 3 | import java.security.MessageDigest; 4 | import java.math.BigInteger; 5 | import java.net.InetAddress; 6 | import java.util.logging.Logger; 7 | import java.util.logging.Level; 8 | 9 | /** 10 | * Copyright (c) 2011 Carson McDonald 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining a copy 13 | * of this software and associated documentation files (the "Software"), to deal 14 | * in the Software without restriction, including without limitation the rights 15 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | * copies of the Software, and to permit persons to whom the Software is 17 | * furnished to do so, subject to the following conditions: 18 | * 19 | * The above copyright notice and this permission notice shall be included in 20 | * all copies or substantial portions of the Software. 21 | * 22 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 | * THE SOFTWARE. 29 | */ 30 | 31 | public class Device 32 | { 33 | private static Logger logger = Logger.getLogger(Device.class.getName()); 34 | 35 | private String id; 36 | private String name; 37 | private InetAddress inetAddress; 38 | private int port; 39 | 40 | public Device(String name, InetAddress inetAddress, int port) 41 | { 42 | this.name = name; 43 | this.inetAddress = inetAddress; 44 | this.port = port; 45 | 46 | try 47 | { 48 | MessageDigest messageDigest = MessageDigest.getInstance("MD5"); 49 | messageDigest.update(inetAddress.getAddress()); 50 | messageDigest.update(String.valueOf(port).getBytes("UTF-8")); 51 | id = String.format("%032X", new BigInteger(1, messageDigest.digest())); 52 | } 53 | catch (Exception e) 54 | { 55 | logger.log(Level.SEVERE, e.getMessage(), e); 56 | throw new RuntimeException(e.getMessage(), e); 57 | } 58 | } 59 | 60 | public String getName() 61 | { 62 | return name; 63 | } 64 | 65 | public InetAddress getInetAddress() 66 | { 67 | return inetAddress; 68 | } 69 | 70 | public int getPort() 71 | { 72 | return port; 73 | } 74 | 75 | public String getId() 76 | { 77 | return id; 78 | } 79 | 80 | @Override 81 | public String toString() 82 | { 83 | return "Device{" + 84 | "id='" + getId() + '\'' + 85 | ", name='" + name + '\'' + 86 | ", inetAddress='" + inetAddress + '\'' + 87 | ", port=" + port + 88 | '}'; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/command/DeviceCommand.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.command; 2 | 3 | import java.util.Map; 4 | import java.util.HashMap; 5 | import java.util.logging.Logger; 6 | import java.util.logging.Level; 7 | import java.net.URLEncoder; 8 | import java.io.UnsupportedEncodingException; 9 | 10 | /** 11 | * Copyright (c) 2011 Carson McDonald 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining a copy 14 | * of this software and associated documentation files (the "Software"), to deal 15 | * in the Software without restriction, including without limitation the rights 16 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | * copies of the Software, and to permit persons to whom the Software is 18 | * furnished to do so, subject to the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included in 21 | * all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | * THE SOFTWARE. 30 | */ 31 | 32 | public abstract class DeviceCommand 33 | { 34 | private static Logger logger = Logger.getLogger(DeviceCommand.class.getName()); 35 | 36 | private Map parameterMap = new HashMap(); 37 | 38 | protected String requestType = "POST"; 39 | 40 | protected void addParameter(String name, Object value) 41 | { 42 | parameterMap.put(name, value.toString()); 43 | } 44 | 45 | protected String constructCommand(String commandName, String content) 46 | { 47 | String parameterValue = parameterMap.keySet().size() == 0 ? "" : "?"; 48 | for(String key : parameterMap.keySet()) 49 | { 50 | try 51 | { 52 | parameterValue += key + "=" + URLEncoder.encode(parameterMap.get(key), "utf-8"); 53 | } 54 | catch (UnsupportedEncodingException e) 55 | { 56 | logger.log(Level.SEVERE, e.getMessage(), e); 57 | throw new RuntimeException(e.getMessage(), e); 58 | } 59 | } 60 | 61 | String headerPart = String.format("%s /%s%s HTTP/1.1\n" + 62 | "Content-Length: %d\n" + 63 | "User-Agent: MediaControl/1.0\n", requestType, commandName, parameterValue, content == null ? 0 : content.length()); 64 | if(content == null || content.length() == 0) 65 | { 66 | return headerPart; 67 | } 68 | else 69 | { 70 | return headerPart + "\n" + content; 71 | } 72 | } 73 | 74 | public abstract String getCommandString(); 75 | } 76 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/service/AirPlayJmDNSServiceListener.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.service; 2 | 3 | import net.ioncannon.ap4j.model.Device; 4 | 5 | import javax.jmdns.ServiceListener; 6 | import javax.jmdns.ServiceEvent; 7 | import javax.jmdns.ServiceInfo; 8 | import java.util.logging.Level; 9 | import java.util.logging.Logger; 10 | 11 | /** 12 | * Copyright (c) 2011 Carson McDonald 13 | * 14 | * Permission is hereby granted, free of charge, to any person obtaining a copy 15 | * of this software and associated documentation files (the "Software"), to deal 16 | * in the Software without restriction, including without limitation the rights 17 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | * copies of the Software, and to permit persons to whom the Software is 19 | * furnished to do so, subject to the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be included in 22 | * all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | * THE SOFTWARE. 31 | */ 32 | 33 | public class AirPlayJmDNSServiceListener implements ServiceListener 34 | { 35 | private static Logger logger = Logger.getLogger(AirPlayJmDNSServiceListener.class.getName()); 36 | 37 | public AirPlayJmDNSServiceListener() 38 | { 39 | logger.log(Level.INFO, "AirPlay listener started."); 40 | } 41 | 42 | public void serviceAdded(ServiceEvent serviceEvent) 43 | { 44 | logger.log(Level.INFO, "Service added: " + serviceEvent); 45 | 46 | ServiceInfo serviceInfo = serviceEvent.getInfo(); 47 | if(serviceInfo == null || serviceInfo.getInetAddress() == null) 48 | { 49 | serviceInfo = serviceEvent.getDNS().getServiceInfo(serviceEvent.getType(), serviceEvent.getName(), 2000); 50 | } 51 | JettyCommandService.addDevice(new Device(serviceEvent.getName(), serviceInfo.getInetAddress(), serviceInfo.getPort())); 52 | } 53 | 54 | public void serviceRemoved(ServiceEvent serviceEvent) 55 | { 56 | logger.log(Level.INFO, "Service removed: " + serviceEvent); 57 | 58 | ServiceInfo serviceInfo = serviceEvent.getInfo(); 59 | if(serviceInfo == null || serviceInfo.getInetAddress() == null) 60 | { 61 | serviceInfo = serviceEvent.getDNS().getServiceInfo(serviceEvent.getType(), serviceEvent.getName(), 2000); 62 | } 63 | Device device = new Device(serviceEvent.getName(), serviceInfo.getInetAddress(), serviceInfo.getPort()); 64 | JettyCommandService.removeDevice(device.getId()); 65 | } 66 | 67 | public void serviceResolved(ServiceEvent serviceEvent) 68 | { 69 | logger.log(Level.INFO, "Service resolved..."); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/model/DeviceResponse.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.model; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * Copyright (c) 2011 Carson McDonald 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy 10 | * of this software and associated documentation files (the "Software"), to deal 11 | * in the Software without restriction, including without limitation the rights 12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | * copies of the Software, and to permit persons to whom the Software is 14 | * furnished to do so, subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | * THE SOFTWARE. 26 | */ 27 | 28 | public class DeviceResponse 29 | { 30 | private int responseCode; 31 | private String responseMessage; 32 | private Map headerMap = new HashMap(); 33 | private String content; 34 | private Map contentParameterMap = new HashMap(); 35 | 36 | public DeviceResponse(String headers, String content) 37 | { 38 | String headerSplit[] = headers.split("\n"); 39 | 40 | String rawResponseValue = headerSplit[0]; 41 | String responseSplit[] = rawResponseValue.split(" "); 42 | responseCode = Integer.parseInt(responseSplit[1]); 43 | responseMessage = responseSplit[2]; 44 | 45 | for(int i=1; i getHeaderMap() 77 | { 78 | return headerMap; 79 | } 80 | 81 | public String getContent() 82 | { 83 | return content; 84 | } 85 | 86 | public boolean hasContentParameters() 87 | { 88 | return !contentParameterMap.isEmpty(); 89 | } 90 | 91 | public Map getContentParameterMap() 92 | { 93 | return contentParameterMap; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/model/UserPreference.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.model; 2 | 3 | import java.util.prefs.Preferences; 4 | import java.util.prefs.BackingStoreException; 5 | import java.util.List; 6 | import java.util.ArrayList; 7 | 8 | /** 9 | * Copyright (c) 2011 Carson McDonald 10 | * 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy 12 | * of this software and associated documentation files (the "Software"), to deal 13 | * in the Software without restriction, including without limitation the rights 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | * copies of the Software, and to permit persons to whom the Software is 16 | * furnished to do so, subject to the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be included in 19 | * all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | * THE SOFTWARE. 28 | */ 29 | 30 | public class UserPreference 31 | { 32 | private static final String LOCAL_DIRECTORY_COUNT = "local_dir_count"; 33 | private static final String LOCAL_DIRECTORY = "local_dir_"; 34 | 35 | public static void addLocalDirectory(String directoryName) 36 | { 37 | Preferences preferences = Preferences.userNodeForPackage(UserPreference.class); 38 | 39 | int dirCount = preferences.getInt(LOCAL_DIRECTORY_COUNT, 0); 40 | preferences.put(LOCAL_DIRECTORY + String.valueOf(dirCount), directoryName); 41 | preferences.putInt(LOCAL_DIRECTORY_COUNT, dirCount+1); 42 | 43 | try 44 | { 45 | preferences.flush(); 46 | } 47 | catch (BackingStoreException e) 48 | { 49 | throw new RuntimeException(e.getMessage(), e); 50 | } 51 | } 52 | 53 | public static List getLocalDirectories() 54 | { 55 | Preferences preferences = Preferences.userNodeForPackage(UserPreference.class); 56 | 57 | List localDirectories = new ArrayList(); 58 | 59 | int dirCount = preferences.getInt(LOCAL_DIRECTORY_COUNT, 0); 60 | for(int i=0; i 0) 104 | { 105 | content = new StringBuffer(contentLength); 106 | char buffer[] = new char[1024]; 107 | int read, totalRead = 0; 108 | do 109 | { 110 | read = deviceInput.read(buffer); 111 | totalRead += read; 112 | content.append(buffer, 0, read); 113 | } while(read != -1 && totalRead < contentLength); 114 | } 115 | 116 | return new DeviceResponse(fullResponse.toString(), content == null ? null : content.toString()); 117 | } 118 | catch (IOException e) 119 | { 120 | logger.log(Level.SEVERE, e.getMessage(), e); 121 | throw new RuntimeException(e.getMessage(), e); 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/service/JettyResourceService.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.service; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.ServletException; 6 | 7 | import java.io.IOException; 8 | import java.io.File; 9 | import java.io.BufferedInputStream; 10 | import java.io.FileInputStream; 11 | import java.util.logging.Logger; 12 | import java.util.logging.Level; 13 | 14 | import org.eclipse.jetty.server.Request; 15 | import org.eclipse.jetty.server.handler.AbstractHandler; 16 | import net.ioncannon.ap4j.main.Main; 17 | 18 | /** 19 | * Copyright (c) 2011 Carson McDonald 20 | * 21 | * Permission is hereby granted, free of charge, to any person obtaining a copy 22 | * of this software and associated documentation files (the "Software"), to deal 23 | * in the Software without restriction, including without limitation the rights 24 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | * copies of the Software, and to permit persons to whom the Software is 26 | * furnished to do so, subject to the following conditions: 27 | * 28 | * The above copyright notice and this permission notice shall be included in 29 | * all copies or substantial portions of the Software. 30 | * 31 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 37 | * THE SOFTWARE. 38 | * 39 | * 40 | * This handler will find files in the /resource directory. 41 | * 42 | */ 43 | public class JettyResourceService extends AbstractHandler 44 | { 45 | private static Logger logger = Logger.getLogger(JettyResourceService.class.getName()); 46 | 47 | private File resourceDirectory; 48 | 49 | public JettyResourceService() 50 | { 51 | resourceDirectory = new File("resource"); 52 | 53 | if(!resourceDirectory.exists() || !resourceDirectory.isDirectory()) 54 | { 55 | logger.log(Level.SEVERE, "Could not find resource directory."); 56 | throw new RuntimeException("Could not find resource directory."); 57 | } 58 | } 59 | 60 | public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException 61 | { 62 | try 63 | { 64 | handleFromResources(baseRequest, request, response); 65 | } 66 | catch (RuntimeException e) 67 | { 68 | logger.log(Level.SEVERE, e.getMessage(), e); 69 | Main.shutdown(); 70 | } 71 | } 72 | 73 | private void handleFromResources(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException 74 | { 75 | String resourceName = request.getRequestURI().replace("../", "").replace('/', File.separatorChar); 76 | if(resourceName.trim().equals("") || resourceName.trim().equals("/")) 77 | { 78 | resourceName = "/index.html"; 79 | } 80 | 81 | if(resourceName.trim().equals("/favicon.ico")) 82 | { 83 | response.setStatus(HttpServletResponse.SC_NOT_FOUND); 84 | baseRequest.setHandled(true); 85 | } 86 | else 87 | { 88 | sendFile(new File(resourceDirectory.getAbsolutePath() + resourceName), baseRequest, response); 89 | } 90 | } 91 | 92 | private void sendFile(File fileToSend, Request baseRequest, HttpServletResponse response) throws IOException 93 | { 94 | String contentType = "text/html;charset=utf-8"; 95 | if(fileToSend.getName().endsWith(".js")) 96 | { 97 | contentType = "application/javascript;charset=utf-8"; 98 | } 99 | else if(fileToSend.getName().endsWith(".css")) 100 | { 101 | contentType = "text/css;charset=utf-8"; 102 | } 103 | else if(fileToSend.getName().endsWith(".png")) 104 | { 105 | contentType = "image/png"; 106 | } 107 | 108 | response.setStatus(HttpServletResponse.SC_OK); 109 | baseRequest.setHandled(true); 110 | 111 | response.setContentType(contentType); 112 | 113 | BufferedInputStream inputBuffer = new BufferedInputStream(new FileInputStream(fileToSend)); 114 | byte buffer[] = new byte[1024]; 115 | int read; 116 | while((read = inputBuffer.read(buffer)) != -1) 117 | { 118 | response.getOutputStream().write(buffer, 0, read); 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /lib/jetty.notice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Eclipse.org Software User Agreement 7 | 8 |

Eclipse Foundation Software User Agreement

9 |

March 17, 2005

10 | 11 |

Usage Of Content

12 | 13 |

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS 14 | (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND 15 | CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE 16 | OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR 17 | NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND 18 | CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

19 | 20 |

Applicable Licenses

21 | 22 |

Unless otherwise indicated, all Content made available by the 23 | Eclipse Foundation is provided to you under the terms and conditions of 24 | the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is 25 | provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. 26 | For purposes of the EPL, "Program" will mean the Content.

27 | 28 |

Content includes, but is not limited to, source code, object code, 29 | documentation and other files maintained in the Eclipse.org CVS 30 | repository ("Repository") in CVS modules ("Modules") and made available 31 | as downloadable archives ("Downloads").

32 | 33 |
    34 |
  • Content may be structured and packaged into modules to 35 | facilitate delivering, extending, and upgrading the Content. Typical 36 | modules may include plug-ins ("Plug-ins"), plug-in fragments 37 | ("Fragments"), and features ("Features").
  • 38 |
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • 39 |
  • A 40 | Feature is a bundle of one or more Plug-ins and/or Fragments and 41 | associated material. Each Feature may be packaged as a sub-directory in 42 | a directory named "features". Within a Feature, files named 43 | "feature.xml" may contain a list of the names and version numbers of 44 | the Plug-ins and/or Fragments associated with that Feature.
  • 45 |
  • Features 46 | may also include other Features ("Included Features"). Within a 47 | Feature, files named "feature.xml" may contain a list of the names and 48 | version numbers of Included Features.
  • 49 |
50 | 51 |

The terms and conditions governing Plug-ins and Fragments should be 52 | contained in files named "about.html" ("Abouts"). The terms and 53 | conditions governing Features and 54 | Included Features should be contained in files named "license.html" 55 | ("Feature Licenses"). Abouts and Feature Licenses may be located in any 56 | directory of a Download or Module 57 | including, but not limited to the following locations:

58 | 59 |
    60 |
  • The top-level (root) directory
  • 61 |
  • Plug-in and Fragment directories
  • 62 |
  • Inside Plug-ins and Fragments packaged as JARs
  • 63 |
  • Sub-directories of the directory named "src" of certain Plug-ins
  • 64 |
  • Feature directories
  • 65 |
66 | 67 |

Note: if a Feature made available by the Eclipse Foundation is 68 | installed using the Eclipse Update Manager, you must agree to a license 69 | ("Feature Update License") during the 70 | installation process. If the Feature contains Included Features, the 71 | Feature Update License should either provide you with the terms and 72 | conditions governing the Included Features or 73 | inform you where you can locate them. Feature Update Licenses may be 74 | found in the "license" property of files named "feature.properties" 75 | found within a Feature. 76 | Such Abouts, Feature Licenses, and Feature Update Licenses contain the 77 | terms and conditions (or references to such terms and conditions) that 78 | govern your use of the associated Content in 79 | that directory.

80 | 81 |

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER 82 | TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND 83 | CONDITIONS. SOME OF THESE 84 | OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

85 | 86 | 94 | 95 |

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND 96 | CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, 97 | or Feature Update License is provided, please 98 | contact the Eclipse Foundation to determine what terms and conditions 99 | govern that particular Content.

100 | 101 |

Cryptography

102 | 103 |

Content may contain encryption software. The country in which you 104 | are currently may have restrictions on the import, possession, and use, 105 | and/or re-export to another country, of encryption software. BEFORE 106 | using any encryption software, please check the country's laws, 107 | regulations and policies concerning the import, possession, or use, and 108 | re-export of encryption software, to see if this is permitted.

109 | 110 | Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. 111 | -------------------------------------------------------------------------------- /resource/main.js: -------------------------------------------------------------------------------- 1 | function loadVideoURL(videoFormId) 2 | { 3 | var videoURL = $('#' + videoFormId).val(); 4 | 5 | if(videoURL == 'undefined' || videoURL == '') 6 | { 7 | alert('No video URL entered'); 8 | } 9 | else 10 | { 11 | playbackPopup(escape(videoURL)); 12 | } 13 | } 14 | 15 | var pauseStatusUpdate = false; 16 | var hasStartedPlaying = false; 17 | var playTimer = null; 18 | 19 | function secondsToTime(totalSeconds) 20 | { 21 | var hours = Math.floor(totalSeconds / (60 * 60)); 22 | var minBreak = totalSeconds % (60 * 60); 23 | var minutes = Math.floor(minBreak / 60); 24 | var secBreak = minBreak % 60; 25 | var seconds = Math.ceil(secBreak); 26 | return ((hours < 10) ? '0' : '') + hours + ((minutes < 10) ? ':0' : ':') + minutes + ((seconds < 10) ? ':0' : ':') + seconds; 27 | } 28 | 29 | function updatePlayStatus() 30 | { 31 | if(!pauseStatusUpdate) 32 | { 33 | $.getJSON("/ci", 34 | { 35 | t: "4", 36 | d: $('#selectedpd :selected').val() 37 | }, 38 | function(data) 39 | { 40 | $("#playbacktime").html(secondsToTime(data.position) + ' of ' + secondsToTime(data.duration)); 41 | 42 | $("#playbackslider").slider( 'option', { disabled: false, max: Math.floor(data.duration), value: Math.floor(data.position) } ); 43 | }); 44 | } 45 | } 46 | 47 | function play() 48 | { 49 | if(hasStartedPlaying) 50 | { 51 | $.getJSON("/ci", 52 | { 53 | t: "5", 54 | d: $('#selectedpd :selected').val(), 55 | r: '1.0' 56 | }, 57 | function(data) 58 | { 59 | pauseStatusUpdate = false; 60 | }); 61 | } 62 | else 63 | { 64 | $('#selectedpd').attr('disabled', true); 65 | 66 | $("#playbackslider").slider( 'option', { disabled: true, max: 0, value: 0 } ); 67 | 68 | $.getJSON("/ci", 69 | { 70 | t: "2", 71 | d: $('#selectedpd :selected').val(), 72 | s: currentVideoURL 73 | }, 74 | function(data) 75 | { 76 | hasStartedPlaying = true; 77 | playTimer = setInterval("updatePlayStatus()", 2000); 78 | }); 79 | } 80 | } 81 | 82 | function pause() 83 | { 84 | $.getJSON("/ci", 85 | { 86 | t: "5", 87 | d: $('#selectedpd :selected').val(), 88 | r: '0.0' 89 | }, 90 | function(data) 91 | { 92 | pauseStatusUpdate = true; 93 | }); 94 | } 95 | 96 | function stop() 97 | { 98 | $.getJSON("/ci", 99 | { 100 | t: "3", 101 | d: $('#selectedpd :selected').val() 102 | }, 103 | function(data) 104 | { 105 | $('#selectedpd').attr('disabled', false); 106 | 107 | $("#playbacktime").html(secondsToTime(0) + ' of ' + secondsToTime(0)); 108 | 109 | $("#playbackslider").slider( 'option', { disabled: true, max: 0, value: 0 } ); 110 | 111 | hasStartedPlaying = false; 112 | clearTimeout(playTimer); 113 | playTimer = null; 114 | }); 115 | } 116 | 117 | var currentVideoURL; 118 | 119 | function dialogClose(event, ui) 120 | { 121 | if(playTimer != null) 122 | { 123 | stop(); 124 | } 125 | currentVideoURL = null; 126 | hasStartedPlaying = false; 127 | 128 | $('#playback-window').remove(); 129 | } 130 | 131 | function playbackPopup(videoURL) 132 | { 133 | currentVideoURL = videoURL; 134 | hasStartedPlaying = false; 135 | if(playTimer != null) 136 | { 137 | clearTimeout(playTimer); 138 | playTimer = null; 139 | } 140 | 141 | var urlTitle = unescape(videoURL); 142 | 143 | $('body').prepend('
'); 144 | 145 | $('#playback-window').dialog( 146 | { 147 | width: 450, 148 | modal: true, 149 | title: urlTitle.length > 40 ? urlTitle.substring(0, 40) + '...' : urlTitle, 150 | resizable: false, 151 | close: dialogClose 152 | }); 153 | 154 | $.getJSON('/ci?t=1', function(data) 155 | { 156 | var playbackDevices = data.devices; 157 | 158 | var displayHTML = ''; 159 | 160 | if (playbackDevices != null && playbackDevices.length > 0) 161 | { 162 | displayHTML += '
Select a playback device:
'; 170 | 171 | displayHTML += '
'; 172 | 173 | displayHTML += 'Playback time: 00:00:00 of 00:00:00
'; 174 | displayHTML += '
'; 175 | 176 | displayHTML += '
'; 177 | 178 | displayHTML += '
'; 179 | displayHTML += ''; 180 | displayHTML += ''; 181 | displayHTML += ''; 182 | displayHTML += ''; 183 | displayHTML += '
'; 184 | } 185 | else 186 | { 187 | displayHTML += 'There are currently no devices available for playback.'; 188 | } 189 | 190 | $('#playback-window').html(displayHTML); 191 | 192 | $('#selectedpd').attr('disabled', false); 193 | 194 | $('#play').button({ text: false, icons: { primary: "ui-icon-play" } }).click(function() 195 | { 196 | $('#stop').button( "option", { disabled: false } ); 197 | var options; 198 | if ( $(this).text() === "play" ) 199 | { 200 | play(); 201 | options = { label: "pause", icons: { primary: "ui-icon-pause" } }; 202 | } 203 | else 204 | { 205 | pause(); 206 | options = { label: "play", icons: { primary: "ui-icon-play" } }; 207 | } 208 | $(this).button( "option", options ); 209 | }); 210 | $('#stop').button({ text: false, disabled: true, icons: { primary: "ui-icon-stop" } }).click(function() 211 | { 212 | stop(); 213 | $('#play').button( "option", { label: "play", icons: { primary: "ui-icon-play" } }); 214 | $('#stop').button( "option", { disabled: true } ); 215 | }); 216 | 217 | $("#playbackslider").slider({ 218 | value: 0, 219 | orientation: "horizontal", 220 | range: "min", 221 | max: 0, 222 | animate: true, 223 | disabled: true, 224 | slide: handleScrubSlide, 225 | stop: handleScrubSlideDone 226 | }); 227 | 228 | $("#playbackslider").slider( 'option', { disabled: true, max: 0, value: 0 } ); 229 | }); 230 | } 231 | 232 | function handleScrubSlide(event, ui) 233 | { 234 | pauseStatusUpdate = true; 235 | $("#playbacktime").html(secondsToTime(ui.value) + ' of ' + secondsToTime($("#playbackslider").slider('option', 'max'))); 236 | } 237 | 238 | function handleScrubSlideDone(event, ui) 239 | { 240 | $.getJSON("/ci", 241 | { 242 | t: "6", 243 | d: $('#selectedpd :selected').val(), 244 | p: ui.value 245 | }, 246 | function(data) 247 | { 248 | $("#playbacktime").html(secondsToTime(ui.value) + ' of ' + secondsToTime($("#playbackslider").slider('option', 'max'))); 249 | pauseStatusUpdate = false; 250 | }); 251 | } 252 | 253 | function refreshDeviceList() 254 | { 255 | $.getJSON('/ci?t=1', function(data) 256 | { 257 | if (data.devices != null && data.devices.length > 0) 258 | { 259 | var dldata = ''; 260 | $.each(data.devices, function(device) 261 | { 262 | dldata += '
'; 263 | dldata += data.devices[device].deviceName; 264 | dldata += '
'; 265 | }); 266 | $('#devicelist').html(dldata); 267 | } 268 | else 269 | { 270 | $('#devicelist').html('No devices found.'); 271 | } 272 | }); 273 | } 274 | 275 | $(document).ready(function() 276 | { 277 | refreshDeviceList(); 278 | }); -------------------------------------------------------------------------------- /lib/jmdns.LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /lib/jetty.LICENSE-APACHE-2.0.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /src/net/ioncannon/ap4j/service/JettyCommandService.java: -------------------------------------------------------------------------------- 1 | package net.ioncannon.ap4j.service; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.ServletException; 6 | 7 | import java.io.IOException; 8 | import java.util.Map; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | import java.util.ArrayList; 12 | import java.util.logging.Logger; 13 | import java.util.logging.Level; 14 | import java.net.URLDecoder; 15 | 16 | import org.eclipse.jetty.server.Request; 17 | import org.eclipse.jetty.server.handler.AbstractHandler; 18 | import org.eclipse.jetty.util.ajax.JSON; 19 | import net.ioncannon.ap4j.model.Device; 20 | import net.ioncannon.ap4j.model.DeviceConnection; 21 | import net.ioncannon.ap4j.model.DeviceResponse; 22 | import net.ioncannon.ap4j.command.*; 23 | import net.ioncannon.ap4j.main.Main; 24 | 25 | /** 26 | * Copyright (c) 2011 Carson McDonald 27 | * 28 | * Permission is hereby granted, free of charge, to any person obtaining a copy 29 | * of this software and associated documentation files (the "Software"), to deal 30 | * in the Software without restriction, including without limitation the rights 31 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 32 | * copies of the Software, and to permit persons to whom the Software is 33 | * furnished to do so, subject to the following conditions: 34 | * 35 | * The above copyright notice and this permission notice shall be included in 36 | * all copies or substantial portions of the Software. 37 | * 38 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 39 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 40 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 41 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 42 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 43 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 44 | * THE SOFTWARE. 45 | */ 46 | 47 | public class JettyCommandService extends AbstractHandler 48 | { 49 | private static Logger logger = Logger.getLogger(JettyCommandService.class.getName()); 50 | 51 | private static Map deviceMap = new HashMap(); 52 | 53 | public static void addDevice(Device device) 54 | { 55 | if (!deviceMap.containsKey(device.getId())) 56 | { 57 | deviceMap.put(device.getId(), device); 58 | } 59 | } 60 | 61 | public static void removeDevice(String deviceId) 62 | { 63 | if (deviceMap.containsKey(deviceId)) 64 | { 65 | Device removedDevice = deviceMap.remove(deviceId); 66 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(removedDevice); 67 | if (deviceConnection != null) 68 | { 69 | deviceConnection.close(); 70 | } 71 | } 72 | } 73 | 74 | private void sendOKResponse(Request baseRequest, HttpServletResponse response) throws IOException 75 | { 76 | response.setStatus(HttpServletResponse.SC_OK); 77 | baseRequest.setHandled(true); 78 | Map responseMap = new HashMap(); 79 | responseMap.put("responseCode", "OK"); 80 | response.getWriter().println(JSON.toString(responseMap)); 81 | } 82 | 83 | private void sendErrorResponse(int statusCode, String errorMessage, Request baseRequest, HttpServletResponse response) throws IOException 84 | { 85 | response.setStatus(statusCode); 86 | baseRequest.setHandled(true); 87 | Map responseMap = new HashMap(); 88 | responseMap.put("responseCode", "ERROR"); 89 | responseMap.put("errorMessage", errorMessage); 90 | response.getWriter().println(JSON.toString(responseMap)); 91 | } 92 | 93 | public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException 94 | { 95 | if ("/ci".equals(request.getRequestURI())) 96 | { 97 | try 98 | { 99 | handleCommandRequest(baseRequest, request, response); 100 | } 101 | catch (RuntimeException e) 102 | { 103 | logger.log(Level.SEVERE, e.getMessage(), e); 104 | Main.shutdown(); 105 | } 106 | } 107 | } 108 | 109 | private void handleCommandRequest(Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException 110 | { 111 | response.setContentType("application/json;charset=utf-8"); 112 | 113 | switch (Integer.parseInt(request.getParameter("t"))) 114 | { 115 | case 1: // List devices 116 | { 117 | response.setStatus(HttpServletResponse.SC_OK); 118 | baseRequest.setHandled(true); 119 | 120 | List> deviceList = new ArrayList>(); 121 | for (Device device : deviceMap.values()) 122 | { 123 | Map responseMap = new HashMap(); 124 | responseMap.put("deviceId", device.getId()); 125 | responseMap.put("deviceName", device.getName()); 126 | deviceList.add(responseMap); 127 | } 128 | 129 | Map responseMap = new HashMap(); 130 | responseMap.put("responseCode", "OK"); 131 | responseMap.put("devices", deviceList); 132 | response.getWriter().println(JSON.toString(responseMap)); 133 | } 134 | break; 135 | case 2: // Start stream 136 | { 137 | String deviceId = request.getParameter("d"); 138 | String streamURL = request.getParameter("s"); 139 | 140 | Device device = deviceMap.get(deviceId); 141 | if(device == null) 142 | { 143 | logger.log(Level.SEVERE, "Device ID is not valid: " + deviceId); 144 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Device ID is not valid: " + deviceId, baseRequest, response); 145 | } 146 | else 147 | { 148 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(device); 149 | 150 | DeviceResponse deviceResponse = deviceConnection.sendCommand(new PlayCommand(URLDecoder.decode(streamURL, "utf-8"), 0.0)); 151 | 152 | if (deviceResponse.getResponseCode() == 200) 153 | { 154 | sendOKResponse(baseRequest, response); 155 | } 156 | else 157 | { 158 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, deviceResponse.getResponseMessage(), baseRequest, response); 159 | } 160 | } 161 | } 162 | break; 163 | case 3: // Stop stream 164 | { 165 | String deviceId = request.getParameter("d"); 166 | 167 | Device device = deviceMap.get(deviceId); 168 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(device); 169 | 170 | DeviceResponse deviceResponse = deviceConnection.sendCommand(new StopCommand()); 171 | 172 | if (deviceResponse.getResponseCode() == 200) 173 | { 174 | sendOKResponse(baseRequest, response); 175 | } 176 | else 177 | { 178 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, deviceResponse.getResponseMessage(), baseRequest, response); 179 | } 180 | } 181 | break; 182 | case 4: // Get current content play state 183 | { 184 | String deviceId = request.getParameter("d"); 185 | 186 | Device device = deviceMap.get(deviceId); 187 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(device); 188 | 189 | DeviceResponse deviceResponse = deviceConnection.sendCommand(new ScrubCommand()); 190 | 191 | if (deviceResponse.getResponseCode() == 200) 192 | { 193 | response.setStatus(HttpServletResponse.SC_OK); 194 | baseRequest.setHandled(true); 195 | Map responseMap = new HashMap(); 196 | responseMap.put("responseCode", "OK"); 197 | responseMap.put("duration", deviceResponse.getContentParameterMap().get("duration")); 198 | responseMap.put("position", deviceResponse.getContentParameterMap().get("position")); 199 | response.getWriter().println(JSON.toString(responseMap)); 200 | } 201 | else 202 | { 203 | logger.log(Level.INFO, "Error response: code=" + deviceResponse.getResponseCode() + " message=" + deviceResponse.getResponseMessage()); 204 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, deviceResponse.getResponseMessage(), baseRequest, response); 205 | } 206 | } 207 | break; 208 | case 5: // Change the rate of playback 209 | { 210 | String deviceId = request.getParameter("d"); 211 | double rate = 0.0; 212 | boolean rateParsed = false; 213 | try 214 | { 215 | rate = Double.parseDouble(request.getParameter("r")); 216 | rateParsed = true; 217 | } 218 | catch (NumberFormatException e) 219 | { 220 | logger.log(Level.INFO, "Could not parse rate parameter: " + request.getParameter("r")); 221 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Rate is not valid.", baseRequest, response); 222 | } 223 | 224 | if(rateParsed) 225 | { 226 | Device device = deviceMap.get(deviceId); 227 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(device); 228 | 229 | DeviceResponse deviceResponse = deviceConnection.sendCommand(new RateCommand(rate)); 230 | 231 | if (deviceResponse.getResponseCode() == 200) 232 | { 233 | sendOKResponse(baseRequest, response); 234 | } 235 | else 236 | { 237 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, deviceResponse.getResponseMessage(), baseRequest, response); 238 | } 239 | } 240 | } 241 | break; 242 | case 6: // Scrub to the given location in the stream 243 | { 244 | String deviceId = request.getParameter("d"); 245 | 246 | boolean scrubToParsed = false; 247 | double scrubTo = 0.0; 248 | try 249 | { 250 | scrubTo = Double.parseDouble(request.getParameter("p")); 251 | scrubToParsed = true; 252 | } 253 | catch (NumberFormatException e) 254 | { 255 | logger.log(Level.INFO, "Could not parse position parameter: " + request.getParameter("p")); 256 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Position is not valid.", baseRequest, response); 257 | } 258 | 259 | if(scrubToParsed) 260 | { 261 | Device device = deviceMap.get(deviceId); 262 | DeviceConnection deviceConnection = DeviceConnectionService.getConnection(device); 263 | 264 | DeviceResponse deviceResponse = deviceConnection.sendCommand(new ScrubCommand(scrubTo)); 265 | 266 | if (deviceResponse.getResponseCode() == 200) 267 | { 268 | response.setStatus(HttpServletResponse.SC_OK); 269 | baseRequest.setHandled(true); 270 | Map responseMap = new HashMap(); 271 | responseMap.put("responseCode", "OK"); 272 | responseMap.put("duration", deviceResponse.getContentParameterMap().get("duration")); 273 | responseMap.put("position", deviceResponse.getContentParameterMap().get("position")); 274 | response.getWriter().println(JSON.toString(responseMap)); 275 | } 276 | else 277 | { 278 | logger.log(Level.INFO, "Error response: code=" + deviceResponse.getResponseCode() + " message=" + deviceResponse.getResponseMessage()); 279 | sendErrorResponse(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, deviceResponse.getResponseMessage(), baseRequest, response); 280 | } 281 | } 282 | } 283 | break; 284 | default: 285 | { 286 | logger.info("Command not understood: " + request.getParameter("t")); 287 | sendErrorResponse(HttpServletResponse.SC_NOT_ACCEPTABLE, "Command not understood.", baseRequest, response); 288 | } 289 | } 290 | } 291 | } 292 | -------------------------------------------------------------------------------- /lib/jetty.LICENSE-ECLIPSE-1.0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Eclipse Public License - Version 1.0 10 | 29 | 75 | 76 | 77 |
78 | 79 |

Eclipse Public License - v 1.0 80 |

81 | 82 |

THE ACCOMPANYING PROGRAM IS PROVIDED UNDER 83 | THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, 84 | REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE 85 | OF THIS AGREEMENT.

86 | 87 |

1. DEFINITIONS

88 | 89 |

"Contribution" means:

90 | 91 |

a) 92 | in the case of the initial Contributor, the initial code and documentation 93 | distributed under this Agreement, and
94 | b) in the case of each subsequent Contributor:

95 | 96 |

i) 97 | changes to the Program, and

98 | 99 |

ii) 100 | additions to the Program;

101 | 102 |

where 103 | such changes and/or additions to the Program originate from and are distributed 104 | by that particular Contributor. A Contribution 'originates' from a Contributor 105 | if it was added to the Program by such Contributor itself or anyone acting on 106 | such Contributor's behalf. Contributions do not include additions to the 107 | Program which: (i) are separate modules of software distributed in conjunction 108 | with the Program under their own license agreement, and (ii) are not derivative 109 | works of the Program.

110 | 111 |

"Contributor" means any person or 112 | entity that distributes the Program.

113 | 114 |

"Licensed Patents " mean patent 115 | claims licensable by a Contributor which are necessarily infringed by the use 116 | or sale of its Contribution alone or when combined with the Program.

117 | 118 |

"Program" means the Contributions 119 | distributed in accordance with this Agreement.

120 | 121 |

"Recipient" means anyone who 122 | receives the Program under this Agreement, including all Contributors.

123 | 124 |

2. GRANT OF RIGHTS

125 | 126 |

a) 127 | Subject to the terms of this Agreement, each Contributor hereby grants Recipient 128 | a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly 129 | display, publicly perform, distribute and sublicense the Contribution of such 130 | Contributor, if any, and such derivative works, in source code and object code 131 | form.

132 | 133 |

b) 134 | Subject to the terms of this Agreement, each Contributor hereby grants 135 | Recipient a non-exclusive, worldwide, royalty-free 136 | patent license under Licensed Patents to make, use, sell, offer to sell, import 137 | and otherwise transfer the Contribution of such Contributor, if any, in source 138 | code and object code form. This patent license shall apply to the combination 139 | of the Contribution and the Program if, at the time the Contribution is added 140 | by the Contributor, such addition of the Contribution causes such combination 141 | to be covered by the Licensed Patents. The patent license shall not apply to 142 | any other combinations which include the Contribution. No hardware per se is 143 | licensed hereunder.

144 | 145 |

c) 146 | Recipient understands that although each Contributor grants the licenses to its 147 | Contributions set forth herein, no assurances are provided by any Contributor 148 | that the Program does not infringe the patent or other intellectual property 149 | rights of any other entity. Each Contributor disclaims any liability to Recipient 150 | for claims brought by any other entity based on infringement of intellectual 151 | property rights or otherwise. As a condition to exercising the rights and 152 | licenses granted hereunder, each Recipient hereby assumes sole responsibility 153 | to secure any other intellectual property rights needed, if any. For example, 154 | if a third party patent license is required to allow Recipient to distribute 155 | the Program, it is Recipient's responsibility to acquire that license before 156 | distributing the Program.

157 | 158 |

d) 159 | Each Contributor represents that to its knowledge it has sufficient copyright 160 | rights in its Contribution, if any, to grant the copyright license set forth in 161 | this Agreement.

162 | 163 |

3. REQUIREMENTS

164 | 165 |

A Contributor may choose to distribute the 166 | Program in object code form under its own license agreement, provided that: 167 |

168 | 169 |

a) 170 | it complies with the terms and conditions of this Agreement; and

171 | 172 |

b) 173 | its license agreement:

174 | 175 |

i) 176 | effectively disclaims on behalf of all Contributors all warranties and 177 | conditions, express and implied, including warranties or conditions of title 178 | and non-infringement, and implied warranties or conditions of merchantability 179 | and fitness for a particular purpose;

180 | 181 |

ii) 182 | effectively excludes on behalf of all Contributors all liability for damages, 183 | including direct, indirect, special, incidental and consequential damages, such 184 | as lost profits;

185 | 186 |

iii) 187 | states that any provisions which differ from this Agreement are offered by that 188 | Contributor alone and not by any other party; and

189 | 190 |

iv) 191 | states that source code for the Program is available from such Contributor, and 192 | informs licensees how to obtain it in a reasonable manner on or through a 193 | medium customarily used for software exchange.

194 | 195 |

When the Program is made available in source 196 | code form:

197 | 198 |

a) 199 | it must be made available under this Agreement; and

200 | 201 |

b) a 202 | copy of this Agreement must be included with each copy of the Program.

203 | 204 |

Contributors may not remove or alter any 205 | copyright notices contained within the Program.

206 | 207 |

Each Contributor must identify itself as the 208 | originator of its Contribution, if any, in a manner that reasonably allows 209 | subsequent Recipients to identify the originator of the Contribution.

210 | 211 |

4. COMMERCIAL DISTRIBUTION

212 | 213 |

Commercial distributors of software may 214 | accept certain responsibilities with respect to end users, business partners 215 | and the like. While this license is intended to facilitate the commercial use 216 | of the Program, the Contributor who includes the Program in a commercial 217 | product offering should do so in a manner which does not create potential 218 | liability for other Contributors. Therefore, if a Contributor includes the 219 | Program in a commercial product offering, such Contributor ("Commercial 220 | Contributor") hereby agrees to defend and indemnify every other 221 | Contributor ("Indemnified Contributor") against any losses, damages and 222 | costs (collectively "Losses") arising from claims, lawsuits and other 223 | legal actions brought by a third party against the Indemnified Contributor to 224 | the extent caused by the acts or omissions of such Commercial Contributor in 225 | connection with its distribution of the Program in a commercial product 226 | offering. The obligations in this section do not apply to any claims or Losses 227 | relating to any actual or alleged intellectual property infringement. In order 228 | to qualify, an Indemnified Contributor must: a) promptly notify the Commercial 229 | Contributor in writing of such claim, and b) allow the Commercial Contributor 230 | to control, and cooperate with the Commercial Contributor in, the defense and 231 | any related settlement negotiations. The Indemnified Contributor may participate 232 | in any such claim at its own expense.

233 | 234 |

For example, a Contributor might include the 235 | Program in a commercial product offering, Product X. That Contributor is then a 236 | Commercial Contributor. If that Commercial Contributor then makes performance 237 | claims, or offers warranties related to Product X, those performance claims and 238 | warranties are such Commercial Contributor's responsibility alone. Under this 239 | section, the Commercial Contributor would have to defend claims against the 240 | other Contributors related to those performance claims and warranties, and if a 241 | court requires any other Contributor to pay any damages as a result, the 242 | Commercial Contributor must pay those damages.

243 | 244 |

5. NO WARRANTY

245 | 246 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS 247 | AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT 248 | WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, 249 | WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 250 | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely 251 | responsible for determining the appropriateness of using and distributing the 252 | Program and assumes all risks associated with its exercise of rights under this 253 | Agreement , including but not limited to the risks and costs of program errors, 254 | compliance with applicable laws, damage to or loss of data, programs or 255 | equipment, and unavailability or interruption of operations.

256 | 257 |

6. DISCLAIMER OF LIABILITY

258 | 259 |

EXCEPT AS EXPRESSLY SET FORTH IN THIS 260 | AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR 261 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 262 | (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY 263 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 264 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF 265 | THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF 266 | THE POSSIBILITY OF SUCH DAMAGES.

267 | 268 |

7. GENERAL

269 | 270 |

If any provision of this Agreement is invalid 271 | or unenforceable under applicable law, it shall not affect the validity or 272 | enforceability of the remainder of the terms of this Agreement, and without 273 | further action by the parties hereto, such provision shall be reformed to the 274 | minimum extent necessary to make such provision valid and enforceable.

275 | 276 |

If Recipient institutes patent litigation 277 | against any entity (including a cross-claim or counterclaim in a lawsuit) 278 | alleging that the Program itself (excluding combinations of the Program with 279 | other software or hardware) infringes such Recipient's patent(s), then such 280 | Recipient's rights granted under Section 2(b) shall terminate as of the date 281 | such litigation is filed.

282 | 283 |

All Recipient's rights under this Agreement 284 | shall terminate if it fails to comply with any of the material terms or 285 | conditions of this Agreement and does not cure such failure in a reasonable 286 | period of time after becoming aware of such noncompliance. If all Recipient's 287 | rights under this Agreement terminate, Recipient agrees to cease use and 288 | distribution of the Program as soon as reasonably practicable. However, 289 | Recipient's obligations under this Agreement and any licenses granted by 290 | Recipient relating to the Program shall continue and survive.

291 | 292 |

Everyone is permitted to copy and distribute 293 | copies of this Agreement, but in order to avoid inconsistency the Agreement is 294 | copyrighted and may only be modified in the following manner. The Agreement 295 | Steward reserves the right to publish new versions (including revisions) of 296 | this Agreement from time to time. No one other than the Agreement Steward has 297 | the right to modify this Agreement. The Eclipse Foundation is the initial 298 | Agreement Steward. The Eclipse Foundation may assign the responsibility to 299 | serve as the Agreement Steward to a suitable separate entity. Each new version 300 | of the Agreement will be given a distinguishing version number. The Program 301 | (including Contributions) may always be distributed subject to the version of 302 | the Agreement under which it was received. In addition, after a new version of 303 | the Agreement is published, Contributor may elect to distribute the Program 304 | (including its Contributions) under the new version. Except as expressly stated 305 | in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to 306 | the intellectual property of any Contributor under this Agreement, whether 307 | expressly, by implication, estoppel or otherwise. All rights in the Program not 308 | expressly granted under this Agreement are reserved.

309 | 310 |

This Agreement is governed by the laws of the 311 | State of New York and the intellectual property laws of the United States of 312 | America. No party to this Agreement will bring a legal action under this 313 | Agreement more than one year after the cause of action arose. Each party waives 314 | its rights to a jury trial in any resulting litigation.

315 | 316 |

 

317 | 318 |
319 | 320 | -------------------------------------------------------------------------------- /lib/jmdns.LICENSE-LGPL.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | -------------------------------------------------------------------------------- /resource/jquery-ui-1.8.7.custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery UI CSS Framework 1.8.7 3 | * 4 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 17 | .ui-helper-clearfix { display: inline-block; } 18 | /* required comment for clearfix to work in Opera \*/ 19 | * html .ui-helper-clearfix { height:1%; } 20 | .ui-helper-clearfix { display:block; } 21 | /* end clearfix */ 22 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 23 | 24 | 25 | /* Interaction Cues 26 | ----------------------------------*/ 27 | .ui-state-disabled { cursor: default !important; } 28 | 29 | 30 | /* Icons 31 | ----------------------------------*/ 32 | 33 | /* states and images */ 34 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 35 | 36 | 37 | /* Misc visuals 38 | ----------------------------------*/ 39 | 40 | /* Overlays */ 41 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 42 | 43 | 44 | /* 45 | * jQuery UI CSS Framework 1.8.7 46 | * 47 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 48 | * Dual licensed under the MIT or GPL Version 2 licenses. 49 | * http://jquery.org/license 50 | * 51 | * http://docs.jquery.com/UI/Theming/API 52 | * 53 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px 54 | */ 55 | 56 | 57 | /* Component containers 58 | ----------------------------------*/ 59 | .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } 60 | .ui-widget .ui-widget { font-size: 1em; } 61 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } 62 | .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } 63 | .ui-widget-content a { color: #333333; } 64 | .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } 65 | .ui-widget-header a { color: #ffffff; } 66 | 67 | /* Interaction states 68 | ----------------------------------*/ 69 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } 70 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } 71 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } 72 | .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } 73 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } 74 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } 75 | .ui-widget :active { outline: none; } 76 | 77 | /* Interaction Cues 78 | ----------------------------------*/ 79 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } 80 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 81 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } 82 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } 83 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } 84 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 85 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 86 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 87 | 88 | /* Icons 89 | ----------------------------------*/ 90 | 91 | /* states and images */ 92 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 93 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 94 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 95 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } 96 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 97 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 98 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } 99 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } 100 | 101 | /* positioning */ 102 | .ui-icon-carat-1-n { background-position: 0 0; } 103 | .ui-icon-carat-1-ne { background-position: -16px 0; } 104 | .ui-icon-carat-1-e { background-position: -32px 0; } 105 | .ui-icon-carat-1-se { background-position: -48px 0; } 106 | .ui-icon-carat-1-s { background-position: -64px 0; } 107 | .ui-icon-carat-1-sw { background-position: -80px 0; } 108 | .ui-icon-carat-1-w { background-position: -96px 0; } 109 | .ui-icon-carat-1-nw { background-position: -112px 0; } 110 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 111 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 112 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 113 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 114 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 115 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 116 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 117 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 118 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 119 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 120 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 121 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 122 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 123 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 124 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 125 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 126 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 127 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 128 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 129 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 130 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 131 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 132 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 133 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 134 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 135 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 136 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 137 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 138 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 139 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 140 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 141 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 142 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 143 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 144 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 145 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 146 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 147 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 148 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 149 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 150 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 151 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 152 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 153 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 154 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 155 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 156 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 157 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 158 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 159 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 160 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 161 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 162 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 163 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 164 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 165 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 166 | .ui-icon-arrow-4 { background-position: 0 -80px; } 167 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 168 | .ui-icon-extlink { background-position: -32px -80px; } 169 | .ui-icon-newwin { background-position: -48px -80px; } 170 | .ui-icon-refresh { background-position: -64px -80px; } 171 | .ui-icon-shuffle { background-position: -80px -80px; } 172 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 173 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 174 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 175 | .ui-icon-folder-open { background-position: -16px -96px; } 176 | .ui-icon-document { background-position: -32px -96px; } 177 | .ui-icon-document-b { background-position: -48px -96px; } 178 | .ui-icon-note { background-position: -64px -96px; } 179 | .ui-icon-mail-closed { background-position: -80px -96px; } 180 | .ui-icon-mail-open { background-position: -96px -96px; } 181 | .ui-icon-suitcase { background-position: -112px -96px; } 182 | .ui-icon-comment { background-position: -128px -96px; } 183 | .ui-icon-person { background-position: -144px -96px; } 184 | .ui-icon-print { background-position: -160px -96px; } 185 | .ui-icon-trash { background-position: -176px -96px; } 186 | .ui-icon-locked { background-position: -192px -96px; } 187 | .ui-icon-unlocked { background-position: -208px -96px; } 188 | .ui-icon-bookmark { background-position: -224px -96px; } 189 | .ui-icon-tag { background-position: -240px -96px; } 190 | .ui-icon-home { background-position: 0 -112px; } 191 | .ui-icon-flag { background-position: -16px -112px; } 192 | .ui-icon-calendar { background-position: -32px -112px; } 193 | .ui-icon-cart { background-position: -48px -112px; } 194 | .ui-icon-pencil { background-position: -64px -112px; } 195 | .ui-icon-clock { background-position: -80px -112px; } 196 | .ui-icon-disk { background-position: -96px -112px; } 197 | .ui-icon-calculator { background-position: -112px -112px; } 198 | .ui-icon-zoomin { background-position: -128px -112px; } 199 | .ui-icon-zoomout { background-position: -144px -112px; } 200 | .ui-icon-search { background-position: -160px -112px; } 201 | .ui-icon-wrench { background-position: -176px -112px; } 202 | .ui-icon-gear { background-position: -192px -112px; } 203 | .ui-icon-heart { background-position: -208px -112px; } 204 | .ui-icon-star { background-position: -224px -112px; } 205 | .ui-icon-link { background-position: -240px -112px; } 206 | .ui-icon-cancel { background-position: 0 -128px; } 207 | .ui-icon-plus { background-position: -16px -128px; } 208 | .ui-icon-plusthick { background-position: -32px -128px; } 209 | .ui-icon-minus { background-position: -48px -128px; } 210 | .ui-icon-minusthick { background-position: -64px -128px; } 211 | .ui-icon-close { background-position: -80px -128px; } 212 | .ui-icon-closethick { background-position: -96px -128px; } 213 | .ui-icon-key { background-position: -112px -128px; } 214 | .ui-icon-lightbulb { background-position: -128px -128px; } 215 | .ui-icon-scissors { background-position: -144px -128px; } 216 | .ui-icon-clipboard { background-position: -160px -128px; } 217 | .ui-icon-copy { background-position: -176px -128px; } 218 | .ui-icon-contact { background-position: -192px -128px; } 219 | .ui-icon-image { background-position: -208px -128px; } 220 | .ui-icon-video { background-position: -224px -128px; } 221 | .ui-icon-script { background-position: -240px -128px; } 222 | .ui-icon-alert { background-position: 0 -144px; } 223 | .ui-icon-info { background-position: -16px -144px; } 224 | .ui-icon-notice { background-position: -32px -144px; } 225 | .ui-icon-help { background-position: -48px -144px; } 226 | .ui-icon-check { background-position: -64px -144px; } 227 | .ui-icon-bullet { background-position: -80px -144px; } 228 | .ui-icon-radio-off { background-position: -96px -144px; } 229 | .ui-icon-radio-on { background-position: -112px -144px; } 230 | .ui-icon-pin-w { background-position: -128px -144px; } 231 | .ui-icon-pin-s { background-position: -144px -144px; } 232 | .ui-icon-play { background-position: 0 -160px; } 233 | .ui-icon-pause { background-position: -16px -160px; } 234 | .ui-icon-seek-next { background-position: -32px -160px; } 235 | .ui-icon-seek-prev { background-position: -48px -160px; } 236 | .ui-icon-seek-end { background-position: -64px -160px; } 237 | .ui-icon-seek-start { background-position: -80px -160px; } 238 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 239 | .ui-icon-seek-first { background-position: -80px -160px; } 240 | .ui-icon-stop { background-position: -96px -160px; } 241 | .ui-icon-eject { background-position: -112px -160px; } 242 | .ui-icon-volume-off { background-position: -128px -160px; } 243 | .ui-icon-volume-on { background-position: -144px -160px; } 244 | .ui-icon-power { background-position: 0 -176px; } 245 | .ui-icon-signal-diag { background-position: -16px -176px; } 246 | .ui-icon-signal { background-position: -32px -176px; } 247 | .ui-icon-battery-0 { background-position: -48px -176px; } 248 | .ui-icon-battery-1 { background-position: -64px -176px; } 249 | .ui-icon-battery-2 { background-position: -80px -176px; } 250 | .ui-icon-battery-3 { background-position: -96px -176px; } 251 | .ui-icon-circle-plus { background-position: 0 -192px; } 252 | .ui-icon-circle-minus { background-position: -16px -192px; } 253 | .ui-icon-circle-close { background-position: -32px -192px; } 254 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 255 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 256 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 257 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 258 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 259 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 260 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 261 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 262 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 263 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 264 | .ui-icon-circle-check { background-position: -208px -192px; } 265 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 266 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 267 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 268 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 269 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 270 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 271 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 272 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 273 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 274 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 275 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 276 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 277 | 278 | 279 | /* Misc visuals 280 | ----------------------------------*/ 281 | 282 | /* Corner radius */ 283 | .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } 284 | .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 285 | .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 286 | .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 287 | .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } 288 | .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 289 | .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 290 | .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 291 | .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } 292 | 293 | /* Overlays */ 294 | .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } 295 | .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* 296 | * jQuery UI Resizable 1.8.7 297 | * 298 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 299 | * Dual licensed under the MIT or GPL Version 2 licenses. 300 | * http://jquery.org/license 301 | * 302 | * http://docs.jquery.com/UI/Resizable#theming 303 | */ 304 | .ui-resizable { position: relative;} 305 | .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} 306 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 307 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 308 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 309 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 310 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 311 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 312 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 313 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 314 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* 315 | * jQuery UI Selectable 1.8.7 316 | * 317 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 318 | * Dual licensed under the MIT or GPL Version 2 licenses. 319 | * http://jquery.org/license 320 | * 321 | * http://docs.jquery.com/UI/Selectable#theming 322 | */ 323 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 324 | /* 325 | * jQuery UI Accordion 1.8.7 326 | * 327 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 328 | * Dual licensed under the MIT or GPL Version 2 licenses. 329 | * http://jquery.org/license 330 | * 331 | * http://docs.jquery.com/UI/Accordion#theming 332 | */ 333 | /* IE/Win - Fix animation bug - #4615 */ 334 | .ui-accordion { width: 100%; } 335 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 336 | .ui-accordion .ui-accordion-li-fix { display: inline; } 337 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 338 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 339 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 340 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 341 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 342 | .ui-accordion .ui-accordion-content-active { display: block; }/* 343 | * jQuery UI Autocomplete 1.8.7 344 | * 345 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 346 | * Dual licensed under the MIT or GPL Version 2 licenses. 347 | * http://jquery.org/license 348 | * 349 | * http://docs.jquery.com/UI/Autocomplete#theming 350 | */ 351 | .ui-autocomplete { position: absolute; cursor: default; } 352 | 353 | /* workarounds */ 354 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 355 | 356 | /* 357 | * jQuery UI Menu 1.8.7 358 | * 359 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 360 | * Dual licensed under the MIT or GPL Version 2 licenses. 361 | * http://jquery.org/license 362 | * 363 | * http://docs.jquery.com/UI/Menu#theming 364 | */ 365 | .ui-menu { 366 | list-style:none; 367 | padding: 2px; 368 | margin: 0; 369 | display:block; 370 | float: left; 371 | } 372 | .ui-menu .ui-menu { 373 | margin-top: -3px; 374 | } 375 | .ui-menu .ui-menu-item { 376 | margin:0; 377 | padding: 0; 378 | zoom: 1; 379 | float: left; 380 | clear: left; 381 | width: 100%; 382 | } 383 | .ui-menu .ui-menu-item a { 384 | text-decoration:none; 385 | display:block; 386 | padding:.2em .4em; 387 | line-height:1.5; 388 | zoom:1; 389 | } 390 | .ui-menu .ui-menu-item a.ui-state-hover, 391 | .ui-menu .ui-menu-item a.ui-state-active { 392 | font-weight: normal; 393 | margin: -1px; 394 | } 395 | /* 396 | * jQuery UI Button 1.8.7 397 | * 398 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 399 | * Dual licensed under the MIT or GPL Version 2 licenses. 400 | * http://jquery.org/license 401 | * 402 | * http://docs.jquery.com/UI/Button#theming 403 | */ 404 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 405 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 406 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 407 | .ui-button-icons-only { width: 3.4em; } 408 | button.ui-button-icons-only { width: 3.7em; } 409 | 410 | /*button text element */ 411 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 412 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 413 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 414 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 415 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 416 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 417 | /* no icon support for input elements, provide padding by default */ 418 | input.ui-button { padding: .4em 1em; } 419 | 420 | /*button icon element(s) */ 421 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 422 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 423 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 424 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 425 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 426 | 427 | /*button sets*/ 428 | .ui-buttonset { margin-right: 7px; } 429 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 430 | 431 | /* workarounds */ 432 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 433 | /* 434 | * jQuery UI Dialog 1.8.7 435 | * 436 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 437 | * Dual licensed under the MIT or GPL Version 2 licenses. 438 | * http://jquery.org/license 439 | * 440 | * http://docs.jquery.com/UI/Dialog#theming 441 | */ 442 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 443 | .ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; } 444 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; } 445 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 446 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 447 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 448 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 449 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 450 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 451 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 452 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 453 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 454 | /* 455 | * jQuery UI Slider 1.8.7 456 | * 457 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 458 | * Dual licensed under the MIT or GPL Version 2 licenses. 459 | * http://jquery.org/license 460 | * 461 | * http://docs.jquery.com/UI/Slider#theming 462 | */ 463 | .ui-slider { position: relative; text-align: left; } 464 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 465 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 466 | 467 | .ui-slider-horizontal { height: .8em; } 468 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 469 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 470 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 471 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 472 | 473 | .ui-slider-vertical { width: .8em; height: 100px; } 474 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 475 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 476 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 477 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/* 478 | * jQuery UI Tabs 1.8.7 479 | * 480 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 481 | * Dual licensed under the MIT or GPL Version 2 licenses. 482 | * http://jquery.org/license 483 | * 484 | * http://docs.jquery.com/UI/Tabs#theming 485 | */ 486 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 487 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 488 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 489 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 490 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 491 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 492 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 493 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 494 | .ui-tabs .ui-tabs-hide { display: none !important; } 495 | /* 496 | * jQuery UI Datepicker 1.8.7 497 | * 498 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 499 | * Dual licensed under the MIT or GPL Version 2 licenses. 500 | * http://jquery.org/license 501 | * 502 | * http://docs.jquery.com/UI/Datepicker#theming 503 | */ 504 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 505 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 506 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 507 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 508 | .ui-datepicker .ui-datepicker-prev { left:2px; } 509 | .ui-datepicker .ui-datepicker-next { right:2px; } 510 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 511 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 512 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 513 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 514 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 515 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 516 | .ui-datepicker select.ui-datepicker-month, 517 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 518 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 519 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 520 | .ui-datepicker td { border: 0; padding: 1px; } 521 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 522 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 523 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 524 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 525 | 526 | /* with multiple calendars */ 527 | .ui-datepicker.ui-datepicker-multi { width:auto; } 528 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 529 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 530 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 531 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 532 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 533 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 534 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 535 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 536 | .ui-datepicker-row-break { clear:both; width:100%; } 537 | 538 | /* RTL support */ 539 | .ui-datepicker-rtl { direction: rtl; } 540 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 541 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 542 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 543 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 544 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 545 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 546 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 547 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 548 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 549 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 550 | 551 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 552 | .ui-datepicker-cover { 553 | display: none; /*sorry for IE5*/ 554 | display/**/: block; /*sorry for IE5*/ 555 | position: absolute; /*must have*/ 556 | z-index: -1; /*must have*/ 557 | filter: mask(); /*must have*/ 558 | top: -4px; /*must have*/ 559 | left: -4px; /*must have*/ 560 | width: 200px; /*must have*/ 561 | height: 200px; /*must have*/ 562 | }/* 563 | * jQuery UI Progressbar 1.8.7 564 | * 565 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 566 | * Dual licensed under the MIT or GPL Version 2 licenses. 567 | * http://jquery.org/license 568 | * 569 | * http://docs.jquery.com/UI/Progressbar#theming 570 | */ 571 | .ui-progressbar { height:2em; text-align: left; } 572 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } --------------------------------------------------------------------------------