├── platforms ├── ios │ ├── CordovaLib │ │ ├── VERSION │ │ ├── CordovaLib.xcodeproj │ │ │ └── xcuserdata │ │ │ │ └── adrien.xcuserdatad │ │ │ │ └── xcschemes │ │ │ │ └── xcschememanagement.plist │ │ ├── CordovaLib_Prefix.pch │ │ └── Classes │ │ │ ├── CDVTimer.h │ │ │ ├── NSArray+Comparisons.h │ │ │ ├── NSData+Base64.h │ │ │ ├── NSMutableArray+QueueAdditions.h │ │ │ ├── CDVJSON.h │ │ │ ├── CDVDebug.h │ │ │ ├── CDVShared.h │ │ │ ├── CDVScreenOrientationDelegate.h │ │ │ ├── CDVURLProtocol.h │ │ │ ├── CDVUserAgentUtil.h │ │ │ ├── UIDevice+Extensions.h │ │ │ ├── CDVWhitelist.h │ │ │ ├── CDVConfigParser.h │ │ │ ├── CDVCommandDelegateImpl.h │ │ │ ├── NSArray+Comparisons.m │ │ │ ├── CDVCommandQueue.h │ │ │ ├── CDV.h │ │ │ ├── NSDictionary+Extensions.h │ │ │ ├── NSMutableArray+QueueAdditions.m │ │ │ └── UIDevice+Extensions.m │ ├── .gitignore │ ├── YoutubeVideoPlayerProject │ │ ├── .gitignore │ │ ├── Resources │ │ │ ├── icons │ │ │ │ ├── icon.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-50.png │ │ │ │ ├── icon-60.png │ │ │ │ ├── icon-72.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon@2x.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-50@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-72@2x.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ ├── icon-small.png │ │ │ │ └── icon-small@2x.png │ │ │ ├── splash │ │ │ │ ├── Default~iphone.png │ │ │ │ ├── Default@2x~iphone.png │ │ │ │ ├── Default-568h@2x~iphone.png │ │ │ │ ├── Default-Landscape~ipad.png │ │ │ │ ├── Default-Portrait~ipad.png │ │ │ │ ├── Default-Portrait@2x~ipad.png │ │ │ │ └── Default-Landscape@2x~ipad.png │ │ │ ├── en.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── se.lproj │ │ │ │ └── Localizable.strings │ │ │ ├── es.lproj │ │ │ │ └── Localizable.strings │ │ │ └── de.lproj │ │ │ │ └── Localizable.strings │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ ├── icon-small.png │ │ │ │ ├── icon-small@2x.png │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage │ │ │ │ ├── Default@2x~iphone.png │ │ │ │ ├── Default-568h@2x~iphone.png │ │ │ │ └── Contents.json │ │ ├── Plugins │ │ │ ├── com.bunkerpalace.cordova.YoutubeVideoPlayer │ │ │ │ ├── YoutubeVideoPlayer.h │ │ │ │ ├── XCDYouTubePlayerScript.h │ │ │ │ ├── XCDYouTubeKit.h │ │ │ │ ├── XCDYouTubeVideoWebpage.h │ │ │ │ ├── XCDYouTubeOperation.h │ │ │ │ ├── XCDYouTubeVideo+Private.h │ │ │ │ ├── YoutubeVideoPlayer.m │ │ │ │ └── XCDYouTubeError.h │ │ │ ├── README │ │ │ └── org.apache.cordova.console │ │ │ │ ├── CDVLogger.h │ │ │ │ └── CDVLogger.m │ │ ├── YoutubeVideoPlayerProject-Prefix.pch │ │ ├── main.m │ │ ├── Classes │ │ │ ├── MainViewController.h │ │ │ └── AppDelegate.h │ │ └── YoutubeVideoPlayerProject-Info.plist │ ├── YoutubeVideoPlayerProject.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── adrien.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcuserdata │ │ │ └── adrien.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ ├── cordova │ │ ├── build.xcconfig │ │ ├── log │ │ ├── apple_xcode_version │ │ ├── apple_ios_version │ │ ├── apple_osx_version │ │ ├── lib │ │ │ ├── list-devices │ │ │ ├── sim.applescript │ │ │ ├── start-emulator │ │ │ ├── list-started-emulators │ │ │ └── list-emulator-images │ │ ├── check_reqs │ │ ├── version │ │ └── clean │ └── www │ │ ├── js │ │ └── index.js │ │ ├── plugins │ │ └── com.bunkerpalace.cordova.YoutubeVideoPlayer │ │ │ └── www │ │ │ └── YoutubeVideoPlayer.js │ │ └── cordova_plugins.js └── android │ ├── cordova │ ├── node_modules │ │ ├── .bin │ │ │ └── shjs │ │ ├── shelljs │ │ │ ├── .npmignore │ │ │ ├── src │ │ │ │ ├── popd.js │ │ │ │ ├── pushd.js │ │ │ │ ├── pwd.js │ │ │ │ ├── error.js │ │ │ │ ├── cd.js │ │ │ │ ├── echo.js │ │ │ │ ├── toEnd.js │ │ │ │ ├── to.js │ │ │ │ ├── cat.js │ │ │ │ ├── sed.js │ │ │ │ ├── find.js │ │ │ │ └── grep.js │ │ │ ├── .travis.yml │ │ │ ├── .documentup.json │ │ │ ├── global.js │ │ │ ├── .jshintrc │ │ │ ├── scripts │ │ │ │ ├── generate-docs.js │ │ │ │ └── run-tests.js │ │ │ ├── make.js │ │ │ ├── bin │ │ │ │ └── shjs │ │ │ └── LICENSE │ │ └── q │ │ │ ├── queue.js │ │ │ ├── benchmark │ │ │ └── scenarios.js │ │ │ └── LICENSE │ ├── version │ ├── log.bat │ ├── run.bat │ ├── build.bat │ ├── clean.bat │ ├── version.bat │ ├── lib │ │ ├── list-devices.bat │ │ ├── install-device.bat │ │ ├── start-emulator.bat │ │ ├── install-emulator.bat │ │ ├── list-emulator-images.bat │ │ ├── list-started-emulators.bat │ │ ├── list-devices │ │ ├── list-emulator-images │ │ ├── list-started-emulators │ │ ├── clean.js │ │ ├── install-emulator │ │ ├── start-emulator │ │ ├── install-device │ │ └── exec.js │ ├── android_sdk_version │ ├── check_reqs │ ├── log │ ├── clean │ ├── defaults.xml │ ├── run │ └── build │ ├── res │ ├── drawable │ │ └── icon.png │ ├── drawable-hdpi │ │ └── icon.png │ ├── drawable-ldpi │ │ └── icon.png │ ├── drawable-mdpi │ │ └── icon.png │ ├── drawable-xhdpi │ │ └── icon.png │ ├── drawable-land-hdpi │ │ └── screen.png │ ├── drawable-land-ldpi │ │ └── screen.png │ ├── drawable-land-mdpi │ │ └── screen.png │ ├── drawable-land-xhdpi │ │ └── screen.png │ ├── drawable-port-hdpi │ │ └── screen.png │ ├── drawable-port-ldpi │ │ └── screen.png │ ├── drawable-port-mdpi │ │ └── screen.png │ ├── drawable-port-xhdpi │ │ └── screen.png │ ├── values │ │ └── strings.xml │ └── xml │ │ └── config.xml │ ├── libs │ └── openyoutubeactivity.jar │ ├── assets │ ├── _where-is-www.txt │ └── www │ │ ├── js │ │ └── index.js │ │ ├── cordova_plugins.js │ │ └── plugins │ │ └── com.bunkerpalace.cordova.YoutubeVideoPlayer │ │ └── www │ │ └── YoutubeVideoPlayer.js │ ├── local.properties │ ├── CordovaLib │ ├── local.properties │ ├── project.properties │ ├── proguard-project.txt │ ├── AndroidManifest.xml │ └── src │ │ ├── com │ │ └── squareup │ │ │ └── okhttp │ │ │ ├── internal │ │ │ ├── Dns.java │ │ │ ├── NamedRunnable.java │ │ │ ├── spdy │ │ │ │ ├── Variant.java │ │ │ │ ├── IncomingStreamHandler.java │ │ │ │ └── HeadersMode.java │ │ │ ├── AbstractOutputStream.java │ │ │ └── http │ │ │ │ └── Policy.java │ │ │ ├── ResponseSource.java │ │ │ └── Failure.java │ │ └── org │ │ └── apache │ │ └── cordova │ │ ├── DroidGap.java │ │ └── JSONUtils.java │ ├── project.properties │ ├── proguard-project.txt │ ├── src │ └── com │ │ └── bunkerpalace │ │ ├── cordova │ │ └── YoutubeVideoPlayer.java │ │ └── YoutubVideoPlayerProject │ │ └── YoutubeVideoPlayerProject.java │ ├── custom_rules.xml │ └── AndroidManifest.xml ├── plugins ├── org.apache.cordova.console │ ├── .fetch.json │ ├── NOTICE │ ├── src │ │ ├── ios │ │ │ ├── CDVLogger.h │ │ │ └── CDVLogger.m │ │ ├── ubuntu │ │ │ ├── console.cpp │ │ │ └── console.h │ │ └── wp │ │ │ └── DebugConsole.cs │ ├── README.md │ ├── doc │ │ ├── zh │ │ │ └── index.md │ │ ├── ja │ │ │ └── index.md │ │ ├── ko │ │ │ └── index.md │ │ ├── es │ │ │ └── index.md │ │ ├── index.md │ │ ├── it │ │ │ └── index.md │ │ ├── pl │ │ │ └── index.md │ │ ├── ru │ │ │ └── index.md │ │ ├── fr │ │ │ └── index.md │ │ └── de │ │ │ └── index.md │ └── CONTRIBUTING.md ├── com.bunkerpalace.cordova.YoutubeVideoPlayer │ ├── .fetch.json │ ├── plugin.xml │ └── www │ │ └── YoutubeVideoPlayer.js ├── android.json └── ios.json ├── www └── js │ └── index.js ├── config.xml ├── .gitignore ├── README.md └── LICENSE /platforms/ios/CordovaLib/VERSION: -------------------------------------------------------------------------------- 1 | 3.5.0 2 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/.bin/shjs: -------------------------------------------------------------------------------- 1 | ../shelljs/bin/shjs -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/.npmignore: -------------------------------------------------------------------------------- 1 | test/ 2 | tmp/ -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/popd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/pushd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js -------------------------------------------------------------------------------- /platforms/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.perspectivev3 3 | *.pbxuser 4 | .DS_Store 5 | build/ 6 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.perspectivev3 3 | *.pbxuser 4 | .DS_Store 5 | build/ 6 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/.documentup.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ShellJS", 3 | "twitter": [ 4 | "r2r" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /platforms/android/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable/icon.png -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"local","path":"/Users/adrien/.plugman/cache/org.apache.cordova.console/0.2.10/package"}} -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/global.js: -------------------------------------------------------------------------------- 1 | var shell = require('./shell.js'); 2 | for (var cmd in shell) 3 | global[cmd] = shell[cmd]; 4 | -------------------------------------------------------------------------------- /platforms/android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "loopfunc": true, 3 | "sub": true, 4 | "undef": true, 5 | "unused": true, 6 | "node": true 7 | } -------------------------------------------------------------------------------- /platforms/android/libs/openyoutubeactivity.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/libs/openyoutubeactivity.jar -------------------------------------------------------------------------------- /plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"git","url":"https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git","subdir":"."}} -------------------------------------------------------------------------------- /platforms/android/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-port-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-port-hdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-port-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-port-ldpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-port-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-port-mdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/drawable-port-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/android/res/drawable-port-xhdpi/screen.png -------------------------------------------------------------------------------- /platforms/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | YoutubeVideoPlayerProject 4 | 5 | -------------------------------------------------------------------------------- /platforms/android/assets/_where-is-www.txt: -------------------------------------------------------------------------------- 1 | To show `assets/www` or `res/xml/config.xml`, go to: 2 | Project -> Properties -> Resource -> Resource Filters 3 | And delete the exclusion filter. 4 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-40.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-50.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-60.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-72.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-76.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-40@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-50@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-60@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-72@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-76@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-small.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/icons/icon-small@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default~iphone.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Resources/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-small.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/icon-small@2x.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/LaunchImage.launchimage/Default@2x~iphone.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject.xcodeproj/project.xcworkspace/xcuserdata/adrien.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Glitchbone/CordovaYoutubeVideoPlayer/HEAD/platforms/ios/YoutubeVideoPlayerProject.xcodeproj/project.xcworkspace/xcuserdata/adrien.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/pwd.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var common = require('./common'); 3 | 4 | //@ 5 | //@ ### pwd() 6 | //@ Returns the current directory. 7 | function _pwd(options) { 8 | var pwd = path.resolve(process.cwd()); 9 | return common.ShellString(pwd); 10 | } 11 | module.exports = _pwd; 12 | -------------------------------------------------------------------------------- /platforms/ios/cordova/build.xcconfig: -------------------------------------------------------------------------------- 1 | // to list all installed iOS identities, run: 2 | // security find-identity | sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone' 3 | 4 | // generic 'iPhone Developer' (no quotes) will match the right Identity with the right Provisioning Profile plus Certificate, based on the app bundle id 5 | CODE_SIGN_IDENTITY = iPhone Developer -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/error.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | //@ 4 | //@ ### error() 5 | //@ Tests if error occurred in the last command. Returns `null` if no error occurred, 6 | //@ otherwise returns string explaining the error 7 | function error() { 8 | return common.state.error; 9 | }; 10 | module.exports = error; 11 | -------------------------------------------------------------------------------- /www/js/index.js: -------------------------------------------------------------------------------- 1 | var app = { 2 | initialize: function() { 3 | this.bindEvents(); 4 | }, 5 | bindEvents: function() { 6 | document.addEventListener('deviceready', this.onDeviceReady, false); 7 | }, 8 | onDeviceReady: function() { 9 | 10 | }, 11 | playVideo: function() { 12 | YoutubeVideoPlayer.openVideo('npjF032TDDQ'); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /platforms/ios/www/js/index.js: -------------------------------------------------------------------------------- 1 | var app = { 2 | initialize: function() { 3 | this.bindEvents(); 4 | }, 5 | bindEvents: function() { 6 | document.addEventListener('deviceready', this.onDeviceReady, false); 7 | }, 8 | onDeviceReady: function() { 9 | 10 | }, 11 | playVideo: function() { 12 | YoutubeVideoPlayer.openVideo('npjF032TDDQ'); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /platforms/android/assets/www/js/index.js: -------------------------------------------------------------------------------- 1 | var app = { 2 | initialize: function() { 3 | this.bindEvents(); 4 | }, 5 | bindEvents: function() { 6 | document.addEventListener('deviceready', this.onDeviceReady, false); 7 | }, 8 | onDeviceReady: function() { 9 | 10 | }, 11 | playVideo: function() { 12 | YoutubeVideoPlayer.openVideo('npjF032TDDQ'); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // YoutubeVideoPlayer.h 3 | // 4 | // Created by Adrien Girbone on 15/04/2014. 5 | // 6 | // 7 | 8 | #import 9 | #import "XCDYouTubeVideoPlayerViewController.h" 10 | 11 | @interface YoutubeVideoPlayer : CDVPlugin 12 | 13 | - (void)openVideo:(CDVInvokedUrlCommand*)command; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /platforms/android/local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/Applications/adt/sdk 11 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubePlayerScript.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import 6 | 7 | __attribute__((visibility("hidden"))) 8 | @interface XCDYouTubePlayerScript : NSObject 9 | 10 | - (instancetype) initWithString:(NSString *)string; 11 | 12 | - (NSString *) unscrambleSignature:(NSString *)scrambledSignature; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/Applications/adt/sdk 11 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubeKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import 6 | 7 | #import "XCDYouTubeClient.h" 8 | #import "XCDYouTubeError.h" 9 | #import "XCDYouTubeOperation.h" 10 | #import "XCDYouTubeVideo.h" 11 | #import "XCDYouTubeVideoOperation.h" 12 | 13 | #if TARGET_OS_IPHONE 14 | #import "XCDYouTubeVideoPlayerViewController.h" 15 | #endif 16 | -------------------------------------------------------------------------------- /plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/www/YoutubeVideoPlayer.js: -------------------------------------------------------------------------------- 1 | var exec = require('cordova/exec'); 2 | 3 | function YoutubeVideoPlayer() {} 4 | 5 | YoutubeVideoPlayer.prototype.openVideo = function(YTid) { 6 | exec(function(result) { 7 | console.log(result); 8 | }, 9 | function(error) { 10 | console.log(error); 11 | }, 12 | "YoutubeVideoPlayer", 13 | "openVideo", 14 | [YTid] 15 | ); 16 | } 17 | 18 | var YoutubeVideoPlayer = new YoutubeVideoPlayer(); 19 | module.exports = YoutubeVideoPlayer -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubeVideoWebpage.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import 6 | 7 | __attribute__((visibility("hidden"))) 8 | @interface XCDYouTubeVideoWebpage : NSObject 9 | 10 | - (instancetype) initWithData:(NSData *)data response:(NSURLResponse *)response; 11 | 12 | @property (nonatomic, readonly) NSDictionary *videoInfo; 13 | @property (nonatomic, readonly) NSURL *javaScriptPlayerURL; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/cd.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var common = require('./common'); 3 | 4 | //@ 5 | //@ ### cd('dir') 6 | //@ Changes to directory `dir` for the duration of the script 7 | function _cd(options, dir) { 8 | if (!dir) 9 | common.error('directory not specified'); 10 | 11 | if (!fs.existsSync(dir)) 12 | common.error('no such file or directory: ' + dir); 13 | 14 | if (!fs.statSync(dir).isDirectory()) 15 | common.error('not a directory: ' + dir); 16 | 17 | process.chdir(dir); 18 | } 19 | module.exports = _cd; 20 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | YoutubeVideoPlayerProject 4 | 5 | A sample Apache Cordova application that responds to the deviceready event. 6 | 7 | 8 | Apache Cordova Team 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/echo.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | //@ 4 | //@ ### echo(string [,string ...]) 5 | //@ 6 | //@ Examples: 7 | //@ 8 | //@ ```javascript 9 | //@ echo('hello world'); 10 | //@ var str = echo('hello world'); 11 | //@ ``` 12 | //@ 13 | //@ Prints string to stdout, and returns string with additional utility methods 14 | //@ like `.to()`. 15 | function _echo() { 16 | var messages = [].slice.call(arguments, 0); 17 | console.log.apply(this, messages); 18 | return common.ShellString(messages.join(' ')); 19 | } 20 | module.exports = _echo; 21 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Indicates whether an apk should be generated for each density. 11 | split.density=false 12 | # Project target. 13 | target=android-19 14 | apk-configurations= 15 | renderscript.opt.level=O0 16 | android.library=true 17 | -------------------------------------------------------------------------------- /platforms/android/assets/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "file": "plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/www/YoutubeVideoPlayer.js", 5 | "id": "com.bunkerpalace.cordova.YoutubeVideoPlayer.YoutubeVideoPlayer", 6 | "clobbers": [ 7 | "YoutubeVideoPlayer" 8 | ] 9 | } 10 | ]; 11 | module.exports.metadata = 12 | // TOP OF METADATA 13 | { 14 | "com.bunkerpalace.cordova.YoutubeVideoPlayer": "1.0.0", 15 | "org.apache.cordova.console": "0.2.10" 16 | } 17 | // BOTTOM OF METADATA 18 | }); -------------------------------------------------------------------------------- /platforms/ios/www/plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/www/YoutubeVideoPlayer.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.bunkerpalace.cordova.YoutubeVideoPlayer.YoutubeVideoPlayer", function(require, exports, module) { var exec = require('cordova/exec'); 2 | 3 | function YoutubeVideoPlayer() {} 4 | 5 | YoutubeVideoPlayer.prototype.openVideo = function(YTid) { 6 | exec(function(result) { 7 | console.log(result); 8 | }, 9 | function(error) { 10 | console.log(error); 11 | }, 12 | "YoutubeVideoPlayer", 13 | "openVideo", 14 | [YTid] 15 | ); 16 | } 17 | 18 | var YoutubeVideoPlayer = new YoutubeVideoPlayer(); 19 | module.exports = YoutubeVideoPlayer 20 | }); 21 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/scripts/generate-docs.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | echo('Appending docs to README.md'); 5 | 6 | cd(__dirname + '/..'); 7 | 8 | // Extract docs from shell.js 9 | var docs = grep('//@', 'shell.js'); 10 | 11 | docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { 12 | var file = path.match('.js$') ? path : path+'.js'; 13 | return grep('//@', file); 14 | }); 15 | 16 | // Remove '//@' 17 | docs = docs.replace(/\/\/\@ ?/g, ''); 18 | // Append docs to README 19 | sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); 20 | 21 | echo('All done.'); 22 | -------------------------------------------------------------------------------- /platforms/android/assets/www/plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/www/YoutubeVideoPlayer.js: -------------------------------------------------------------------------------- 1 | cordova.define("com.bunkerpalace.cordova.YoutubeVideoPlayer.YoutubeVideoPlayer", function(require, exports, module) { var exec = require('cordova/exec'); 2 | 3 | function YoutubeVideoPlayer() {} 4 | 5 | YoutubeVideoPlayer.prototype.openVideo = function(YTid) { 6 | exec(function(result) { 7 | console.log(result); 8 | }, 9 | function(error) { 10 | console.log(error); 11 | }, 12 | "YoutubeVideoPlayer", 13 | "openVideo", 14 | [YTid] 15 | ); 16 | } 17 | 18 | var YoutubeVideoPlayer = new YoutubeVideoPlayer(); 19 | module.exports = YoutubeVideoPlayer 20 | }); 21 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/adrien.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CordovaLib.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D2AAC07D0554694100DB518D 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /platforms/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | android.library.reference.1=CordovaLib 14 | # Project target. 15 | target=android-19 16 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject.xcodeproj/xcuserdata/adrien.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | YoutubeVideoPlayerProject.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 1D6058900D05DD3D006BFB54 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubeOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import 6 | 7 | /** 8 | * The `XCDYouTubeOperation` protocol is adopted by opaque objects returned by the `-[XCDYouTubeClient getVideoWithIdentifier:completionHandler:]` method. 9 | */ 10 | @protocol XCDYouTubeOperation 11 | 12 | /** 13 | * --------------- 14 | * @name Canceling 15 | * --------------- 16 | */ 17 | 18 | /** 19 | * Cancels the operation. If the operation is already finished, does nothing. 20 | */ 21 | - (void) cancel; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore .DS_Store files and some other stuff 2 | .DS_Store 3 | 4 | # Xcode 5 | # 6 | build/ 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | xcuserdata 16 | *.xccheckout 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | *.xcuserstate 22 | 23 | # Eclipse 24 | # 25 | *.pydevproject 26 | .metadata 27 | .gradle 28 | bin/ 29 | tmp/ 30 | *.tmp 31 | *.bak 32 | *.swp 33 | *~.nib 34 | local.properties 35 | .settings/ 36 | .loadpath 37 | # External tool builders 38 | .externalToolBuilders/ 39 | # Locally stored "Eclipse launch configurations" 40 | *.launch 41 | # CDT-specific 42 | .cproject 43 | # PDT-specific 44 | .buildpath 45 | # sbteclipse plugin 46 | .target 47 | # TeXlipse plugin 48 | .texlipse 49 | .classpath 50 | gen/ 51 | .project -------------------------------------------------------------------------------- /platforms/android/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubeVideo+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import "XCDYouTubeVideo.h" 6 | 7 | #import "XCDYouTubePlayerScript.h" 8 | 9 | #define XCDYouTubeErrorUseCipherSignature -1000 10 | 11 | extern NSString *const XCDYouTubeNoStreamVideoUserInfoKey; 12 | 13 | extern NSDictionary *XCDDictionaryWithQueryString(NSString *string, NSStringEncoding encoding); 14 | extern NSString *XCDQueryStringWithDictionary(NSDictionary *dictionary, NSStringEncoding encoding); 15 | 16 | @interface XCDYouTubeVideo () 17 | 18 | - (instancetype) initWithIdentifier:(NSString *)identifier info:(NSDictionary *)info playerScript:(XCDYouTubePlayerScript *)playerScript response:(NSURLResponse *)response error:(NSError **)error; 19 | 20 | - (void) mergeVideo:(XCDYouTubeVideo *)video; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/toEnd.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | //@ 6 | //@ ### 'string'.toEnd(file) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ cat('input.txt').toEnd('output.txt'); 12 | //@ ``` 13 | //@ 14 | //@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as 15 | //@ those returned by `cat`, `grep`, etc). 16 | function _toEnd(options, file) { 17 | if (!file) 18 | common.error('wrong arguments'); 19 | 20 | if (!fs.existsSync( path.dirname(file) )) 21 | common.error('no such file or directory: ' + path.dirname(file)); 22 | 23 | try { 24 | fs.appendFileSync(file, this.toString(), 'utf8'); 25 | } catch(e) { 26 | common.error('could not append to file (code '+e.code+'): '+file, true); 27 | } 28 | } 29 | module.exports = _toEnd; 30 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/to.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | //@ 6 | //@ ### 'string'.to(file) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ cat('input.txt').to('output.txt'); 12 | //@ ``` 13 | //@ 14 | //@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as 15 | //@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ 16 | function _to(options, file) { 17 | if (!file) 18 | common.error('wrong arguments'); 19 | 20 | if (!fs.existsSync( path.dirname(file) )) 21 | common.error('no such file or directory: ' + path.dirname(file)); 22 | 23 | try { 24 | fs.writeFileSync(file, this.toString(), 'utf8'); 25 | } catch(e) { 26 | common.error('could not write to file (code '+e.code+'): '+file, true); 27 | } 28 | } 29 | module.exports = _to; 30 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/CordovaLib_Prefix.pch: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #ifdef __OBJC__ 21 | #import 22 | #endif 23 | -------------------------------------------------------------------------------- /platforms/ios/cordova/log: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | 21 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 22 | 23 | tail -f "$CORDOVA_PATH/console.log" 24 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/README: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one 3 | # or more contributor license agreements. See the NOTICE file 4 | # distributed with this work for additional information 5 | # regarding copyright ownership. The ASF licenses this file 6 | # to you under the Apache License, Version 2.0 (the 7 | # "License"); you may not use this file except in compliance 8 | # with the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | # 19 | 20 | Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. 21 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ios/CDVLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVLogger : CDVPlugin 23 | 24 | - (void)logLevel:(CDVInvokedUrlCommand*)command; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVTimer : NSObject 23 | 24 | + (void)start:(NSString*)name; 25 | + (void)stop:(NSString*)name; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cordova YoutubeVideoPlayer Plugin 2 | 3 | **Play Youtube Videos in a native Video Player on Android & iOS.** 4 | 5 | iOS plugin uses **XCDYouTubeKit** by Cédric Luthi: 6 | https://github.com/0xced/XCDYouTubeKit 7 | 8 | Android version uses **OpenYoutubeActivity** by Keyes Labs: 9 | https://code.google.com/p/android-youtube-player 10 | 11 | ## Installation 12 | 13 | ```sh 14 | cordova plugin add https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git 15 | ``` 16 | 17 | ## Usage 18 | 19 | ```javascript 20 | YoutubeVideoPlayer.openVideo('YOUTUBE_VIDEO_ID'); 21 | ``` 22 | 23 | ## Author 24 | 25 | **Adrien Glitchbone** 26 | 27 | + [https://twitter.com/glitchbone](https://twitter.com/glitchbone) 28 | + [http://github.com/Glitchbone](http://github.com/Glitchbone) 29 | 30 | ## License 31 | 32 | CordovaYoutubeVideoPlayer is available under the MIT license. See the [LICENSE](LICENSE) file for more information. 33 | XCDYouTubeKit is available under the MIT license. 34 | OpenYoutubeActivity is available under the Apache License 2.0. 35 | -------------------------------------------------------------------------------- /platforms/android/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | YoutubeVideoPlayerProject 14 | 15 | A sample Apache Cordova application that responds to the deviceready event. 16 | 17 | 18 | Apache Cordova Team 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSArray+Comparisons.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSArray (Comparisons) 23 | 24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSData+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.h 3 | // base64 4 | // 5 | // Created by Matt Gallagher on 2009/06/03. 6 | // Copyright 2009 Matt Gallagher. All rights reserved. 7 | // 8 | // Permission is given to use this source code file, free of charge, in any 9 | // project, commercial or otherwise, entirely at your risk, with the condition 10 | // that any redistribution (in part or whole) of source code must retain 11 | // this copyright and permission notice. Attribution in compiled projects is 12 | // appreciated but not required. 13 | // 14 | 15 | #import 16 | 17 | void *CDVNewBase64Decode( 18 | const char* inputBuffer, 19 | size_t length, 20 | size_t * outputLength); 21 | 22 | char *CDVNewBase64Encode( 23 | const void* inputBuffer, 24 | size_t length, 25 | bool separateLines, 26 | size_t * outputLength); 27 | 28 | @interface NSData (CDVBase64) 29 | 30 | + (NSData*)dataFromBase64String:(NSString*)aString; 31 | - (NSString*)base64EncodedString; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /platforms/ios/cordova/apple_xcode_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs which version of XCODE is installed 23 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') 24 | echo $XCODEBUILD_VERSION -------------------------------------------------------------------------------- /platforms/android/cordova/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | // Coho updates this line: 23 | var VERSION = "3.5.0"; 24 | 25 | console.log(VERSION); 26 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/org.apache.cordova.console/CDVLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVLogger : CDVPlugin 23 | 24 | - (void)logLevel:(CDVInvokedUrlCommand*)command; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /platforms/ios/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "file": "plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/www/YoutubeVideoPlayer.js", 5 | "id": "com.bunkerpalace.cordova.YoutubeVideoPlayer.YoutubeVideoPlayer", 6 | "clobbers": [ 7 | "YoutubeVideoPlayer" 8 | ] 9 | }, 10 | { 11 | "file": "plugins/org.apache.cordova.console/www/console-via-logger.js", 12 | "id": "org.apache.cordova.console.console", 13 | "clobbers": [ 14 | "console" 15 | ] 16 | }, 17 | { 18 | "file": "plugins/org.apache.cordova.console/www/logger.js", 19 | "id": "org.apache.cordova.console.logger", 20 | "clobbers": [ 21 | "cordova.logger" 22 | ] 23 | } 24 | ]; 25 | module.exports.metadata = 26 | // TOP OF METADATA 27 | { 28 | "com.bunkerpalace.cordova.YoutubeVideoPlayer": "1.0.0", 29 | "org.apache.cordova.console": "0.2.10" 30 | } 31 | // BOTTOM OF METADATA 32 | }); -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ubuntu/console.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | #include "console.h" 16 | 17 | #include 18 | 19 | Console::Console(Cordova *cordova) : CPlugin(cordova) { 20 | } 21 | 22 | void Console::logLevel(int scId, int ecId, QString level, QString message) { 23 | Q_UNUSED(scId) 24 | Q_UNUSED(ecId) 25 | 26 | if (level != "LOG") 27 | std::cout << "[" << level.toStdString() << "] "; 28 | std::cout << message.toStdString() << std::endl; 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) 23 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSMutableArray+QueueAdditions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSMutableArray (QueueAdditions) 23 | 24 | - (id)pop; 25 | - (id)queueHead; 26 | - (id)dequeue; 27 | - (void)enqueue:(id)obj; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /platforms/android/cordova/log.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0log" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/q/queue.js: -------------------------------------------------------------------------------- 1 | 2 | var Q = require("./q"); 3 | 4 | module.exports = Queue; 5 | function Queue() { 6 | var ends = Q.defer(); 7 | var closed = Q.defer(); 8 | return { 9 | put: function (value) { 10 | var next = Q.defer(); 11 | ends.resolve({ 12 | head: value, 13 | tail: next.promise 14 | }); 15 | ends.resolve = next.resolve; 16 | }, 17 | get: function () { 18 | var result = ends.promise.get("head"); 19 | ends.promise = ends.promise.get("tail"); 20 | return result.fail(function (error) { 21 | closed.resolve(error); 22 | throw error; 23 | }); 24 | }, 25 | closed: closed.promise, 26 | close: function (error) { 27 | error = error || new Error("Can't get value from closed queue"); 28 | var end = {head: Q.reject(error)}; 29 | end.tail = end; 30 | ends.resolve(end); 31 | return closed.promise; 32 | } 33 | }; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /platforms/android/cordova/run.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0run" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/build.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0build" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/clean.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0clean" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/src/com/bunkerpalace/cordova/YoutubeVideoPlayer.java: -------------------------------------------------------------------------------- 1 | package com.bunkerpalace.cordova; 2 | import org.apache.cordova.CallbackContext; 3 | import org.apache.cordova.CordovaPlugin; 4 | import org.json.JSONArray; 5 | import org.json.JSONException; 6 | 7 | import android.content.Intent; 8 | import android.net.Uri; 9 | import android.util.Log; 10 | 11 | import com.keyes.youtube.OpenYouTubePlayerActivity; 12 | 13 | public class YoutubeVideoPlayer extends CordovaPlugin { 14 | 15 | @Override 16 | public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { 17 | 18 | if(action.equals("openVideo")) { 19 | String url = args.getString(0); 20 | this.openVideo(url, callbackContext); 21 | return true; 22 | } 23 | 24 | return false; 25 | } 26 | 27 | private void openVideo(String vid, CallbackContext callbackContext) { 28 | 29 | Intent intent = new Intent(null, Uri.parse("ytv://"+vid), this.cordova.getActivity(), OpenYouTubePlayerActivity.class); 30 | this.cordova.getActivity().startActivity(intent); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /platforms/ios/cordova/apple_ios_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs the highest level of iOS sdk installed 23 | iOS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/iOS SDKs/!d;' | grep -o '[0-9]*\.[0-9]* '); 24 | echo $iOS_X_VERSIONS | tr " " "\n" | sort -g | tail -1; -------------------------------------------------------------------------------- /platforms/ios/cordova/apple_osx_version: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # outputs the highest level of OS X sdk installed 23 | OS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/OS X SDKs/!d;' | grep -o '[0-9]*\.[0-9]* '); 24 | echo $OS_X_VERSIONS | tr " " "\n" | sort -g | tail -1; -------------------------------------------------------------------------------- /platforms/android/cordova/version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | @interface NSArray (CDVJSONSerializing) 21 | - (NSString*)JSONString; 22 | @end 23 | 24 | @interface NSDictionary (CDVJSONSerializing) 25 | - (NSString*)JSONString; 26 | @end 27 | 28 | @interface NSString (CDVJSONSerializing) 29 | - (id)JSONObject; 30 | @end 31 | -------------------------------------------------------------------------------- /platforms/android/custom_rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Adrien Glitchbone 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/q/benchmark/scenarios.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Q = require("../q"); 4 | 5 | suite("Chaining", function () { 6 | var numberToChain = 1000; 7 | 8 | bench("Chaining many already-fulfilled promises together", function (done) { 9 | var currentPromise = Q(); 10 | for (var i = 0; i < numberToChain; ++i) { 11 | currentPromise = currentPromise.then(function () { 12 | return Q(); 13 | }); 14 | } 15 | 16 | currentPromise.then(done); 17 | }); 18 | 19 | bench("Chaining and then fulfilling the end of the chain", function (done) { 20 | var deferred = Q.defer(); 21 | 22 | var currentPromise = deferred.promise; 23 | for (var i = 0; i < numberToChain; ++i) { 24 | (function () { 25 | var promiseToReturn = currentPromise; 26 | currentPromise = Q().then(function () { 27 | return promiseToReturn; 28 | }); 29 | }()); 30 | } 31 | 32 | currentPromise.then(done); 33 | 34 | deferred.resolve(); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #ifdef DEBUG 21 | #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 22 | #else 23 | #define DLog(...) 24 | #endif 25 | #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) 26 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/YoutubeVideoPlayerProject-Prefix.pch: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | // 20 | // Prefix header for all source files of the 'YoutubeVideoPlayerProject' target in the 'YoutubeVideoPlayerProject' project 21 | // 22 | 23 | #ifdef __OBJC__ 24 | #import 25 | #import 26 | #endif 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-devices.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-devices" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVShared.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface NSError (JSONMethods) 24 | 25 | - (NSString*)JSONRepresentation; 26 | 27 | @end 28 | 29 | @interface CLLocation (JSONMethods) 30 | 31 | - (NSString*)JSONRepresentation; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /platforms/ios/cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | 21 | system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPad"}' 22 | system_profiler SPUSBDataType | sed -n -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2 " iPhone"}' 23 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-device.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-device" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/start-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0start-emulator" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-emulator" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-emulator-images.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-emulator-images" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-started-emulators.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-started-emulators" 20 | IF EXIST %script_path% ( 21 | node "%script_path%" %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/q/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved. 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 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell 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 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVScreenOrientationDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @protocol CDVScreenOrientationDelegate 23 | 24 | - (NSUInteger)supportedInterfaceOrientations; 25 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; 26 | - (BOOL)shouldAutorotate; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /platforms/android/cordova/android_sdk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var android_sdk_version = require('./lib/android_sdk_version'); 23 | 24 | android_sdk_version.run().done(null, function(err) { 25 | console.log(err); 26 | process.exit(2); 27 | }); 28 | 29 | 30 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVURLProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import "CDVAvailability.h" 22 | 23 | @class CDVViewController; 24 | 25 | @interface CDVURLProtocol : NSURLProtocol {} 26 | 27 | + (void)registerViewController:(CDVViewController*)viewController; 28 | + (void)unregisterViewController:(CDVViewController*)viewController; 29 | @end 30 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVUserAgentUtil.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVUserAgentUtil : NSObject 23 | + (NSString*)originalUserAgent; 24 | + (void)acquireLock:(void (^)(NSInteger lockToken))block; 25 | + (void)releaseLock:(NSInteger*)lockToken; 26 | + (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken; 27 | @end 28 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/YoutubeVideoPlayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // YoutubeVideoPlayer.m 3 | // 4 | // Created by Adrien Girbone on 15/04/2014. 5 | // 6 | // 7 | 8 | #import "YoutubeVideoPlayer.h" 9 | #import "XCDYouTubeKit.h" 10 | 11 | @implementation YoutubeVideoPlayer 12 | 13 | - (void)openVideo:(CDVInvokedUrlCommand*)command 14 | { 15 | 16 | CDVPluginResult* pluginResult = nil; 17 | 18 | NSString* videoID = [command.arguments objectAtIndex:0]; 19 | 20 | if (videoID != nil) { 21 | 22 | XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:videoID]; 23 | [self.viewController presentMoviePlayerViewControllerAnimated:videoPlayerViewController]; 24 | 25 | pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; 26 | 27 | } else { 28 | 29 | pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Missing videoID Argument"]; 30 | 31 | } 32 | 33 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/Dns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal; 17 | 18 | import java.net.InetAddress; 19 | import java.net.UnknownHostException; 20 | 21 | /** 22 | * Domain name service. Prefer this over {@link InetAddress#getAllByName} to 23 | * make code more testable. 24 | */ 25 | public interface Dns { 26 | Dns DEFAULT = new Dns() { 27 | @Override public InetAddress[] getAllByName(String host) throws UnknownHostException { 28 | return InetAddress.getAllByName(host); 29 | } 30 | }; 31 | 32 | InetAddress[] getAllByName(String host) throws UnknownHostException; 33 | } 34 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/cat.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### cat(file [, file ...]) 6 | //@ ### cat(file_array) 7 | //@ 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ var str = cat('file*.txt'); 12 | //@ var str = cat('file1', 'file2'); 13 | //@ var str = cat(['file1', 'file2']); // same as above 14 | //@ ``` 15 | //@ 16 | //@ Returns a string containing the given file, or a concatenated string 17 | //@ containing the files if more than one file is given (a new line character is 18 | //@ introduced between each file). Wildcard `*` accepted. 19 | function _cat(options, files) { 20 | var cat = ''; 21 | 22 | if (!files) 23 | common.error('no paths given'); 24 | 25 | if (typeof files === 'string') 26 | files = [].slice.call(arguments, 1); 27 | // if it's array leave it as it is 28 | 29 | files = common.expand(files); 30 | 31 | files.forEach(function(file) { 32 | if (!fs.existsSync(file)) 33 | common.error('no such file or directory: ' + file); 34 | 35 | cat += fs.readFileSync(file, 'utf8') + '\n'; 36 | }); 37 | 38 | if (cat[cat.length-1] === '\n') 39 | cat = cat.substring(0, cat.length-1); 40 | 41 | return common.ShellString(cat); 42 | } 43 | module.exports = _cat; 44 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/make.js: -------------------------------------------------------------------------------- 1 | require('./global'); 2 | 3 | global.config.fatal = true; 4 | global.target = {}; 5 | 6 | // This ensures we only execute the script targets after the entire script has 7 | // been evaluated 8 | var args = process.argv.slice(2); 9 | setTimeout(function() { 10 | var t; 11 | 12 | if (args.length === 1 && args[0] === '--help') { 13 | console.log('Available targets:'); 14 | for (t in global.target) 15 | console.log(' ' + t); 16 | return; 17 | } 18 | 19 | // Wrap targets to prevent duplicate execution 20 | for (t in global.target) { 21 | (function(t, oldTarget){ 22 | 23 | // Wrap it 24 | global.target[t] = function(force) { 25 | if (oldTarget.done && !force) 26 | return; 27 | oldTarget.done = true; 28 | return oldTarget.apply(oldTarget, arguments); 29 | }; 30 | 31 | })(t, global.target[t]); 32 | } 33 | 34 | // Execute desired targets 35 | if (args.length > 0) { 36 | args.forEach(function(arg) { 37 | if (arg in global.target) 38 | global.target[arg](); 39 | else { 40 | console.log('no such target: ' + arg); 41 | } 42 | }); 43 | } else if ('all' in global.target) { 44 | global.target.all(); 45 | } 46 | 47 | }, 0); 48 | -------------------------------------------------------------------------------- /platforms/android/cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var check_reqs = require('./lib/check_reqs'); 23 | 24 | check_reqs.run().done( 25 | function success() { 26 | console.log('Looks like your environment fully supports cordova-android development!'); 27 | }, function fail(err) { 28 | console.log(err); 29 | process.exit(2); 30 | } 31 | ); 32 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/UIDevice+Extensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface UIDevice (org_apache_cordova_UIDevice_Extension) 23 | 24 | /* 25 | Get the unique identifier from the app bundle's folder, which is already a GUID 26 | Upgrading and/or deleting the app and re-installing will get you a new GUID, so 27 | this is only unique per install per device. 28 | */ 29 | - (NSString*)uniqueAppInstanceIdentifier; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | // 20 | // main.m 21 | // YoutubeVideoPlayerProject 22 | // 23 | // Created by ___FULLUSERNAME___ on ___DATE___. 24 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 25 | // 26 | 27 | #import 28 | 29 | int main(int argc, char* argv[]) 30 | { 31 | @autoreleasepool { 32 | int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); 33 | return retVal; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/scripts/run-tests.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | var path = require('path'); 5 | 6 | var failed = false; 7 | 8 | // 9 | // Lint 10 | // 11 | JSHINT_BIN = './node_modules/jshint/bin/jshint'; 12 | cd(__dirname + '/..'); 13 | 14 | if (!test('-f', JSHINT_BIN)) { 15 | echo('JSHint not found. Run `npm install` in the root dir first.'); 16 | exit(1); 17 | } 18 | 19 | if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { 20 | failed = true; 21 | echo('*** JSHINT FAILED! (return code != 0)'); 22 | echo(); 23 | } else { 24 | echo('All JSHint tests passed'); 25 | echo(); 26 | } 27 | 28 | // 29 | // Unit tests 30 | // 31 | cd(__dirname + '/../test'); 32 | ls('*.js').forEach(function(file) { 33 | echo('Running test:', file); 34 | if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) 35 | failed = true; 36 | echo('*** TEST FAILED! (missing exit code "123")'); 37 | echo(); 38 | } 39 | }); 40 | 41 | if (failed) { 42 | echo(); 43 | echo('*******************************************************'); 44 | echo('WARNING: Some tests did not pass!'); 45 | echo('*******************************************************'); 46 | exit(1); 47 | } else { 48 | echo(); 49 | echo('All tests passed.'); 50 | } 51 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ubuntu/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | #ifndef CONSOLE_H_FDSVCXGFRS 16 | #define CONSOLE_H_FDSVCXGFRS 17 | 18 | #include 19 | 20 | #include 21 | 22 | class Console : public CPlugin { 23 | Q_OBJECT 24 | public: 25 | explicit Console(Cordova *cordova); 26 | 27 | virtual const QString fullName() override { 28 | return Console::fullID(); 29 | } 30 | 31 | virtual const QString shortName() override { 32 | return "Console"; 33 | } 34 | 35 | static const QString fullID() { 36 | return "Console"; 37 | } 38 | 39 | public slots: 40 | void logLevel(int scId, int ecId, QString level, QString message); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var devices = require('./device'); 23 | 24 | // Usage support for when args are given 25 | devices.list().done(function(device_list) { 26 | device_list && device_list.forEach(function(dev) { 27 | console.log(dev); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | emulators.list_images().done(function(emulator_list) { 26 | emulator_list && emulator_list.forEach(function(emu) { 27 | console.log(emu.name); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | emulators.list_started().done(function(emulator_list) { 26 | emulator_list && emulator_list.forEach(function(emu) { 27 | console.log(emu); 28 | }); 29 | }, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | -------------------------------------------------------------------------------- /platforms/ios/cordova/lib/sim.applescript: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | tell application "System Events" 19 | set UI elements enabled to true 20 | end tell 21 | 22 | tell application "iPhone Simulator" 23 | activate 24 | end tell 25 | 26 | tell application "System Events" 27 | tell process "iPhone Simulator" 28 | click menu item "$DEVICE_NAME" of menu 1 of menu item "Device" of menu 1 of menu bar item "Hardware" of menu bar 1 29 | click menu item "Home" of menu 1 of menu bar item "Hardware" of menu bar 1 30 | end tell 31 | end tell 32 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // controller title for Videos 21 | "Videos title" = "Videos"; 22 | // accessibility label for recording button 23 | "toggle audio recording" = "toggle audio recording"; 24 | // notification spoken by VoiceOver when timed recording finishes 25 | "timed recording complete" = "timed recording complete"; 26 | // accessibility hint for display of recorded elapsed time 27 | "recorded time in minutes and seconds" = "recorded time in minutes and seconds"; 28 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ios/CDVLogger.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "CDVLogger.h" 21 | #import 22 | 23 | @implementation CDVLogger 24 | 25 | /* log a message */ 26 | - (void)logLevel:(CDVInvokedUrlCommand*)command 27 | { 28 | id level = [command.arguments objectAtIndex:0]; 29 | id message = [command.arguments objectAtIndex:1]; 30 | 31 | if ([level isEqualToString:@"LOG"]) { 32 | NSLog(@"%@", message); 33 | } else { 34 | NSLog(@"%@: %@", level, message); 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/se.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | // controller title for Videos 22 | "Videos title" = "Videor"; 23 | // accessibility label for recording button 24 | "toggle audio recording" = "börja/avsluta inspelning"; 25 | // notification spoken by VoiceOver when timed recording finishes 26 | "timed recording complete" = "inspelning har avslutad"; 27 | // accessibility hint for display of recorded elapsed time 28 | "recorded time in minutes and seconds" = "inspelad tid in minuter och sekund"; 29 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/zh/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | 這個外掛程式是為了確保該 console.log() 是一樣有用,它可以是。 它將添加附加功能的 iOS、 Ubuntu,Windows Phone 8 和 Windows 8。 如果你是快樂與 console.log() 是如何為你工作,那麼可能不需要這個外掛程式。 23 | 24 | ## 安裝 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android 的怪癖 30 | 31 | 在一些非 Android 平臺上,console.log() 將作用於多個參數,如 console.log ("1"、"2"、"3")。 然而,Android 將僅在第一個參數上採取行動。 對 console.log() 的後續參數將被忽略。 這個外掛程式不是的原因,,它是安卓系統本身的限制。 -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVWhitelist.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | extern NSString* const kCDVDefaultWhitelistRejectionString; 23 | 24 | @interface CDVWhitelist : NSObject 25 | 26 | @property (nonatomic, copy) NSString* whitelistRejectionFormatString; 27 | 28 | - (id)initWithArray:(NSArray*)array; 29 | - (BOOL)schemeIsAllowed:(NSString*)scheme; 30 | - (BOOL)URLIsAllowed:(NSURL*)url; 31 | - (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure; 32 | - (NSString*)errorStringForURL:(NSURL*)url; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/es.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // controller title for Videos 21 | "Videos title" = "Videos"; 22 | // accessibility label for recording button 23 | "toggle audio recording" = "grabación de audio cambiar"; 24 | // notification spoken by VoiceOver when timed recording finishes 25 | "timed recording complete" = "tiempo de grabación completo"; 26 | // accessibility hint for display of recorded elapsed time 27 | "recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos"; 28 | -------------------------------------------------------------------------------- /platforms/ios/cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone (Retina 3.5-inch)" (default) 22 | # "iPhone (Retina 4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad (Retina)" 26 | 27 | set -e 28 | 29 | 30 | DEFAULT_TARGET="iPhone Retina (3.5-inch)" 31 | TARGET=${1:-$DEFAULT_TARGET} 32 | LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P) 33 | 34 | SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" "$LIB_PATH/sim.applescript"` 35 | osascript -e "$SCPT" 36 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVConfigParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | @interface CDVConfigParser : NSObject 21 | { 22 | NSString* featureName; 23 | } 24 | 25 | @property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict; 26 | @property (nonatomic, readonly, strong) NSMutableDictionary* settings; 27 | @property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts; 28 | @property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames; 29 | @property (nonatomic, readonly, strong) NSString* startPage; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /platforms/android/cordova/log: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var log = require('./lib/log'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if(args.length > 2) { 28 | log.help(); 29 | } else { 30 | reqs.run().done(function() { 31 | return log.run(); 32 | }, function(err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Resources/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 21 | // controller title for Videos 22 | "Videos title" = "Videos"; 23 | // accessibility label for recording button 24 | "toggle audio recording" = "starten/beenden der Tonaufnahme"; 25 | // notification spoken by VoiceOver when timed recording finishes 26 | "timed recording complete" = "programmierte Aufnahme beendet"; 27 | // accessibility hint for display of recorded elapsed time 28 | "recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden"; 29 | -------------------------------------------------------------------------------- /platforms/ios/cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | XCODEBUILD_LOCATION=$(which xcodebuild) 23 | if [ $? != 0 ]; then 24 | echo "Xcode is (probably) not installed, specifically the command 'xcodebuild' is unavailable." 25 | exit 2 26 | fi 27 | 28 | XCODEBUILD_MIN_VERSION="4.6" 29 | XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //') 30 | 31 | if [[ "$XCODEBUILD_VERSION" < "$XCODEBUILD_MIN_VERSION" ]]; then 32 | echo "Cordova can only run in Xcode version $XCODEBUILD_MIN_VERSION or greater." 33 | exit 2 34 | fi 35 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/ResponseSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp; 17 | 18 | /** The source of an HTTP response. */ 19 | public enum ResponseSource { 20 | 21 | /** The response was returned from the local cache. */ 22 | CACHE, 23 | 24 | /** 25 | * The response is available in the cache but must be validated with the 26 | * network. The cache result will be used if it is still valid; otherwise 27 | * the network's response will be used. 28 | */ 29 | CONDITIONAL_CACHE, 30 | 31 | /** The response was returned from the network. */ 32 | NETWORK; 33 | 34 | public boolean requiresConnection() { 35 | return this == CONDITIONAL_CACHE || this == NETWORK; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /platforms/android/cordova/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var clean = require('./lib/clean'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if(args.length > 2) { 28 | clean.help(); 29 | } else { 30 | reqs.run().done(function() { 31 | return clean.run(); 32 | }, function(err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/org.apache.cordova.console/CDVLogger.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "CDVLogger.h" 21 | #import 22 | 23 | @implementation CDVLogger 24 | 25 | /* log a message */ 26 | - (void)logLevel:(CDVInvokedUrlCommand*)command 27 | { 28 | id level = [command.arguments objectAtIndex:0]; 29 | id message = [command.arguments objectAtIndex:1]; 30 | 31 | if ([level isEqualToString:@"LOG"]) { 32 | NSLog(@"%@", message); 33 | } else { 34 | NSLog(@"%@: %@", level, message); 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Plugins/com.bunkerpalace.cordova.YoutubeVideoPlayer/XCDYouTubeError.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2013-2014 Cédric Luthi. All rights reserved. 3 | // 4 | 5 | #import 6 | 7 | /** 8 | * The error domain used throughout XCDYouTubeKit. 9 | */ 10 | extern NSString *const XCDYouTubeVideoErrorDomain; 11 | 12 | /** 13 | * These values are returned as the error code property of an NSError object with the domain `XCDYouTubeVideoErrorDomain`. 14 | */ 15 | typedef NS_ENUM(NSInteger, XCDYouTubeErrorCode) { 16 | /** 17 | * Returned if no suitable video stream is available. 18 | */ 19 | XCDYouTubeErrorNoStreamAvailable = -2, 20 | 21 | /** 22 | * Returned when a network error occurs. See `NSUnderlyingErrorKey` in the userInfo dictionary for more information. 23 | */ 24 | XCDYouTubeErrorNetwork = -1, 25 | 26 | /** 27 | * Returned when the given video identifier string is invalid. 28 | */ 29 | XCDYouTubeErrorInvalidVideoIdentifier = 2, 30 | 31 | /** 32 | * Returned when the video has been removed as a violation of YouTube's policy or if the video does not exist. 33 | */ 34 | XCDYouTubeErrorRemovedVideo = 100, 35 | 36 | /** 37 | * Returned when the video is not playable because of legal reasons or the this is a private video. 38 | */ 39 | XCDYouTubeErrorRestrictedPlayback = 150 40 | }; 41 | -------------------------------------------------------------------------------- /platforms/ios/cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone (Retina 3.5-inch)" (default) 22 | # "iPhone (Retina 4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad (Retina)" 26 | 27 | set -e 28 | 29 | SIM_RUNNING=$(ps aux | grep -i "[i]Phone Simulator" | wc -l) 30 | if [ $SIM_RUNNING == 0 ]; then 31 | echo "No emulators are running." 32 | exit 1 33 | fi 34 | 35 | SIM_ID=`defaults read com.apple.iphonesimulator "SimulateDevice"` 36 | echo \"$SIM_ID\" 37 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/NamedRunnable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal; 18 | 19 | /** 20 | * Runnable implementation which always sets its thread name. 21 | */ 22 | public abstract class NamedRunnable implements Runnable { 23 | private final String name; 24 | 25 | public NamedRunnable(String format, Object... args) { 26 | this.name = String.format(format, args); 27 | } 28 | 29 | @Override public final void run() { 30 | String oldName = Thread.currentThread().getName(); 31 | Thread.currentThread().setName(name); 32 | try { 33 | execute(); 34 | } finally { 35 | Thread.currentThread().setName(oldName); 36 | } 37 | } 38 | 39 | protected abstract void execute(); 40 | } 41 | -------------------------------------------------------------------------------- /platforms/android/cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "ipad", 6 | "minimum-system-version" : "7.0", 7 | "extent" : "full-screen", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "ipad", 13 | "minimum-system-version" : "7.0", 14 | "extent" : "full-screen", 15 | "scale" : "2x" 16 | }, 17 | { 18 | "orientation" : "landscape", 19 | "idiom" : "ipad", 20 | "minimum-system-version" : "7.0", 21 | "extent" : "full-screen", 22 | "scale" : "1x" 23 | }, 24 | { 25 | "orientation" : "landscape", 26 | "idiom" : "ipad", 27 | "minimum-system-version" : "7.0", 28 | "extent" : "full-screen", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "orientation" : "portrait", 33 | "idiom" : "iphone", 34 | "filename" : "Default@2x~iphone.png", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "orientation" : "portrait", 40 | "idiom" : "iphone", 41 | "filename" : "Default-568h@2x~iphone.png", 42 | "minimum-system-version" : "7.0", 43 | "subtype" : "retina4", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /platforms/ios/cordova/version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # 23 | # Returns the VERSION of CordovaLib used. 24 | # Note: it does not work if the --shared option was used to create the project. 25 | # 26 | 27 | set -e 28 | 29 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 30 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")" 31 | 32 | VERSION_FILE_PATH="$PROJECT_PATH/CordovaLib/VERSION" 33 | VERSION=$(<"$VERSION_FILE_PATH") 34 | 35 | if [ -f "$VERSION_FILE_PATH" ]; then 36 | echo $VERSION 37 | else 38 | echo "The file \"$VERSION_FILE_PATH\" does not exist." 39 | exit 1 40 | fi -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/bin/shjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | require('../global'); 3 | 4 | if (process.argv.length < 3) { 5 | console.log('ShellJS: missing argument (script name)'); 6 | console.log(); 7 | process.exit(1); 8 | } 9 | 10 | var args, 11 | scriptName = process.argv[2]; 12 | env['NODE_PATH'] = __dirname + '/../..'; 13 | 14 | if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { 15 | if (test('-f', scriptName + '.js')) 16 | scriptName += '.js'; 17 | if (test('-f', scriptName + '.coffee')) 18 | scriptName += '.coffee'; 19 | } 20 | 21 | if (!test('-f', scriptName)) { 22 | console.log('ShellJS: script not found ('+scriptName+')'); 23 | console.log(); 24 | process.exit(1); 25 | } 26 | 27 | args = process.argv.slice(3); 28 | 29 | for (var i = 0, l = args.length; i < l; i++) { 30 | if (args[i][0] !== "-"){ 31 | args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words 32 | } 33 | } 34 | 35 | if (scriptName.match(/\.coffee$/)) { 36 | // 37 | // CoffeeScript 38 | // 39 | if (which('coffee')) { 40 | exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); 41 | } else { 42 | console.log('ShellJS: CoffeeScript interpreter not found'); 43 | console.log(); 44 | process.exit(1); 45 | } 46 | } else { 47 | // 48 | // JavaScript 49 | // 50 | exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); 51 | } 52 | -------------------------------------------------------------------------------- /platforms/ios/cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # Valid values for "--target" (case insensitive): 21 | # "iPhone Retina (3.5-inch)" (default) 22 | # "iPhone Retina (4-inch)" 23 | # "iPhone" 24 | # "iPad" 25 | # "iPad Retina" 26 | 27 | set -e 28 | 29 | echo \""iPhone (Retina 3.5-inch)"\" 30 | echo \""iPhone (Retina 4-inch)"\" 31 | 32 | # this assumes Xcode 5 minimum not supported by ios-sim yet 33 | # echo \""iPhone (Retina 4-inch 64-bit)"\" 34 | 35 | echo \""iPhone"\" 36 | echo \""iPad"\" 37 | echo \""iPad (Retina)"\" 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/DroidGap.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | /** 23 | * This used to be the class that should be extended by application 24 | * developers, but everything has been moved to CordovaActivity. So 25 | * you should extend CordovaActivity instead of DroidGap. This class 26 | * will be removed at a future time. 27 | * 28 | * @see CordovaActivity 29 | * @deprecated 30 | */ 31 | @Deprecated 32 | public class DroidGap extends CordovaActivity { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ja/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | このプラグインは、その console.log() がすることができます便利なことを確認するものです。 それは、iOS、Ubuntu、Windows Phone 8 および Windows 8 の追加関数を追加します。 場合はあなたのための console.log() の作品に満足しているし、おそらく必要はありませんこのプラグイン。 23 | 24 | ## インストール 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android の癖 30 | 31 | アンドロイド以外のいくつかのプラットフォームで console.log() は console.log (「1」、「2」、「3」) など、複数の引数に動作します。 しかし、アンドロイドは、最初の引数でのみ動作します。 Console.log() に後続の引数は無視されます。 このプラグインが原因ではない、それは Android の自体の制限です。 -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import "CDVCommandDelegate.h" 22 | 23 | @class CDVViewController; 24 | @class CDVCommandQueue; 25 | 26 | @interface CDVCommandDelegateImpl : NSObject { 27 | @private 28 | __weak CDVViewController* _viewController; 29 | NSRegularExpression *_callbackIdPattern; 30 | @protected 31 | __weak CDVCommandQueue* _commandQueue; 32 | BOOL _delayResponses; 33 | } 34 | - (id)initWithViewController:(CDVViewController*)viewController; 35 | - (void)flushCommandQueueWithDelayedJs; 36 | @end 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ko/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | 이 플러그인을 console.log()로 수 유용 되도록 의미입니다. IOS, 우분투, Windows Phone 8 및 윈도우 8에 대 한 추가 기능을 추가 하 고 합니다. Console.log() 당신을 위해 작동 하는 어떻게 행복 한 경우에, 그때 당신은 아마 필요 하지 않습니다이 플러그인. 23 | 24 | ## 설치 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### 안 드 로이드 단점 30 | 31 | 안 드 로이드 이외의 일부 플랫폼에서 console.log() console.log ("1", "2", "3")와 같이 여러 인수에 작동할 것 이다. 그러나, 안 드 로이드는 첫 번째 인수에만 작동할 것 이다. Console.log() 후속 인수는 무시 됩니다. 이 플러그인의 원인이 되지 않습니다, 그리고 그것은 안 드 로이드 자체의 한계입니다. -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSArray+Comparisons.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "NSArray+Comparisons.h" 21 | 22 | @implementation NSArray (Comparisons) 23 | 24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault 25 | { 26 | id obj = nil; 27 | 28 | @try { 29 | obj = [self objectAtIndex:index]; 30 | if ((obj == [NSNull null]) || (obj == nil)) { 31 | return aDefault; 32 | } 33 | } 34 | @catch(NSException* exception) { 35 | NSLog(@"Exception - Name: %@ Reason: %@", [exception name], [exception reason]); 36 | } 37 | 38 | return obj; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /platforms/ios/cordova/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Licensed to the Apache Software Foundation (ASF) under one 5 | # or more contributor license agreements. See the NOTICE file 6 | # distributed with this work for additional information 7 | # regarding copyright ownership. The ASF licenses this file 8 | # to you under the Apache License, Version 2.0 (the 9 | # "License"); you may not use this file except in compliance 10 | # with the License. You may obtain a copy of the License at 11 | # 12 | # http://www.apache.org/licenses/LICENSE-2.0 13 | # 14 | # Unless required by applicable law or agreed to in writing, 15 | # software distributed under the License is distributed on an 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | # KIND, either express or implied. See the License for the 18 | # specific language governing permissions and limitations 19 | # under the License. 20 | # 21 | 22 | # 23 | # Clean a Cordova/iOS project 24 | # 25 | 26 | set -e 27 | 28 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) 29 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")" 30 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj ) 31 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj) 32 | 33 | source "$CORDOVA_PATH/check_reqs" 34 | 35 | cd "$PROJECT_PATH" 36 | 37 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean 38 | xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Release -alltargets clean 39 | 40 | rm -rf "build" -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/spdy/Variant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal.spdy; 17 | 18 | import java.io.InputStream; 19 | import java.io.OutputStream; 20 | 21 | /** A version and dialect of the framed socket protocol. */ 22 | interface Variant { 23 | Variant SPDY3 = new Spdy3(); 24 | Variant HTTP_20_DRAFT_06 = new Http20Draft06(); 25 | 26 | /** 27 | * @param client true if this is the HTTP client's reader, reading frames from 28 | * a peer SPDY or HTTP/2 server. 29 | */ 30 | FrameReader newReader(InputStream in, boolean client); 31 | 32 | /** 33 | * @param client true if this is the HTTP client's writer, writing frames to a 34 | * peer SPDY or HTTP/2 server. 35 | */ 36 | FrameWriter newWriter(OutputStream out, boolean client); 37 | } 38 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Classes/MainViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // 21 | // MainViewController.h 22 | // YoutubeVideoPlayerProject 23 | // 24 | // Created by ___FULLUSERNAME___ on ___DATE___. 25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 26 | // 27 | 28 | #import 29 | #import 30 | #import 31 | 32 | @interface MainViewController : CDVViewController 33 | 34 | @end 35 | 36 | @interface MainCommandDelegate : CDVCommandDelegateImpl 37 | @end 38 | 39 | @interface MainCommandQueue : CDVCommandQueue 40 | @end 41 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDVCommandQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @class CDVInvokedUrlCommand; 23 | @class CDVViewController; 24 | 25 | @interface CDVCommandQueue : NSObject 26 | 27 | @property (nonatomic, readonly) BOOL currentlyExecuting; 28 | 29 | - (id)initWithViewController:(CDVViewController*)viewController; 30 | - (void)dispose; 31 | 32 | - (void)resetRequestId; 33 | - (void)enqueueCommandBatch:(NSString*)batchJSON; 34 | 35 | - (void)processXhrExecBridgePoke:(NSNumber*)requestId; 36 | - (void)fetchCommandsFromJs; 37 | - (void)executePending; 38 | - (BOOL)execute:(CDVInvokedUrlCommand*)command; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/CDV.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "CDVAvailability.h" 21 | 22 | #import "CDVPlugin.h" 23 | #import "CDVViewController.h" 24 | #import "CDVCommandDelegate.h" 25 | #import "CDVURLProtocol.h" 26 | #import "CDVInvokedUrlCommand.h" 27 | 28 | #import "CDVDebug.h" 29 | #import "CDVPluginResult.h" 30 | #import "CDVWhitelist.h" 31 | #import "CDVLocalStorage.h" 32 | #import "CDVScreenOrientationDelegate.h" 33 | #import "CDVTimer.h" 34 | 35 | #import "NSArray+Comparisons.h" 36 | #import "NSData+Base64.h" 37 | #import "NSDictionary+Extensions.h" 38 | #import "NSMutableArray+QueueAdditions.h" 39 | #import "UIDevice+Extensions.h" 40 | 41 | #import "CDVJSON.h" 42 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/sed.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### sed([options ,] search_regex, replace_str, file) 6 | //@ Available options: 7 | //@ 8 | //@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ 9 | //@ 10 | //@ Examples: 11 | //@ 12 | //@ ```javascript 13 | //@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); 14 | //@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); 15 | //@ ``` 16 | //@ 17 | //@ Reads an input string from `file` and performs a JavaScript `replace()` on the input 18 | //@ using the given search regex and replacement string. Returns the new string after replacement. 19 | function _sed(options, regex, replacement, file) { 20 | options = common.parseOptions(options, { 21 | 'i': 'inplace' 22 | }); 23 | 24 | if (typeof replacement === 'string') 25 | replacement = replacement; // no-op 26 | else if (typeof replacement === 'number') 27 | replacement = replacement.toString(); // fallback 28 | else 29 | common.error('invalid replacement string'); 30 | 31 | if (!file) 32 | common.error('no file given'); 33 | 34 | if (!fs.existsSync(file)) 35 | common.error('no such file or directory: ' + file); 36 | 37 | var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); 38 | if (options.inplace) 39 | fs.writeFileSync(file, result, 'utf8'); 40 | 41 | return common.ShellString(result); 42 | } 43 | module.exports = _sed; 44 | -------------------------------------------------------------------------------- /platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /platforms/android/cordova/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var run = require('./lib/run'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Support basic help commands 27 | if (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || 28 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 29 | run.help(); 30 | } else { 31 | reqs.run().done(function() { 32 | return run.run(args); 33 | }, function(err) { 34 | console.error('ERROR: ' + err); 35 | process.exit(2); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/clean.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var build = require('./build'), 23 | spawn = require('./spawn'), 24 | path = require('path'); 25 | 26 | /* 27 | * Cleans the project using ant 28 | * Returns a promise. 29 | */ 30 | module.exports.run = function() { 31 | var args = build.getAntArgs('clean'); 32 | return spawn('ant', args); 33 | } 34 | 35 | module.exports.help = function() { 36 | console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); 37 | console.log('Cleans the project directory.'); 38 | process.exit(0); 39 | } 40 | -------------------------------------------------------------------------------- /platforms/android/cordova/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var build = require('./lib/build'), 23 | reqs = require('./lib/check_reqs'), 24 | args = process.argv; 25 | 26 | // Support basic help commands 27 | if(args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || 28 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 29 | build.help(); 30 | } else { 31 | reqs.run().then(function() { 32 | return build.run(args[2]); 33 | }).done(null, function(err) { 34 | console.error(err); 35 | process.exit(2); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'), 23 | args = process.argv; 24 | 25 | var install_target; 26 | if(args.length > 2) { 27 | if (args[2].substring(0, 9) == '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.install(install_target).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /platforms/android/cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'), 23 | args = process.argv; 24 | 25 | var install_target; 26 | if(args.length > 2) { 27 | if (args[2].substring(0, 9) == '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.start(install_target).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/spdy/IncomingStreamHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal.spdy; 18 | 19 | import java.io.IOException; 20 | 21 | /** Listener to be notified when a connected peer creates a new stream. */ 22 | public interface IncomingStreamHandler { 23 | IncomingStreamHandler REFUSE_INCOMING_STREAMS = new IncomingStreamHandler() { 24 | @Override public void receive(SpdyStream stream) throws IOException { 25 | stream.close(ErrorCode.REFUSED_STREAM); 26 | } 27 | }; 28 | 29 | /** 30 | * Handle a new stream from this connection's peer. Implementations should 31 | * respond by either {@link SpdyStream#reply replying to the stream} or 32 | * {@link SpdyStream#close closing it}. This response does not need to be 33 | * synchronous. 34 | */ 35 | void receive(SpdyStream stream) throws IOException; 36 | } 37 | -------------------------------------------------------------------------------- /platforms/android/src/com/bunkerpalace/YoutubVideoPlayerProject/YoutubeVideoPlayerProject.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package com.bunkerpalace.YoutubVideoPlayerProject; 21 | 22 | import android.os.Bundle; 23 | import org.apache.cordova.*; 24 | 25 | public class YoutubeVideoPlayerProject extends CordovaActivity 26 | { 27 | @Override 28 | public void onCreate(Bundle savedInstanceState) 29 | { 30 | super.onCreate(savedInstanceState); 31 | super.init(); 32 | // Set by in config.xml 33 | super.loadUrl(Config.getStartUrl()); 34 | //super.loadUrl("file:///android_asset/www/index.html"); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/#contribute). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/wp/DebugConsole.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed under the Apache License, Version 2.0 (the "License"); 3 | you may not use this file except in compliance with the License. 4 | You may obtain a copy of the License at 5 | 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Unless required by applicable law or agreed to in writing, software 9 | distributed under the License is distributed on an "AS IS" BASIS, 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | See the License for the specific language governing permissions and 12 | limitations under the License. 13 | */ 14 | 15 | using System; 16 | using System.Net; 17 | using System.Windows; 18 | using System.Windows.Controls; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Media; 23 | using System.Windows.Media.Animation; 24 | using System.Windows.Shapes; 25 | using System.Diagnostics; 26 | 27 | namespace WPCordovaClassLib.Cordova.Commands 28 | { 29 | public class DebugConsole : BaseCommand 30 | { 31 | public void logLevel(string options) 32 | { 33 | string[] args = JSON.JsonHelper.Deserialize(options); 34 | string level = args[0]; 35 | string msg = args[1]; 36 | 37 | if (level.Equals("LOG")) 38 | { 39 | Debug.WriteLine(msg); 40 | } 41 | else 42 | { 43 | Debug.WriteLine(level + ": " + msg); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-small@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "icon-40@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "icon-60@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "idiom" : "iphone", 23 | "size" : "60x60", 24 | "scale" : "3x" 25 | }, 26 | { 27 | "size" : "29x29", 28 | "idiom" : "ipad", 29 | "filename" : "icon-small.png", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "size" : "29x29", 34 | "idiom" : "ipad", 35 | "filename" : "icon-small@2x.png", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "size" : "40x40", 40 | "idiom" : "ipad", 41 | "filename" : "icon-40.png", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "size" : "40x40", 46 | "idiom" : "ipad", 47 | "filename" : "icon-40@2x.png", 48 | "scale" : "2x" 49 | }, 50 | { 51 | "size" : "76x76", 52 | "idiom" : "ipad", 53 | "filename" : "icon-76.png", 54 | "scale" : "1x" 55 | }, 56 | { 57 | "size" : "76x76", 58 | "idiom" : "ipad", 59 | "filename" : "icon-76@2x.png", 60 | "scale" : "2x" 61 | } 62 | ], 63 | "info" : { 64 | "version" : 1, 65 | "author" : "xcode" 66 | } 67 | } -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/find.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var common = require('./common'); 3 | var _ls = require('./ls'); 4 | 5 | //@ 6 | //@ ### find(path [,path ...]) 7 | //@ ### find(path_array) 8 | //@ Examples: 9 | //@ 10 | //@ ```javascript 11 | //@ find('src', 'lib'); 12 | //@ find(['src', 'lib']); // same as above 13 | //@ find('.').filter(function(file) { return file.match(/\.js$/); }); 14 | //@ ``` 15 | //@ 16 | //@ Returns array of all files (however deep) in the given paths. 17 | //@ 18 | //@ The main difference from `ls('-R', path)` is that the resulting file names 19 | //@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. 20 | function _find(options, paths) { 21 | if (!paths) 22 | common.error('no path specified'); 23 | else if (typeof paths === 'object') 24 | paths = paths; // assume array 25 | else if (typeof paths === 'string') 26 | paths = [].slice.call(arguments, 1); 27 | 28 | var list = []; 29 | 30 | function pushFile(file) { 31 | if (common.platform === 'win') 32 | file = file.replace(/\\/g, '/'); 33 | list.push(file); 34 | } 35 | 36 | // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs 37 | // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory 38 | 39 | paths.forEach(function(file) { 40 | pushFile(file); 41 | 42 | if (fs.statSync(file).isDirectory()) { 43 | _ls('-RA', file+'/*').forEach(function(subfile) { 44 | pushFile(subfile); 45 | }); 46 | } 47 | }); 48 | 49 | return list; 50 | } 51 | module.exports = _find; 52 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/AbstractOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.squareup.okhttp.internal; 18 | 19 | import java.io.IOException; 20 | import java.io.OutputStream; 21 | 22 | /** 23 | * An output stream for an HTTP request body. 24 | * 25 | *

