summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/uikit
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/uikit')
-rw-r--r--src/plugins/platforms/uikit/README7
-rw-r--r--src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist41
-rwxr-xr-xsrc/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj503
-rw-r--r--src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo_Prefix.pch8
-rw-r--r--src/plugins/platforms/uikit/examples/flickrdemo/main.mm78
-rwxr-xr-xsrc/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj8
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avaudiooutput.cpp73
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avaudiooutput.h68
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avbackend.cpp127
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avbackend.h73
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avmediaobject.h123
-rw-r--r--src/plugins/platforms/uikit/phonon_av/avmediaobject.mm297
-rw-r--r--src/plugins/platforms/uikit/phonon_av/phonon_av.pro31
-rw-r--r--src/plugins/platforms/uikit/platform.pro27
-rw-r--r--src/plugins/platforms/uikit/uikit.pro29
15 files changed, 1464 insertions, 29 deletions
diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README
index ffd31df..8b43201 100644
--- a/src/plugins/platforms/uikit/README
+++ b/src/plugins/platforms/uikit/README
@@ -18,11 +18,11 @@ After configuring and building Qt you need to also build src/plugins/platforms/u
Simulator:
----------
-configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations
+configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations
Device:
-------
-configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations
+configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations
2) XCode setup:
- there are examples in the examples subdirectory of the platform plugin
@@ -40,6 +40,9 @@ configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -developer-build
- add "$(SRCROOT)/../qmltest" to the include search path if you didn't copy but
linked to the qmlapplicationviewer
- for device set the architecture to armv7 only
+ - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av),
+ #include <phonon/private/factory_p.h>,
+ and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av());
3) Done: Build and Run.
diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist
new file mode 100644
index 0000000..5bc1ac9
--- /dev/null
+++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.nokia.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>wifi</string>
+ </array>
+ <key>UIRequiresPersistentWiFi</key>
+ <true/>
+ <key>UIStatusBarHidden</key>
+ <true/>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ </array>
+</dict>
+</plist>
diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj
new file mode 100755
index 0000000..59aa398
--- /dev/null
+++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj
@@ -0,0 +1,503 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
+ D333CCF213B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */; };
+ D333CCF313B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */; };
+ D333CCF413B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */; };
+ D333CCF513B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */; };
+ D3A51610134B03DE00E30E2F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A5160F134B03DE00E30E2F /* OpenGLES.framework */; };
+ D3A51612134B03E900E30E2F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51611134B03E900E30E2F /* QuartzCore.framework */; };
+ D3A51614134B040600E30E2F /* libQtOpenGL_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */; };
+ D3A51615134B041500E30E2F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51611134B03E900E30E2F /* QuartzCore.framework */; };
+ D3A51616134B041500E30E2F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A5160F134B03DE00E30E2F /* OpenGLES.framework */; };
+ D3A51618134B042A00E30E2F /* libQtOpenGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51617134B042A00E30E2F /* libQtOpenGL.a */; };
+ D3CAA7C813264AAD008BB877 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = D3CAA7C713264AAD008BB877 /* main.mm */; };
+ D3CAA7EC13264F52008BB877 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = D3CAA7C713264AAD008BB877 /* main.mm */; };
+ D3CAA7F013264F52008BB877 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ D3CAA7F113264F52008BB877 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ D3CAA7F213264F52008BB877 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
+ D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; };
+ D3CAA81113264FF0008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; };
+ D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81613265056008BB877 /* libQtCore_debug.a */; };
+ D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */; };
+ D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81813265056008BB877 /* libQtGui_debug.a */; };
+ D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81913265056008BB877 /* libQtScript_debug.a */; };
+ D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81A13265056008BB877 /* libQtSql_debug.a */; };
+ D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA8201326507D008BB877 /* libquikit_debug.a */; };
+ D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA82713265220008BB877 /* libQtNetwork_debug.a */; };
+ D3CAA88A132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; };
+ D3CAA88B132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; };
+ D3D815F31329339300CDE422 /* flickr in Resources */ = {isa = PBXBuildFile; fileRef = D3D815D31329339300CDE422 /* flickr */; };
+ D3D815F4132933AB00CDE422 /* flickr in Resources */ = {isa = PBXBuildFile; fileRef = D3D815D31329339300CDE422 /* flickr */; };
+ D3D8160A13293C9B00CDE422 /* libQtXml_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8160813293C9B00CDE422 /* libQtXml_debug.a */; };
+ D3D8160B13293C9B00CDE422 /* libQtXmlPatterns_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */; };
+ D3D81758132A184300CDE422 /* libQtCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81752132A184300CDE422 /* libQtCore.a */; };
+ D3D81759132A184300CDE422 /* libQtDeclarative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81753132A184300CDE422 /* libQtDeclarative.a */; };
+ D3D8175A132A184300CDE422 /* libQtGui.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81754132A184300CDE422 /* libQtGui.a */; };
+ D3D8175B132A184300CDE422 /* libQtNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81755132A184300CDE422 /* libQtNetwork.a */; };
+ D3D8175C132A184300CDE422 /* libQtScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81756132A184300CDE422 /* libQtScript.a */; };
+ D3D8175D132A184300CDE422 /* libQtSql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81757132A184300CDE422 /* libQtSql.a */; };
+ D3D81760132A185A00CDE422 /* libQtXml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8175E132A185A00CDE422 /* libQtXml.a */; };
+ D3D81761132A185A00CDE422 /* libQtXmlPatterns.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */; };
+ D3D81763132A186B00CDE422 /* libquikit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81762132A186B00CDE422 /* libquikit.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D6058910D05DD3D006BFB54 /* flickrdemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flickrdemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 32CA4F630368D1EE00C91783 /* flickrdemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flickrdemo_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* flickrdemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "flickrdemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+ D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/moc_qmlapplicationviewer.cpp; sourceTree = "<group>"; };
+ D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/qmlapplicationviewer.cpp; sourceTree = "<group>"; };
+ D333CCF113B88A4D0070E08E /* qmlapplicationviewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qmlapplicationviewer.h; path = ../share/qmlapplicationviewer/qmlapplicationviewer.h; sourceTree = "<group>"; };
+ D3A5160F134B03DE00E30E2F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ D3A51611134B03E900E30E2F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtOpenGL_debug.a"; sourceTree = "<group>"; };
+ D3A51617134B042A00E30E2F /* libQtOpenGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtOpenGL.a"; sourceTree = "<group>"; };
+ D3CAA7C713264AAD008BB877 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
+ D3CAA7F613264F52008BB877 /* flickrdemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flickrdemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.2.3.dylib; path = usr/lib/libz.1.2.3.dylib; sourceTree = SDKROOT; };
+ D3CAA81613265056008BB877 /* libQtCore_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtCore_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtDeclarative_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA81813265056008BB877 /* libQtGui_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtGui_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA81913265056008BB877 /* libQtScript_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtScript_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA81A13265056008BB877 /* libQtSql_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtSql_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA8201326507D008BB877 /* libquikit_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms/libquikit_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA82713265220008BB877 /* libQtNetwork_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtNetwork_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3CAA836132652E5008BB877 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../../../../../../lib/fonts; sourceTree = SOURCE_ROOT; };
+ D3D815D31329339300CDE422 /* flickr */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flickr; path = ../../../../../../demos/declarative/flickr; sourceTree = SOURCE_ROOT; };
+ D3D8160813293C9B00CDE422 /* libQtXml_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXml_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXmlPatterns_debug.a"; sourceTree = SOURCE_ROOT; };
+ D3D81752132A184300CDE422 /* libQtCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtCore.a"; sourceTree = SOURCE_ROOT; };
+ D3D81753132A184300CDE422 /* libQtDeclarative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtDeclarative.a"; sourceTree = SOURCE_ROOT; };
+ D3D81754132A184300CDE422 /* libQtGui.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtGui.a"; sourceTree = SOURCE_ROOT; };
+ D3D81755132A184300CDE422 /* libQtNetwork.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtNetwork.a"; sourceTree = SOURCE_ROOT; };
+ D3D81756132A184300CDE422 /* libQtScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtScript.a"; sourceTree = SOURCE_ROOT; };
+ D3D81757132A184300CDE422 /* libQtSql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtSql.a"; sourceTree = SOURCE_ROOT; };
+ D3D8175E132A185A00CDE422 /* libQtXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXml.a"; sourceTree = SOURCE_ROOT; };
+ D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXmlPatterns.a"; sourceTree = SOURCE_ROOT; };
+ D3D81762132A186B00CDE422 /* libquikit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit.a; path = "../../../../../../../qt-lighthouse-ios-device/plugins/platforms/libquikit.a"; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3A51614134B040600E30E2F /* libQtOpenGL_debug.a in Frameworks */,
+ D3A51612134B03E900E30E2F /* QuartzCore.framework in Frameworks */,
+ D3A51610134B03DE00E30E2F /* OpenGLES.framework in Frameworks */,
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
+ D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */,
+ D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */,
+ D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */,
+ D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */,
+ D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */,
+ D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */,
+ D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */,
+ D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */,
+ D3D8160A13293C9B00CDE422 /* libQtXml_debug.a in Frameworks */,
+ D3D8160B13293C9B00CDE422 /* libQtXmlPatterns_debug.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D3CAA7EF13264F52008BB877 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3A51618134B042A00E30E2F /* libQtOpenGL.a in Frameworks */,
+ D3CAA7F013264F52008BB877 /* Foundation.framework in Frameworks */,
+ D3CAA7F113264F52008BB877 /* UIKit.framework in Frameworks */,
+ D3CAA7F213264F52008BB877 /* CoreGraphics.framework in Frameworks */,
+ D3A51615134B041500E30E2F /* QuartzCore.framework in Frameworks */,
+ D3A51616134B041500E30E2F /* OpenGLES.framework in Frameworks */,
+ D3CAA81113264FF0008BB877 /* libz.1.2.3.dylib in Frameworks */,
+ D3D81758132A184300CDE422 /* libQtCore.a in Frameworks */,
+ D3D81759132A184300CDE422 /* libQtDeclarative.a in Frameworks */,
+ D3D8175A132A184300CDE422 /* libQtGui.a in Frameworks */,
+ D3D8175B132A184300CDE422 /* libQtNetwork.a in Frameworks */,
+ D3D8175C132A184300CDE422 /* libQtScript.a in Frameworks */,
+ D3D8175D132A184300CDE422 /* libQtSql.a in Frameworks */,
+ D3D81760132A185A00CDE422 /* libQtXml.a in Frameworks */,
+ D3D81761132A185A00CDE422 /* libQtXmlPatterns.a in Frameworks */,
+ D3D81763132A186B00CDE422 /* libquikit.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* flickrdemo.app */,
+ D3CAA7F613264F52008BB877 /* flickrdemo.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ D3CAA7E213264E8C008BB877 /* QMLApplicationViewer */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* flickrdemo_Prefix.pch */,
+ D3CAA7C713264AAD008BB877 /* main.mm */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ D3D815D31329339300CDE422 /* flickr */,
+ D3CAA836132652E5008BB877 /* fonts */,
+ 8D1107310486CEB800E47090 /* flickrdemo-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D3CAA81513265035008BB877 /* Simulator */,
+ D3CAA8141326500A008BB877 /* Device */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */,
+ D3A51611134B03E900E30E2F /* QuartzCore.framework */,
+ D3A5160F134B03DE00E30E2F /* OpenGLES.framework */,
+ D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ D3CAA7E213264E8C008BB877 /* QMLApplicationViewer */ = {
+ isa = PBXGroup;
+ children = (
+ D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */,
+ D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */,
+ D333CCF113B88A4D0070E08E /* qmlapplicationviewer.h */,
+ );
+ name = QMLApplicationViewer;
+ sourceTree = "<group>";
+ };
+ D3CAA8141326500A008BB877 /* Device */ = {
+ isa = PBXGroup;
+ children = (
+ D3D81762132A186B00CDE422 /* libquikit.a */,
+ D3D81752132A184300CDE422 /* libQtCore.a */,
+ D3D81753132A184300CDE422 /* libQtDeclarative.a */,
+ D3D81754132A184300CDE422 /* libQtGui.a */,
+ D3D81755132A184300CDE422 /* libQtNetwork.a */,
+ D3A51617134B042A00E30E2F /* libQtOpenGL.a */,
+ D3D81756132A184300CDE422 /* libQtScript.a */,
+ D3D81757132A184300CDE422 /* libQtSql.a */,
+ D3D8175E132A185A00CDE422 /* libQtXml.a */,
+ D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */,
+ );
+ name = Device;
+ sourceTree = "<group>";
+ };
+ D3CAA81513265035008BB877 /* Simulator */ = {
+ isa = PBXGroup;
+ children = (
+ D3CAA8201326507D008BB877 /* libquikit_debug.a */,
+ D3CAA81613265056008BB877 /* libQtCore_debug.a */,
+ D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */,
+ D3CAA81813265056008BB877 /* libQtGui_debug.a */,
+ D3CAA82713265220008BB877 /* libQtNetwork_debug.a */,
+ D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */,
+ D3CAA81913265056008BB877 /* libQtScript_debug.a */,
+ D3CAA81A13265056008BB877 /* libQtSql_debug.a */,
+ D3D8160813293C9B00CDE422 /* libQtXml_debug.a */,
+ D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */,
+ );
+ name = Simulator;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* flickrdemo simulator */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "flickrdemo simulator" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "flickrdemo simulator";
+ productName = flickrdemo;
+ productReference = 1D6058910D05DD3D006BFB54 /* flickrdemo.app */;
+ productType = "com.apple.product-type.application";
+ };
+ D3CAA7E813264F52008BB877 /* flickrdemo device */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D3CAA7F313264F52008BB877 /* Build configuration list for PBXNativeTarget "flickrdemo device" */;
+ buildPhases = (
+ D3CAA7E913264F52008BB877 /* Resources */,
+ D3CAA7EB13264F52008BB877 /* Sources */,
+ D3CAA7EF13264F52008BB877 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "flickrdemo device";
+ productName = flickrdemo;
+ productReference = D3CAA7F613264F52008BB877 /* flickrdemo.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "flickrdemo" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* flickrdemo simulator */,
+ D3CAA7E813264F52008BB877 /* flickrdemo device */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3CAA88A132652E5008BB877 /* fonts in Resources */,
+ D3D815F31329339300CDE422 /* flickr in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D3CAA7E913264F52008BB877 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3CAA88B132652E5008BB877 /* fonts in Resources */,
+ D3D815F4132933AB00CDE422 /* flickr in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3CAA7C813264AAD008BB877 /* main.mm in Sources */,
+ D333CCF213B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */,
+ D333CCF413B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D3CAA7EB13264F52008BB877 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D3CAA7EC13264F52008BB877 /* main.mm in Sources */,
+ D333CCF313B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */,
+ D333CCF513B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = flickrdemo_Prefix.pch;
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/include\"/**";
+ INFOPLIST_FILE = "flickrdemo-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/lib\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
+ );
+ PRODUCT_NAME = flickrdemo;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = flickrdemo_Prefix.pch;
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/include\"/**";
+ INFOPLIST_FILE = "flickrdemo-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/lib\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
+ );
+ PRODUCT_NAME = flickrdemo;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = 1;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = 1;
+ };
+ name = Release;
+ };
+ D3CAA7F413264F52008BB877 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = flickrdemo_Prefix.pch;
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/include\"/**";
+ INFOPLIST_FILE = "flickrdemo-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/plugins/platforms\"",
+ );
+ PRODUCT_NAME = flickrdemo;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ D3CAA7F513264F52008BB877 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = flickrdemo_Prefix.pch;
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/include\"/**";
+ INFOPLIST_FILE = "flickrdemo-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
+ "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/plugins/platforms\"",
+ );
+ PRODUCT_NAME = flickrdemo;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "flickrdemo simulator" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "flickrdemo" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D3CAA7F313264F52008BB877 /* Build configuration list for PBXNativeTarget "flickrdemo device" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D3CAA7F413264F52008BB877 /* Debug */,
+ D3CAA7F513264F52008BB877 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo_Prefix.pch b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo_Prefix.pch
new file mode 100644
index 0000000..d807759
--- /dev/null
+++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo_Prefix.pch
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'flickrdemo' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif
diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/main.mm b/src/plugins/platforms/uikit/examples/flickrdemo/main.mm
new file mode 100644
index 0000000..3d1feb9
--- /dev/null
+++ b/src/plugins/platforms/uikit/examples/flickrdemo/main.mm
@@ -0,0 +1,78 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** This file is part of the plugins of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:LGPL$
+ ** GNU Lesser General Public License Usage
+ ** This file may be used under the terms of the GNU Lesser General Public
+ ** License version 2.1 as published by the Free Software Foundation and
+ ** appearing in the file LICENSE.LGPL included in the packaging of this
+ ** file. Please review the following information to ensure the GNU Lesser
+ ** General Public License version 2.1 requirements will be met:
+ ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+ **
+ ** In addition, as a special exception, Nokia gives you certain additional
+ ** rights. These rights are described in the Nokia Qt LGPL Exception
+ ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+ **
+ ** GNU General Public License Usage
+ ** Alternatively, this file may be used under the terms of the GNU General
+ ** Public License version 3.0 as published by the Free Software Foundation
+ ** and appearing in the file LICENSE.GPL included in the packaging of this
+ ** file. Please review the following information to ensure the GNU General
+ ** Public License version 3.0 requirements will be met:
+ ** http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** Other Usage
+ ** Alternatively, this file may be used in accordance with the terms and
+ ** conditions contained in a signed written agreement between you and Nokia.
+ **
+ **
+ **
+ **
+ **
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+#import <UIKit/UIKit.h>
+
+#include "../share/qmlapplicationviewer/qmlapplicationviewer.h"
+
+#include <QtGui/QApplication>
+#include <QtCore/QtPlugin>
+#include <QtDeclarative/QDeclarativeEngine>
+
+Q_IMPORT_PLUGIN(UIKit)
+
+static QString qStringFromNSString(NSString *nsstring)
+{
+ return QString::fromUtf8([nsstring UTF8String]);
+}
+
+static QString documentsDirectory()
+{
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *documentsDirectory = [paths objectAtIndex:0];
+ return qStringFromNSString(documentsDirectory);
+}
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+
+ QApplication app(argc, argv);
+ QmlApplicationViewer viewer;
+ viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
+ viewer.engine()->setOfflineStoragePath(documentsDirectory());
+ NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
+ viewer.setMainQmlFile(qStringFromNSString([resourcePath stringByAppendingPathComponent:@"flickr/flickr.qml"]));
+ viewer.showMaximized();
+ int retVal = app.exec();
+ [pool release];
+ return retVal;
+}
diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj
index 02a028d..96c1932 100755
--- a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj
+++ b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj
@@ -358,12 +358,14 @@
GCC_PREFIX_HEADER = qmltest_Prefix.pch;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/include\"/**";
INFOPLIST_FILE = "qmltest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/lib\"",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms\"",
);
PRODUCT_NAME = qmltest;
+ TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
@@ -377,12 +379,14 @@
GCC_PREFIX_HEADER = qmltest_Prefix.pch;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/include\"/**";
INFOPLIST_FILE = "qmltest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/lib\"",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms\"",
);
PRODUCT_NAME = qmltest;
+ TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -426,12 +430,14 @@
GCC_PREFIX_HEADER = qmltest_Prefix.pch;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/include\"/**";
INFOPLIST_FILE = "qmltest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/plugins/platforms\"",
);
PRODUCT_NAME = qmltest;
+ TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
@@ -445,12 +451,14 @@
GCC_PREFIX_HEADER = qmltest_Prefix.pch;
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/include\"/**";
INFOPLIST_FILE = "qmltest-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/lib\"",
"\"$(SRCROOT)/../../../../../../../qt-lighthouse-ios-device/plugins/platforms\"",
);
PRODUCT_NAME = qmltest;
+ TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
diff --git a/src/plugins/platforms/uikit/phonon_av/avaudiooutput.cpp b/src/plugins/platforms/uikit/phonon_av/avaudiooutput.cpp
new file mode 100644
index 0000000..97ab6c9
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avaudiooutput.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "avaudiooutput.h"
+
+AVAudioOutput::AVAudioOutput(QObject *parent)
+ : QObject(parent),
+ m_volume(1.)
+{
+}
+
+AVAudioOutput::~AVAudioOutput()
+{
+}
+
+qreal AVAudioOutput::volume() const
+{
+ return m_volume;
+}
+
+void AVAudioOutput::setVolume(qreal value)
+{
+ m_volume = value;
+ emit volumeChanged(value);
+}
+
+int AVAudioOutput::outputDevice() const
+{
+ return 0;
+}
+
+bool AVAudioOutput::setOutputDevice(int newDevice)
+{
+ return (newDevice == 0);
+}
diff --git a/src/plugins/platforms/uikit/phonon_av/avaudiooutput.h b/src/plugins/platforms/uikit/phonon_av/avaudiooutput.h
new file mode 100644
index 0000000..4b08b06
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avaudiooutput.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AV_AUDIOOUTPUT_H
+#define AV_AUDIOOUTPUT_H
+
+#include <phonon/audiooutputinterface.h>
+#include <QtCore/QObject>
+
+class AVAudioOutput : public QObject, public Phonon::AudioOutputInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(Phonon::AudioOutputInterface)
+public:
+ AVAudioOutput(QObject *parent);
+ ~AVAudioOutput();
+
+ qreal volume() const;
+ void setVolume(qreal value);
+ int outputDevice() const;
+ bool setOutputDevice(int newDevice);
+
+Q_SIGNALS:
+ void audioDeviceFailed();
+ void volumeChanged(qreal);
+private:
+ qreal m_volume;
+};
+
+#endif // AV_AUDIOOUTPUT_H
diff --git a/src/plugins/platforms/uikit/phonon_av/avbackend.cpp b/src/plugins/platforms/uikit/phonon_av/avbackend.cpp
new file mode 100644
index 0000000..ba1f808
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avbackend.cpp
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "avbackend.h"
+#include "avaudiooutput.h"
+#include "avmediaobject.h"
+
+#include <QtCore/QSet>
+#include <QtCore/QSettings>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+#include <QtCore/QtPlugin>
+
+AVBackend::AVBackend(QObject *parent)
+ : QObject(parent)
+{
+}
+
+AVBackend::~AVBackend()
+{
+}
+
+QObject *AVBackend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
+{
+ Q_UNUSED(args);
+ switch (c)
+ {
+ case MediaObjectClass:
+ return new AVMediaObject(parent);
+ case AudioOutputClass:
+ return new AVAudioOutput(parent);
+ default:
+ return 0;
+ }
+}
+
+QList<int> AVBackend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const
+{
+ if (type == Phonon::AudioOutputDeviceType)
+ return QList<int>() << 0;
+ return QList<int>();
+}
+
+QHash<QByteArray, QVariant> AVBackend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const
+{
+ Q_UNUSED(index);
+ QHash<QByteArray, QVariant> r;
+ if (type == Phonon::AudioOutputDeviceType)
+ r["name"] = QLatin1String("AVAudioPlayer");
+ return r;
+}
+
+bool AVBackend::startConnectionChange(QSet<QObject *> connection)
+{
+ Q_UNUSED(connection)
+ return true;
+}
+
+bool AVBackend::connectNodes(QObject *node1, QObject *node2)
+{
+ AVMediaObject *media = qobject_cast<AVMediaObject*>(node1);
+ AVAudioOutput *output = qobject_cast<AVAudioOutput*>(node2);
+ if (media && output)
+ media->setAudioOutput(output);
+ return true;
+}
+
+bool AVBackend::disconnectNodes(QObject *node1, QObject *node2)
+{
+ AVMediaObject *media = qobject_cast<AVMediaObject*>(node1);
+ AVAudioOutput *output = qobject_cast<AVAudioOutput*>(node2);
+ if (media && output)
+ media->setAudioOutput(0);
+ return true;
+}
+
+bool AVBackend::endConnectionChange(QSet<QObject *> connection)
+{
+ Q_UNUSED(connection)
+ return true;
+}
+
+QStringList AVBackend::availableMimeTypes() const
+{
+ return QStringList();
+}
+
+Q_EXPORT_PLUGIN2(phonon_av, AVBackend)
diff --git a/src/plugins/platforms/uikit/phonon_av/avbackend.h b/src/plugins/platforms/uikit/phonon_av/avbackend.h
new file mode 100644
index 0000000..cfb1bfc
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avbackend.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AV_BACKEND_H
+#define AV_BACKEND_H
+
+#include <phonon/backendinterface.h>
+#include <phonon/phononnamespace.h>
+
+#include <QtCore/QList>
+
+class AVAudioOutput;
+class AVMediaObject;
+
+class AVBackend : public QObject, public Phonon::BackendInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(Phonon::BackendInterface)
+public:
+ AVBackend(QObject *parent = 0);
+ ~AVBackend();
+
+ QObject *createObject(Phonon::BackendInterface::Class, QObject *parent, const QList<QVariant> &args);
+ QList<int> objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const;
+ QHash<QByteArray, QVariant> objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const;
+
+ bool startConnectionChange(QSet<QObject *> connection);
+ bool connectNodes(QObject *node1, QObject *node2);
+ bool disconnectNodes(QObject *node1, QObject *node2);
+ bool endConnectionChange(QSet<QObject *> connection);
+
+ QStringList availableMimeTypes() const;
+};
+
+#endif // AV_BACKEND_H
diff --git a/src/plugins/platforms/uikit/phonon_av/avmediaobject.h b/src/plugins/platforms/uikit/phonon_av/avmediaobject.h
new file mode 100644
index 0000000..0ca900e
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avmediaobject.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AV_MEDIAOBJECT_H
+#define AV_MEDIAOBJECT_H
+
+#include <phonon/mediaobjectinterface.h>
+
+#include <QtCore/QMultiMap>
+
+class AVAudioOutput;
+class AVMediaObjectPrivate;
+
+using namespace Phonon;
+
+class AVMediaObject : public QObject, public Phonon::MediaObjectInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(Phonon::MediaObjectInterface)
+
+public:
+ AVMediaObject(QObject *parent);
+ ~AVMediaObject();
+ void play();
+ void pause();
+ void stop();
+ void seek(qint64 milliseconds);
+ qint32 tickInterval() const;
+ void setTickInterval(qint32 newTickInterval);
+ bool hasVideo() const;
+ bool isSeekable() const;
+ qint64 currentTime() const;
+ Phonon::State state() const;
+ QString errorString() const;
+ Phonon::ErrorType errorType() const;
+ qint64 totalTime() const;
+ Phonon::MediaSource source() const;
+ void setSource(const Phonon::MediaSource &source);
+ void setNextSource(const Phonon::MediaSource &source);
+
+ qint32 prefinishMark() const;
+ void setPrefinishMark(qint32 newPrefinishMark);
+ qint32 transitionTime() const;
+ void setTransitionTime(qint32);
+
+Q_SIGNALS:
+ void stateChanged(Phonon::State newstate, Phonon::State oldstate);
+ void totalTimeChanged(qint64 length);
+ void currentSourceChanged(const MediaSource&);
+ void aboutToFinish();
+ void finished();
+ //TODO
+ void tick(qint64 time);
+
+// unused
+ void seekableChanged(bool);
+ void hasVideoChanged(bool);
+ void bufferStatus(int);
+ void prefinishMarkReached(qint32);
+ void metaDataChanged(const QMultiMap<QString, QString> &);
+
+public:
+ void setAudioOutput(AVAudioOutput *audioOutput);
+ void handlePlayerFinished();
+
+private Q_SLOTS:
+ void setVolume(qreal newVolume);
+
+private:
+ void changeState(Phonon::State state);
+ bool checkPlayer() const;
+
+ qint32 m_tickInterval;
+ Phonon::State m_state;
+ mutable QString m_errorString;
+ mutable Phonon::ErrorType m_errorType;
+ Phonon::MediaSource m_mediaSource;
+
+ AVAudioOutput *m_output;
+ AVMediaObjectPrivate *d;
+};
+
+QT_END_NAMESPACE
+
+#endif // PHONON_MEDIAOBJECT_H
diff --git a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm
new file mode 100644
index 0000000..388866f
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm
@@ -0,0 +1,297 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "avmediaobject.h"
+#include "avaudiooutput.h"
+
+#include <QtCore/QUrl>
+#import <Foundation/NSString.h>
+#import <Foundation/NSURL.h>
+#import <AVFoundation/AVAudioPlayer.h>
+
+@interface AudioPlayerDelegate : NSObject <AVAudioPlayerDelegate> {
+ AVMediaObject *mediaObject;
+}
+
+- (id)initWithMediaObject:(AVMediaObject *)obj;
+- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag;
+
+@end
+
+@implementation AudioPlayerDelegate
+
+- (id)initWithMediaObject:(AVMediaObject *)obj
+{
+ if (self = [self init]) {
+ mediaObject = obj;
+ }
+ return self;
+}
+
+- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag
+{
+ Q_UNUSED(flag)
+ Q_UNUSED(player)
+ mediaObject->handlePlayerFinished();
+}
+
+@end
+
+class AVMediaObjectPrivate {
+public:
+ AVMediaObjectPrivate(AVMediaObject *parent)
+ : player(0)
+ {
+ delegate = [[AudioPlayerDelegate alloc] initWithMediaObject:parent];
+ }
+ ~AVMediaObjectPrivate()
+ {
+ [delegate release];
+ }
+
+ AVAudioPlayer *player;
+ AudioPlayerDelegate *delegate;
+};
+
+AVMediaObject::AVMediaObject(QObject *parent)
+ : QObject(parent),
+ m_tickInterval(0),
+ m_state(Phonon::LoadingState),
+ m_errorType(Phonon::NoError),
+ m_output(0),
+ d(new AVMediaObjectPrivate(this))
+{
+}
+
+AVMediaObject::~AVMediaObject()
+{
+ if (m_state == Phonon::PlayingState)
+ stop();
+ [d->player release];
+ delete d;
+}
+
+void AVMediaObject::changeState(Phonon::State state)
+{
+ if (m_state == state)
+ return;
+ Phonon::State oldState = m_state;
+ m_state = state;
+ emit stateChanged(m_state, oldState);
+}
+
+bool AVMediaObject::checkPlayer() const
+{
+ if (!d->player) {
+ m_errorType = Phonon::NormalError;
+ m_errorString = tr("Media source has not been set.");
+ return false;
+ }
+ return true;
+}
+
+void AVMediaObject::play()
+{
+ if (!checkPlayer())
+ return;
+ if (![d->player play]) {
+ m_errorType = Phonon::NormalError;
+ m_errorString = tr("Failed to play media source.");
+ return;
+ }
+ changeState(Phonon::PlayingState);
+}
+
+void AVMediaObject::pause()
+{
+ if (!checkPlayer())
+ return;
+ [d->player pause];
+ changeState(Phonon::PausedState);
+}
+
+void AVMediaObject::stop()
+{
+ if (!checkPlayer())
+ return;
+ [d->player stop];
+ d->player.currentTime = 0;
+ changeState(Phonon::StoppedState);
+}
+
+void AVMediaObject::seek(qint64 milliseconds)
+{
+ if (!checkPlayer())
+ return;
+ d->player.currentTime = milliseconds/1000.;
+}
+
+qint32 AVMediaObject::tickInterval() const
+{
+ return m_tickInterval;
+}
+
+void AVMediaObject::setTickInterval(qint32 newTickInterval)
+{
+ m_tickInterval = newTickInterval;
+ //TODO
+}
+
+bool AVMediaObject::hasVideo() const
+{
+ return false;
+}
+
+bool AVMediaObject::isSeekable() const
+{
+ return true;
+}
+
+qint64 AVMediaObject::currentTime() const
+{
+ if (!checkPlayer())
+ return 0;
+ return (qint64)(d->player.currentTime * 1000);
+}
+
+Phonon::State AVMediaObject::state() const
+{
+ return m_state;
+}
+
+QString AVMediaObject::errorString() const
+{
+ return m_errorString;
+}
+
+Phonon::ErrorType AVMediaObject::errorType() const
+{
+ return m_errorType;
+}
+
+qint64 AVMediaObject::totalTime() const
+{
+ if (!checkPlayer())
+ return 0;
+ return d->player.duration;
+}
+
+Phonon::MediaSource AVMediaObject::source() const
+{
+ return m_mediaSource;
+}
+
+void AVMediaObject::setSource(const Phonon::MediaSource &source)
+{
+ if (d->player) {
+ stop();
+ [d->player release];
+ d->player = 0;
+ }
+ m_mediaSource = source;
+ NSString *urlString = [NSString stringWithCString:source.url().toEncoded().constData()
+ encoding:NSASCIIStringEncoding];
+ NSURL *url = [NSURL URLWithString:urlString];
+ d->player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:NULL];
+ if (!d->player) {
+ m_errorString = tr("Failed to create player for '%1'").arg(source.url().toString());
+ changeState(Phonon::ErrorState);
+ return;
+ }
+ d->player.delegate = d->delegate;
+ [d->player prepareToPlay];
+ changeState(Phonon::StoppedState);
+ emit currentSourceChanged(m_mediaSource);
+ emit totalTimeChanged((qint64)(d->player.duration * 1000));
+}
+
+void AVMediaObject::setNextSource(const Phonon::MediaSource &source)
+{
+ setSource(source);
+}
+
+qint32 AVMediaObject::prefinishMark() const
+{
+ // not implemented
+ return 0;
+}
+
+void AVMediaObject::setPrefinishMark(qint32)
+{
+ // not implemented
+}
+
+qint32 AVMediaObject::transitionTime() const
+{
+ // not implemented
+ return 0;
+}
+
+void AVMediaObject::setTransitionTime(qint32)
+{
+ // not implemented
+}
+
+void AVMediaObject::setAudioOutput(AVAudioOutput *audioOutput)
+{
+ if (m_output) {
+ disconnect(m_output, SIGNAL(volumeChanged(qreal)), this, SLOT(setVolume(qreal)));
+ }
+ m_output = audioOutput;
+ if (m_output) {
+ connect(m_output, SIGNAL(volumeChanged(qreal)), this, SLOT(setVolume(qreal)));
+ setVolume(m_output->volume());
+ }
+}
+
+void AVMediaObject::setVolume(qreal newVolume)
+{
+ if (!d->player) // do nothing, will be set when player is created
+ return;
+ [d->player setVolume:qMin((float)1.0, (float)newVolume)];
+}
+
+void AVMediaObject::handlePlayerFinished()
+{
+ emit aboutToFinish();
+ changeState(Phonon::StoppedState);
+ emit finished();
+}
diff --git a/src/plugins/platforms/uikit/phonon_av/phonon_av.pro b/src/plugins/platforms/uikit/phonon_av/phonon_av.pro
new file mode 100644
index 0000000..05af5a3
--- /dev/null
+++ b/src/plugins/platforms/uikit/phonon_av/phonon_av.pro
@@ -0,0 +1,31 @@
+DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
+QT += phonon
+TARGET = phonon_av
+include(../../../qpluginbase.pri)
+
+DEFINES += PHONON_MAKE_QT_ONLY_BACKEND
+
+HEADERS += avaudiooutput.h \
+ avbackend.h \
+ avmediaobject.h
+
+SOURCES += avaudiooutput.cpp \
+ avbackend.cpp
+
+OBJECTIVE_SOURCES += avmediaobject.mm
+
+LIBS += -framework AVFoundation
+
+target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
+INSTALLS += target
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/plugins/platforms/uikit/platform.pro b/src/plugins/platforms/uikit/platform.pro
new file mode 100644
index 0000000..273c00d
--- /dev/null
+++ b/src/plugins/platforms/uikit/platform.pro
@@ -0,0 +1,27 @@
+TARGET = quikit
+include(../../qpluginbase.pri)
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
+
+QT += opengl
+
+OBJECTIVE_SOURCES = main.mm \
+ quikitintegration.mm \
+ quikitwindow.mm \
+ quikitscreen.mm \
+ quikiteventloop.mm \
+ quikitwindowsurface.mm
+
+OBJECTIVE_HEADERS = quikitintegration.h \
+ quikitwindow.h \
+ quikitscreen.h \
+ quikiteventloop.h \
+ quikitwindowsurface.h
+
+HEADERS = quikitsoftwareinputhandler.h
+
+#add libz for freetype.
+LIBS += -lz
+
+include(../fontdatabases/genericunix/genericunix.pri)
+target.path += $$[QT_INSTALL_PLUGINS]/platforms
+INSTALLS += target
diff --git a/src/plugins/platforms/uikit/uikit.pro b/src/plugins/platforms/uikit/uikit.pro
index 273c00d..5cfd8b8 100644
--- a/src/plugins/platforms/uikit/uikit.pro
+++ b/src/plugins/platforms/uikit/uikit.pro
@@ -1,27 +1,2 @@
-TARGET = quikit
-include(../../qpluginbase.pri)
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
-
-QT += opengl
-
-OBJECTIVE_SOURCES = main.mm \
- quikitintegration.mm \
- quikitwindow.mm \
- quikitscreen.mm \
- quikiteventloop.mm \
- quikitwindowsurface.mm
-
-OBJECTIVE_HEADERS = quikitintegration.h \
- quikitwindow.h \
- quikitscreen.h \
- quikiteventloop.h \
- quikitwindowsurface.h
-
-HEADERS = quikitsoftwareinputhandler.h
-
-#add libz for freetype.
-LIBS += -lz
-
-include(../fontdatabases/genericunix/genericunix.pri)
-target.path += $$[QT_INSTALL_PLUGINS]/platforms
-INSTALLS += target
+TEMPLATE = subdirs
+SUBDIRS += platform.pro phonon_av