Since a single socket's output stream may be used to write multiple HTTP 26 | * requests to the same server, subclasses should not close the socket stream. 27 | */ 28 | public abstract class AbstractOutputStream extends OutputStream { 29 | protected boolean closed; 30 | 31 | @Override public final void write(int data) throws IOException { 32 | write(new byte[] { (byte) data }); 33 | } 34 | 35 | protected final void checkNotClosed() throws IOException { 36 | if (closed) { 37 | throw new IOException("stream closed"); 38 | } 39 | } 40 | 41 | /** Returns true if this stream was closed locally. */ 42 | public boolean isClosed() { 43 | return closed; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/es/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Este plugin es para asegurarse de que console.log() es tan útil como puede ser. Añade función adicional para iOS, Windows Phone 8, Ubuntu y Windows 8. Si estás contento con cómo funciona console.log() para ti, entonces probablemente no necesitas este plugin. 23 | 24 | ## Instalación 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Rarezas Android 30 | 31 | En algunas plataformas que no sean Android, console.log() actuará en varios argumentos, como console.log ("1", "2", "3"). Sin embargo, Android actuará sólo en el primer argumento. Se omitirá posteriores argumentos para console.log(). Este plugin no es la causa de eso, es una limitación propia de Android. -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/src/grep.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | //@ 5 | //@ ### grep([options ,] regex_filter, file [, file ...]) 6 | //@ ### grep([options ,] regex_filter, file_array) 7 | //@ Available options: 8 | //@ 9 | //@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. 10 | //@ 11 | //@ Examples: 12 | //@ 13 | //@ ```javascript 14 | //@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); 15 | //@ grep('GLOBAL_VARIABLE', '*.js'); 16 | //@ ``` 17 | //@ 18 | //@ Reads input string from given files and returns a string containing all lines of the 19 | //@ file that match the given `regex_filter`. Wildcard `*` accepted. 20 | function _grep(options, regex, files) { 21 | options = common.parseOptions(options, { 22 | 'v': 'inverse' 23 | }); 24 | 25 | if (!files) 26 | common.error('no paths given'); 27 | 28 | if (typeof files === 'string') 29 | files = [].slice.call(arguments, 2); 30 | // if it's array leave it as it is 31 | 32 | files = common.expand(files); 33 | 34 | var grep = ''; 35 | files.forEach(function(file) { 36 | if (!fs.existsSync(file)) { 37 | common.error('no such file or directory: ' + file, true); 38 | return; 39 | } 40 | 41 | var contents = fs.readFileSync(file, 'utf8'), 42 | lines = contents.split(/\r*\n/); 43 | lines.forEach(function(line) { 44 | var matched = line.match(regex); 45 | if ((options.inverse && !matched) || (!options.inverse && matched)) 46 | grep += line + '\n'; 47 | }); 48 | }); 49 | 50 | return common.ShellString(grep); 51 | } 52 | module.exports = _grep; 53 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | This plugin is meant to ensure that console.log() is as useful as it can be. 23 | It adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows 8. If 24 | you are happy with how console.log() works for you, then you probably 25 | don't need this plugin. 26 | 27 | ## Installation 28 | 29 | cordova plugin add org.apache.cordova.console 30 | 31 | ### Android Quirks 32 | 33 | On some platforms other than Android, console.log() will act on multiple 34 | arguments, such as console.log("1", "2", "3"). However, Android will act only 35 | on the first argument. Subsequent arguments to console.log() will be ignored. 36 | This plugin is not the cause of that, it is a limitation of Android itself. 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/it/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Questo plugin è intesa a garantire che console.log() è tanto utile quanto può essere. Aggiunge una funzione aggiuntiva per iOS, Ubuntu, Windows 8 e Windows Phone 8. Se sei soddisfatto di come console.log() funziona per voi, quindi probabilmente non è necessario questo plugin. 23 | 24 | ## Installazione 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Stranezze Android 30 | 31 | Su alcune piattaforme diverse da Android, console.log() agirà su più argomenti, come ad esempio console ("1", "2", "3"). Tuttavia, Android agirà solo sul primo argomento. Argomenti successivi a console.log() verranno ignorati. Questo plugin non è la causa di ciò, è una limitazione di Android stesso. -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSDictionary+Extensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface NSDictionary (org_apache_cordova_NSDictionary_Extension) 23 | 24 | - (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key; 25 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range; 26 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue; 27 | - (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString; 28 | - (BOOL)valueForKeyIsArray:(NSString*)key; 29 | - (BOOL)valueForKeyIsNull:(NSString*)key; 30 | - (BOOL)valueForKeyIsString:(NSString*)key; 31 | - (BOOL)valueForKeyIsNumber:(NSString*)key; 32 | 33 | - (NSDictionary*)dictionaryWithLowercaseKeys; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/org/apache/cordova/JSONUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | import org.json.JSONArray; 25 | import org.json.JSONException; 26 | 27 | @Deprecated // Deprecated in 3.1. To be removed in 4.0. 28 | public class JSONUtils { 29 | public static List toStringList(JSONArray array) throws JSONException { 30 | if(array == null) { 31 | return null; 32 | } 33 | else { 34 | List list = new ArrayList(); 35 | 36 | for (int i = 0; i < array.length(); i++) { 37 | list.add(array.get(i).toString()); 38 | } 39 | 40 | return list; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/pl/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Ten plugin jest przeznaczona do zapewnienia, że console.log() jest tak przydatne, jak to może być. To dodaje dodatkową funkcję dla iOS, Ubuntu, Windows Phone 8 i Windows 8. Jeśli jesteś zadowolony z jak console.log() pracuje dla Ciebie, wtedy prawdopodobnie nie potrzebują tej wtyczki. 23 | 24 | ## Instalacji 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android dziwactwa 30 | 31 | Na niektórych platformach innych niż Android console.log() będzie działać na wielu argumentów, takich jak console.log ("1", "2", "3"). Jednak Android będzie działać tylko na pierwszy argument. Kolejne argumenty do console.log() będą ignorowane. Ten plugin nie jest przyczyną, że, jest to ograniczenie Androida, sam. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ru/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Этот плагин предназначен для обеспечения как полезным, поскольку это может быть что console.log(). Он добавляет дополнительные функции для iOS, Ubuntu, Windows Phone 8 и Windows 8. Если вы не довольны как console.log() работает для вас, то вы вероятно не нужен этот плагин. 23 | 24 | ## Установка 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android причуды 30 | 31 | На некоторых платформах, отличных от Android console.log() будет действовать на нескольких аргументов, например console.log («1», «2», «3»). Тем не менее Android будет действовать только на первого аргумента. Последующие аргументы для console.log() будет игнорироваться. Этот плагин не является причиной этого, это ограничение Android сам. -------------------------------------------------------------------------------- /platforms/android/cordova/lib/install-device: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var device = require('./device'), 23 | args = process.argv; 24 | 25 | if(args.length > 2) { 26 | var install_target; 27 | if (args[2].substring(0, 9) == '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | device.install(install_target).done(null, function(err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | } else { 34 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 35 | process.exit(2); 36 | } 37 | } else { 38 | device.install().done(null, function(err) { 39 | console.error('ERROR: ' + err); 40 | process.exit(2); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /platforms/android/cordova/node_modules/shelljs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Artur Adib 2 | All rights reserved. 3 | 4 | You may use this project under the terms of the New BSD license as follows: 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Artur Adib nor the 14 | names of the contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/NSMutableArray+QueueAdditions.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "NSMutableArray+QueueAdditions.h" 21 | 22 | @implementation NSMutableArray (QueueAdditions) 23 | 24 | - (id)queueHead 25 | { 26 | if ([self count] == 0) { 27 | return nil; 28 | } 29 | 30 | return [self objectAtIndex:0]; 31 | } 32 | 33 | - (__autoreleasing id)dequeue 34 | { 35 | if ([self count] == 0) { 36 | return nil; 37 | } 38 | 39 | id head = [self objectAtIndex:0]; 40 | if (head != nil) { 41 | // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing 42 | [self removeObjectAtIndex:0]; 43 | } 44 | 45 | return head; 46 | } 47 | 48 | - (id)pop 49 | { 50 | return [self dequeue]; 51 | } 52 | 53 | - (void)enqueue:(id)object 54 | { 55 | [self addObject:object]; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | // 21 | // AppDelegate.h 22 | // YoutubeVideoPlayerProject 23 | // 24 | // Created by ___FULLUSERNAME___ on ___DATE___. 25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. 26 | // 27 | 28 | #import 29 | 30 | #import 31 | 32 | @interface AppDelegate : NSObject {} 33 | 34 | // invoke string is passed to your app on launch, this is only valid if you 35 | // edit YoutubeVideoPlayerProject-Info.plist to add a protocol 36 | // a simple tutorial can be found here : 37 | // http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html 38 | 39 | @property (nonatomic, strong) IBOutlet UIWindow* window; 40 | @property (nonatomic, strong) IBOutlet CDVViewController* viewController; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/fr/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Ce plugin est destiné à faire en sorte que console.log() est aussi utile que possible. Il ajoute une fonction supplémentaire pour iOS, Ubuntu, Windows Phone 8 et Windows 8. Si vous êtes satisfait du fonctionnement de console.log() pour vous, alors vous avez probablement pas besoin ce plugin. 23 | 24 | ## Installation 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Quirks Android 30 | 31 | Sur certaines plateformes autres que Android, console.log() va agir sur plusieurs arguments, tels que console.log ("1", "2", "3"). Toutefois, Android doit agir uniquement sur le premier argument. Les arguments suivants à console.log() seront ignorées. Ce plugin n'est pas la cause de cela, il s'agit d'une limitation d'Android lui-même. -------------------------------------------------------------------------------- /platforms/android/cordova/lib/exec.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var child_process = require('child_process'), 23 | Q = require('q'); 24 | 25 | // Takes a command and optional current working directory. 26 | // Returns a promise that either resolves with the stdout, or 27 | // rejects with an error message and the stderr. 28 | module.exports = function(cmd, opt_cwd) { 29 | var d = Q.defer(); 30 | try { 31 | child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000}, function(err, stdout, stderr) { 32 | if (err) d.reject('Error executing "' + cmd + '": ' + stderr); 33 | else d.resolve(stdout); 34 | }); 35 | } catch(e) { 36 | console.error('error caught: ' + e); 37 | d.reject(e); 38 | } 39 | return d.promise; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/de/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Dieses Plugin ist gedacht, um sicherzustellen, dass diese console.log() eignet sich wie es sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows 8 hinzu. Wenn Sie zufrieden sind mit der Funktionsweise von console.log() für Sie, brauchen dann Sie vermutlich dieses Plugin nicht. 23 | 24 | ## Installation 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android Macken 30 | 31 | Auf einigen Plattformen als Android fungieren console.log() auf mehrere Argumente wie console.log ("1", "2", "3"). Android wird jedoch nur auf das erste Argument fungieren. Nachfolgende Argumente zu console.log() werden ignoriert. Dieses Plugin ist nicht die Verantwortung dafür, es ist eine Einschränkung von Android selbst. -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/spdy/HeadersMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal.spdy; 17 | 18 | enum HeadersMode { 19 | SPDY_SYN_STREAM, 20 | SPDY_REPLY, 21 | SPDY_HEADERS, 22 | HTTP_20_HEADERS; 23 | 24 | /** Returns true if it is an error these headers to create a new stream. */ 25 | public boolean failIfStreamAbsent() { 26 | return this == SPDY_REPLY || this == SPDY_HEADERS; 27 | } 28 | 29 | /** Returns true if it is an error these headers to update an existing stream. */ 30 | public boolean failIfStreamPresent() { 31 | return this == SPDY_SYN_STREAM; 32 | } 33 | 34 | /** 35 | * Returns true if it is an error these headers to be the initial headers of a 36 | * response. 37 | */ 38 | public boolean failIfHeadersAbsent() { 39 | return this == SPDY_HEADERS; 40 | } 41 | 42 | /** 43 | * Returns true if it is an error these headers to be update existing headers 44 | * of a response. 45 | */ 46 | public boolean failIfHeadersPresent() { 47 | return this == SPDY_REPLY; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": { 8 | "res/xml/config.xml": { 9 | "parents": { 10 | "widget": [ 11 | { 12 | "xml": "", 13 | "count": 1 14 | } 15 | ] 16 | } 17 | }, 18 | "AndroidManifest.xml": { 19 | "parents": { 20 | "/manifest": [ 21 | { 22 | "xml": "", 23 | "count": 1 24 | } 25 | ], 26 | "/manifest/application": [ 27 | { 28 | "xml": "", 29 | "count": 1 30 | } 31 | ] 32 | } 33 | } 34 | } 35 | }, 36 | "installed_plugins": { 37 | "com.bunkerpalace.cordova.YoutubeVideoPlayer": { 38 | "PACKAGE_NAME": "com.bunkerpalace.YoutubVideoPlayerProject" 39 | }, 40 | "org.apache.cordova.console": { 41 | "PACKAGE_NAME": "com.bunkerpalace.YoutubVideoPlayerProject" 42 | } 43 | }, 44 | "dependent_plugins": {} 45 | } -------------------------------------------------------------------------------- /platforms/ios/YoutubeVideoPlayerProject/YoutubeVideoPlayerProject-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | icon.png 13 | CFBundleIcons 14 | 15 | CFBundleIcons~ipad 16 | 17 | CFBundleIdentifier 18 | com.bunkerpalace.YoutubVideoPlayerProject 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | ${PRODUCT_NAME} 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | 0.0.1 27 | CFBundleSignature 28 | ???? 29 | CFBundleVersion 30 | 0.0.1 31 | LSRequiresIPhoneOS 32 | 33 | NSMainNibFile 34 | 35 | NSMainNibFile~ipad 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /plugins/ios.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": { 8 | "framework": { 9 | "parents": { 10 | "MediaPlayer.framework": [ 11 | { 12 | "xml": "false", 13 | "count": 1 14 | } 15 | ], 16 | "AVFoundation.framework": [ 17 | { 18 | "xml": "false", 19 | "count": 1 20 | } 21 | ] 22 | } 23 | }, 24 | "config.xml": { 25 | "parents": { 26 | "/*": [ 27 | { 28 | "xml": "", 29 | "count": 1 30 | }, 31 | { 32 | "xml": "", 33 | "count": 1 34 | } 35 | ] 36 | } 37 | } 38 | } 39 | }, 40 | "installed_plugins": { 41 | "com.bunkerpalace.cordova.YoutubeVideoPlayer": { 42 | "PACKAGE_NAME": "com.bunkerpalace.YoutubVideoPlayerProject" 43 | }, 44 | "org.apache.cordova.console": { 45 | "PACKAGE_NAME": "com.bunkerpalace.YoutubVideoPlayerProject" 46 | } 47 | }, 48 | "dependent_plugins": {} 49 | } -------------------------------------------------------------------------------- /platforms/ios/CordovaLib/Classes/UIDevice+Extensions.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import "UIDevice+Extensions.h" 22 | 23 | @implementation UIDevice (org_apache_cordova_UIDevice_Extension) 24 | 25 | - (NSString*)uniqueAppInstanceIdentifier 26 | { 27 | NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; 28 | static NSString* UUID_KEY = @"CDVUUID"; 29 | 30 | NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; 31 | 32 | if (app_uuid == nil) { 33 | CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); 34 | CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); 35 | 36 | app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString]; 37 | [userDefaults setObject:app_uuid forKey:UUID_KEY]; 38 | [userDefaults synchronize]; 39 | 40 | CFRelease(uuidString); 41 | CFRelease(uuidRef); 42 | } 43 | 44 | return app_uuid; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/Failure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp; 17 | 18 | /** 19 | * A failure attempting to retrieve an HTTP response. 20 | * 21 | *

Warning: Experimental OkHttp 2.0 API

22 | * This class is in beta. APIs are subject to change! 23 | */ 24 | /* OkHttp 2.0: public */ class Failure { 25 | private final Request request; 26 | private final Throwable exception; 27 | 28 | private Failure(Builder builder) { 29 | this.request = builder.request; 30 | this.exception = builder.exception; 31 | } 32 | 33 | public Request request() { 34 | return request; 35 | } 36 | 37 | public Throwable exception() { 38 | return exception; 39 | } 40 | 41 | public static class Builder { 42 | private Request request; 43 | private Throwable exception; 44 | 45 | public Builder request(Request request) { 46 | this.request = request; 47 | return this; 48 | } 49 | 50 | public Builder exception(Throwable exception) { 51 | this.exception = exception; 52 | return this; 53 | } 54 | 55 | public Failure build() { 56 | return new Failure(this); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /platforms/android/CordovaLib/src/com/squareup/okhttp/internal/http/Policy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Square, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.squareup.okhttp.internal.http; 17 | 18 | import java.net.HttpURLConnection; 19 | import java.net.Proxy; 20 | import java.net.URL; 21 | 22 | public interface Policy { 23 | /** Returns true if HTTP response caches should be used. */ 24 | boolean getUseCaches(); 25 | 26 | /** Returns the HttpURLConnection instance to store in the cache. */ 27 | HttpURLConnection getHttpConnectionToCache(); 28 | 29 | /** Returns the current destination URL, possibly a redirect. */ 30 | URL getURL(); 31 | 32 | /** Returns the If-Modified-Since timestamp, or 0 if none is set. */ 33 | long getIfModifiedSince(); 34 | 35 | /** Returns true if a non-direct proxy is specified. */ 36 | boolean usingProxy(); 37 | 38 | /** @see java.net.HttpURLConnection#setChunkedStreamingMode(int) */ 39 | int getChunkLength(); 40 | 41 | /** @see java.net.HttpURLConnection#setFixedLengthStreamingMode(int) */ 42 | long getFixedContentLength(); 43 | 44 | /** 45 | * Sets the current proxy that this connection is using. 46 | * @see java.net.HttpURLConnection#usingProxy 47 | */ 48 | void setSelectedProxy(Proxy proxy); 49 | } 50 | --------------------------------------------------------------------------------