Browse files

Added 2 new samples for Push

  • Loading branch information...
1 parent dabcb7d commit 4e6d0c9e950312c2fc65f64e2479c6d185a7bf31 Garett committed Jan 9, 2013
Showing with 3,063 additions and 0 deletions.
  1. +178 −0 SimplePushClient/.cproject
  2. +96 −0 SimplePushClient/.project
  3. +33 −0 SimplePushClient/.settings/org.eclipse.cdt.core.prefs
  4. +201 −0 SimplePushClient/LICENSE
  5. +6 −0 SimplePushClient/Makefile
  6. +5 −0 SimplePushClient/Notice
  7. +6 −0 SimplePushClient/SimplePushClient.pro
  8. +37 −0 SimplePushClient/assets/.preview-2790971562758724993qml~
  9. +26 −0 SimplePushClient/assets/.preview-2861339431964139979qml~
  10. +49 −0 SimplePushClient/assets/.preview-7198140380711689755qml~
  11. +42 −0 SimplePushClient/assets/LastPushSceneCover.qml
  12. +66 −0 SimplePushClient/assets/PriorityHeader.qml
  13. +41 −0 SimplePushClient/assets/PushMessageDetailsPage.qml
  14. BIN SimplePushClient/assets/images/icons/highPriority.png
  15. +3 −0 SimplePushClient/assets/images/icons/highPriority.png.amd
  16. BIN SimplePushClient/assets/images/icons/lowPriority.png
  17. +3 −0 SimplePushClient/assets/images/icons/lowPriority.png.amd
  18. BIN SimplePushClient/assets/images/icons/mediumPriority.png
  19. +3 −0 SimplePushClient/assets/images/icons/mediumPriority.png.amd
  20. +95 −0 SimplePushClient/assets/main.qml
  21. +114 −0 SimplePushClient/bar-descriptor.xml
  22. +30 −0 SimplePushClient/config.pri
  23. +2 −0 SimplePushClient/precompiled.h
  24. +47 −0 SimplePushClient/readme.txt
  25. BIN SimplePushClient/simplePushClient.png
  26. +72 −0 SimplePushClient/src/CoverManager.cpp
  27. +39 −0 SimplePushClient/src/CoverManager.hpp
  28. +257 −0 SimplePushClient/src/PushManager.cpp
  29. +82 −0 SimplePushClient/src/PushManager.hpp
  30. +92 −0 SimplePushClient/src/SimplePushClient.cpp
  31. +55 −0 SimplePushClient/src/SimplePushClient.hpp
  32. +50 −0 SimplePushClient/src/main.cpp
  33. +12 −0 SimplePushClient/translations/Makefile
  34. +1 −0 SimplePushClient/translations/SimplePushClient.pro
  35. +4 −0 SimplePushClient/translations/SimplePushClient.ts
  36. +178 −0 SimplePushServer/.cproject
  37. +96 −0 SimplePushServer/.project
  38. +33 −0 SimplePushServer/.settings/org.eclipse.cdt.core.prefs
  39. +201 −0 SimplePushServer/LICENSE
  40. +6 −0 SimplePushServer/Makefile
  41. +5 −0 SimplePushServer/Notice
  42. +6 −0 SimplePushServer/SimplePushServer.pro
  43. +81 −0 SimplePushServer/assets/CustomPrompt.qml
  44. BIN SimplePushServer/assets/images/backgroundFrame.png
  45. +3 −0 SimplePushServer/assets/images/backgroundFrame.png.amd
  46. +127 −0 SimplePushServer/assets/main.qml
  47. +17 −0 SimplePushServer/assets/templates/pap_push.template
  48. +7 −0 SimplePushServer/assets/templates/pap_subscription.template
  49. +102 −0 SimplePushServer/bar-descriptor.xml
  50. +26 −0 SimplePushServer/config.pri
  51. BIN SimplePushServer/icon.png
  52. +2 −0 SimplePushServer/precompiled.h
  53. +42 −0 SimplePushServer/readme.txt
  54. +230 −0 SimplePushServer/src/SimplePushServer.cpp
  55. +84 −0 SimplePushServer/src/SimplePushServer.hpp
  56. +53 −0 SimplePushServer/src/main.cpp
  57. +12 −0 SimplePushServer/translations/Makefile
  58. +1 −0 SimplePushServer/translations/SimplePushServer.pro
  59. +4 −0 SimplePushServer/translations/SimplePushServer.ts
View
178 SimplePushClient/.cproject
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.qnx.qcc.toolChain.1243294312">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1243294312" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1243294312" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1243294312.973659547" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.944024874" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.714873234" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.226907237" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.351862090" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.2033104908" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1668345037" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1243294312.1592579313" incrementalBuildTarget="Device-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1295591634" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1091598010" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1394389968" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.562138115" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.276935144" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.580946632" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.677227431" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.1071017018">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1071017018" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1071017018" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1071017018.985652310" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1560972577" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1214543678" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1899856829" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.1580915477" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1345089619" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1187469145" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1071017018.1314789000" incrementalBuildTarget="Device-Release" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.748982666" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1635650080" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1094540668" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.402844184" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.411270851" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.928716951" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.2022655050" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.780837369">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.780837369" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.780837369" name="Device-Profile" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.780837369.1928628565" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.926864441" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1904154984" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1243347737" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.741841249" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1776115951" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.875044351" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Profile" enableAutoBuild="true" id="com.qnx.qcc.toolChain.780837369.1597523954" incrementalBuildTarget="Device-Profile" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.2114360972" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.549171279" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.92317772" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1263799516" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1648257521" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1420390713" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.872322489" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.1955961617">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1955961617" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1955961617" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1955961617.479026109" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.25386288" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1390648040" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1173504276" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
+ <option id="com.qnx.qcc.option.compiler.480675410" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1548289840" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.542132286" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1955961617.1461838497" incrementalBuildTarget="Simulator-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.2045506120" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1259247492" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.12496625" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.682424613" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1805814473" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.328275669" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1489272961" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="SimplePushClient.null.605975583" name="SimplePushClient"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1243294312">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.780837369">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1955961617">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1071017018">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope"/>
+</cproject>
View
96 SimplePushClient/.project
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SimplePushClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>Device-Debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>Device-Debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.rim.tad.tools.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.rim.tad.tools.qml.core.qmlFileBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.rim.tad.tools.wst.jsdt.core.jsNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>com.rim.tad.tools.qml.core.qmlNature</nature>
+ </natures>
+</projectDescription>
View
33 SimplePushClient/.settings/org.eclipse.cdt.core.prefs
@@ -0,0 +1,33 @@
+eclipse.preferences.version=1
+environment/project/com.qnx.qcc.toolChain.1071017018/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1071017018/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1071017018/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.1071017018/EXCLUDE_VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1071017018/EXCLUDE_VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1071017018/EXCLUDE_VARIANTLIST/value=r
+environment/project/com.qnx.qcc.toolChain.1071017018/append=true
+environment/project/com.qnx.qcc.toolChain.1071017018/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.1243294312/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1243294312/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1243294312/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.1243294312/VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1243294312/VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1243294312/VARIANTLIST/value=g
+environment/project/com.qnx.qcc.toolChain.1243294312/append=true
+environment/project/com.qnx.qcc.toolChain.1243294312/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.1955961617/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1955961617/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1955961617/CPULIST/value=x86
+environment/project/com.qnx.qcc.toolChain.1955961617/VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.1955961617/VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.1955961617/VARIANTLIST/value=g
+environment/project/com.qnx.qcc.toolChain.1955961617/append=true
+environment/project/com.qnx.qcc.toolChain.1955961617/appendContributed=true
+environment/project/com.qnx.qcc.toolChain.780837369/CPULIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.780837369/CPULIST/operation=append
+environment/project/com.qnx.qcc.toolChain.780837369/CPULIST/value=arm
+environment/project/com.qnx.qcc.toolChain.780837369/EXCLUDE_VARIANTLIST/delimiter=,
+environment/project/com.qnx.qcc.toolChain.780837369/EXCLUDE_VARIANTLIST/operation=append
+environment/project/com.qnx.qcc.toolChain.780837369/EXCLUDE_VARIANTLIST/value=p
+environment/project/com.qnx.qcc.toolChain.780837369/append=true
+environment/project/com.qnx.qcc.toolChain.780837369/appendContributed=true
View
201 SimplePushClient/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
View
6 SimplePushClient/Makefile
@@ -0,0 +1,6 @@
+QMAKE_TARGET = SimplePushClient
+PROJECT_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
+I18N_DIR := $(PROJECT_DIR)/translations
+
+include mk/cs-base.mk
+
View
5 SimplePushClient/Notice
@@ -0,0 +1,5 @@
+SimplePushClient
+Copyright (c) 2012 Research In Motion Limited (http://www.rim.com/)
+
+This product includes software developed at
+Research In Motion Limited (http://www.rim.com/).
View
6 SimplePushClient/SimplePushClient.pro
@@ -0,0 +1,6 @@
+APP_NAME = SimplePushClient
+
+CONFIG += qt warn_on cascades10
+LIBS += -lbbnetwork -lbbplatform -lbbsystem -lbb
+
+include(config.pri)
View
37 SimplePushClient/assets/.preview-2790971562758724993qml~
@@ -0,0 +1,37 @@
+import bb.cascades 1.0
+
+Container {
+ id: container
+ preferredWidth: maxWidth
+ topPadding: 10
+ leftPadding: 10
+ bottomPadding: 10
+ Label {
+ id: label
+ textStyle {
+ base: SystemDefaults.TextStyles.TitleText
+ color: Color.White
+ fontWeight: FontWeight.Bold
+ }
+ }
+ function setPriority(priority) {
+ switch (priority) {
+ case 0:
+ label.text = " !";
+ container.background = Color.DarkBlue;
+ break;
+ case 1:
+ container.background = Color.DarkYellow;
+ label.text = "! !";
+ break;
+ case 2:
+ container.background = Color.DarkRed;
+ label.text = "!!!";
+ break;
+ default:
+ container.background = Color.White;
+ break;
+ }
+ console.log(label.text);
+ }
+}
View
26 SimplePushClient/assets/.preview-2861339431964139979qml~
@@ -0,0 +1,26 @@
+import bb.cascades 1.0
+
+Container {
+ property alias title: title.text
+ property alias body: body.text
+ horizontalAlignment: HorizontalAlignment.Fill
+ property int priority
+ PriorityHeader {
+ id: priorityHeader
+ onCreationCompleted: setPriority(priority)
+ }
+ Label {
+ id: title
+ textStyle {
+ base: SystemDefaults.TextStyles.TitleText
+ }
+ }
+ Label {
+ id: body
+ multiline: true
+ }
+
+ function setPriority (priority) {
+ priorityHeader.seyPriority(priority);
+ }
+}
View
49 SimplePushClient/assets/.preview-7198140380711689755qml~
@@ -0,0 +1,49 @@
+import bb.cascades 1.0
+
+Page {
+ Container {
+ bottomPadding: 20.0
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Fill
+ Container {
+ layout: DockLayout {
+ }
+ horizontalAlignment: HorizontalAlignment.Fill
+ preferredHeight: maxHeight
+ ListView {
+ id: pushListView
+ objectName: "pushListView"
+ listItemComponents: [
+ ListItemComponent {
+ type: "item"
+ StandardListItem {
+ //imageSource: set based on priority
+ title: ListItemData.title
+ description: ListItemData.body
+ status: ListItemData.timeReceived
+ }
+ },
+ ListItemComponent {
+ type: "header"
+ PriorityHeader {
+ onCreationCompleted: setPriority(parseInt(ListItemData))
+ }
+ }
+ ]
+ onSelectionChanged: {
+ }
+ }
+ Label {
+ text: "No push data received"
+ verticalAlignment: VerticalAlignment.Center
+ horizontalAlignment: HorizontalAlignment.Center
+ visible: ! pushListView.visible
+ }
+ }
+ Button {
+ objectName: "clearPushList"
+ text: "Clear Push List"
+ horizontalAlignment: HorizontalAlignment.Center
+ }
+ }
+}
View
42 SimplePushClient/assets/LastPushSceneCover.qml
@@ -0,0 +1,42 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import bb.cascades 1.0
+
+/*
+ * This class is used to display details of the last received
+ * push message on the SceneCover when the app is thumbnailed/
+ * minimized.
+ */
+
+Container {
+ property alias title: title.text
+ property alias body: body.text
+ horizontalAlignment: HorizontalAlignment.Fill
+ property alias priority: priorityHeader.priority
+ PriorityHeader {
+ id: priorityHeader
+ }
+ Label {
+ id: title
+ textStyle {
+ base: SystemDefaults.TextStyles.TitleText
+ }
+ }
+ Label {
+ id: body
+ multiline: true
+ }
+}
View
66 SimplePushClient/assets/PriorityHeader.qml
@@ -0,0 +1,66 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import bb.cascades 1.0
+
+/*
+ * This control creates a header for the push message categories
+ * to let users more easily identify which priority of message was
+ * received.
+ */
+
+Container {
+ property int priority: -1
+ id: container
+ preferredWidth: maxWidth
+ topPadding: 10
+ leftPadding: 10
+ bottomPadding: 10
+ Label {
+ id: label
+ textStyle {
+ base: SystemDefaults.TextStyles.TitleText
+ color: Color.White
+ fontWeight: FontWeight.Bold
+ }
+ }
+
+ /**
+ * This nifty signal handler was created for us by the Qt framework, it allows
+ * us to listen and be notified whenever the 'priority' property changes,
+ * allowing this element to be re-used and us to update the UI visuals.
+ */
+ onPriorityChanged: {
+ switch (priority) {
+ case 0: //Low
+ label.text = " !";
+ container.background = Color.DarkBlue;
+ break;
+ case 1: //Medium
+ container.background = Color.DarkYellow;
+ label.text = "! !";
+ break;
+ case 2: //High
+ container.background = Color.DarkRed;
+ label.text = "!!!";
+ break;
+ default: //Invalid or no data
+ container.background = Color.DarkGray;
+ label.text = "No data";
+ break;
+ }
+ console.log(label.text + ":" + container.background);
+ }
+}
View
41 SimplePushClient/assets/PushMessageDetailsPage.qml
@@ -0,0 +1,41 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import bb.cascades 1.0
+
+/*
+ * This control is essentially a wrapper around the LastPushSceneCover
+ * control that also adds a timestamp. This is used to display more
+ * information included in a push message by adding it to a new Page.
+ */
+
+Page {
+ property alias priority: lastPushSceneCover.priority
+ property alias title: lastPushSceneCover.title
+ property alias body: lastPushSceneCover.body
+ property alias timeReceived: timestamp.text
+ Container {
+ verticalAlignment: VerticalAlignment.Fill
+ horizontalAlignment: HorizontalAlignment.Fill
+ LastPushSceneCover {
+ id: lastPushSceneCover
+ }
+ Label {
+ id: timestamp
+ textStyle.fontStyle: FontStyle.Italic
+ verticalAlignment: VerticalAlignment.Bottom
+ }
+ }
+}
View
BIN SimplePushClient/assets/images/icons/highPriority.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 SimplePushClient/assets/images/icons/highPriority.png.amd
@@ -0,0 +1,3 @@
+#RimCascadesAssetMetaData version=1.0
+source: "highPriority.png"
+sliceMargins: 79 15 15 15
View
BIN SimplePushClient/assets/images/icons/lowPriority.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 SimplePushClient/assets/images/icons/lowPriority.png.amd
@@ -0,0 +1,3 @@
+#RimCascadesAssetMetaData version=1.0
+source: "lowPriority.png"
+sliceMargins: 79 15 15 15
View
BIN SimplePushClient/assets/images/icons/mediumPriority.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3 SimplePushClient/assets/images/icons/mediumPriority.png.amd
@@ -0,0 +1,3 @@
+#RimCascadesAssetMetaData version=1.0
+source: "mediumPriority.png"
+sliceMargins: 79 15 15 15
View
95 SimplePushClient/assets/main.qml
@@ -0,0 +1,95 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import bb.cascades 1.0
+
+/*
+ * This is the main Pane for our app. It displays all received push messages
+ * in a list and allows the user to click the messages to expand the message
+ * to a Page where more details are able to be displayed.
+ */
+
+NavigationPane {
+ id: navigationPane
+
+ /* This ComponentDefinition lets us dynamically create a Page to push
+ * whenever needed. In this case we use it to display the push message.
+ */
+ attachedObjects: ComponentDefinition {
+ id: pushMessageDetailsPage
+ source: "PushMessageDetailsPage.qml"
+ }
+ Page {
+ Container {
+ bottomPadding: 20.0
+ horizontalAlignment: HorizontalAlignment.Fill
+ verticalAlignment: VerticalAlignment.Fill
+ Container {
+ layout: DockLayout {
+ }
+ horizontalAlignment: HorizontalAlignment.Fill
+ preferredHeight: maxHeight
+
+ //The below ListView will be used to organize our push messages
+ ListView {
+ id: pushListView
+ objectName: "pushListView"
+ listItemComponents: [
+ ListItemComponent {
+ type: "item"
+ StandardListItem {
+ title: ListItemData.title
+ description: ListItemData.body
+ status: ListItemData.timeReceived
+ }
+ },
+ ListItemComponent {
+ type: "header"
+ //PriorityHeader is a custom component, gives a better visual
+ // representation of the push priority
+ PriorityHeader {
+ priority: ListItemData
+ }
+ }
+ ]
+ onTriggered: {
+ // When a push message is selected we grab the data and push it
+ // in a new page.
+ var selectedData = pushListView.dataModel.data(indexPath);
+ var detailsPage = pushMessageDetailsPage.createObject();
+ detailsPage.priority = selectedData.priority;
+ detailsPage.title = selectedData.title;
+ detailsPage.body = selectedData.body;
+ detailsPage.timeReceived = selectedData.timeReceived;
+ navigationPane.push(detailsPage);
+ }
+ }
+ //When no data is available we use this Label to let the user know
+ Label {
+ text: "No push data received"
+ verticalAlignment: VerticalAlignment.Center
+ horizontalAlignment: HorizontalAlignment.Center
+ visible: ! pushListView.visible
+ }
+ }
+ //Clicking this button will delete all push messages
+ Button {
+ objectName: "clearPushList"
+ text: "Clear Push List"
+ horizontalAlignment: HorizontalAlignment.Center
+ }
+ }
+ }
+}
View
114 SimplePushClient/bar-descriptor.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+
+ Copyright (c) 2011, 2012 Research In Motion Limited.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
+
+<!-- BlackBerry Tablet OS application descriptor file.
+
+ Specifies parameters for identifying, installing, and launching native applications on BlackBerry Tablet OS.
+
+-->
+
+ <!-- A universally unique application identifier. Must be unique across all BlackBerry Tablet OS applications.
+ Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
+ <id>com.example.SimplePushClient</id>
+
+ <!-- The name that is displayed in the BlackBerry Tablet OS application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <name>Simple Push Client</name>
+
+ <!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
+ Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
+ An updated version of application must have a versionNumber value higher than the previous version. Required. -->
+ <versionNumber>1.0.0</versionNumber>
+
+ <!-- Fourth digit segment of the package version. First three segments are taken from the
+ <versionNumber> element. Must be an integer from 0 to 2^16-1 -->
+ <buildId>1</buildId>
+
+ <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
+ <!-- <versionLabel></versionLabel> -->
+
+ <!-- Description, displayed in the BlackBerry Tablet OS application installer.
+ May have multiple values for each language. See samples or xsd schema file. Optional. -->
+ <description>The SimplePushClient application</description>
+
+ <!-- Copyright information. Optional. -->
+ <!-- <copyright></copyright> -->
+
+ <!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
+ <author>Example Inc.</author>
+
+ <!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
+ <!-- <authorId>ABC1234YjsnUk235h</authorId> -->
+
+ <initialWindow>
+ <systemChrome>none</systemChrome>
+ <transparent>false</transparent>
+ </initialWindow>
+
+ <!-- The category where the application appears. Either core.games or core.media. -->
+ <category>core.games</category>
+ <icon>
+ <image>simplePushClient.png</image>
+ </icon>
+ <configuration name="Device-Debug">
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm/o.le-v7-g/SimplePushClient" entry="true" type="Qnx/Elf">SimplePushClient</asset>
+ </configuration>
+ <configuration name="Device-Release">
+ <entryPointType>Qnx/Cascades</entryPointType>
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm/o.le-v7/SimplePushClient.so" entry="true" type="Qnx/Elf">SimplePushClient.so</asset>
+ </configuration>
+ <configuration name="Device-Profile">
+ <platformArchitecture>armle-v7</platformArchitecture>
+ <asset path="arm-p/o.le-v7-g/SimplePushClient" entry="true" type="Qnx/Elf">SimplePushClient</asset>
+ </configuration>
+ <configuration name="Simulator-Debug">
+ <platformArchitecture>x86</platformArchitecture>
+ <asset path="x86/o-g/SimplePushClient" entry="true" type="Qnx/Elf">SimplePushClient</asset>
+ </configuration>
+
+ <!-- The icon for the application, which should be 86x86. -->
+
+ <asset path="assets">assets</asset>
+
+ <!-- Locale support -->
+ <asset path="translations" dest="qm">
+ <include name="*.qm"/>
+ </asset>
+ <asset path="simplePushClient.png">simplePushClient.png</asset>
+
+ <!-- Request permission to execute native code. Required for native applications. -->
+ <permission system="true">run_native</permission>
+ <permission system="true">_sys_use_consumer_push</permission>
+ <permission>post_notification</permission>
+ <permission>read_device_identifying_information</permission>
+ <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
+
+
+ <invoke-target id="com.samples.push.simple">
+ <type>APPLICATION</type>
+ <filter>
+ <action>bb.action.PUSH</action>
+ <mime-type>application/vnd.push</mime-type>
+ </filter>
+ </invoke-target>
+
+</qnx>
View
30 SimplePushClient/config.pri
@@ -0,0 +1,30 @@
+# Auto-generated by IDE. All changes by user will be lost!
+# Created at 1/9/13 1:32 PM
+
+BASEDIR = $$_PRO_FILE_PWD_
+
+INCLUDEPATH += \
+ $$BASEDIR/src
+
+SOURCES += \
+ $$BASEDIR/src/CoverManager.cpp \
+ $$BASEDIR/src/PushManager.cpp \
+ $$BASEDIR/src/SimplePushClient.cpp \
+ $$BASEDIR/src/main.cpp
+
+HEADERS += \
+ $$BASEDIR/src/CoverManager.hpp \
+ $$BASEDIR/src/PushManager.hpp \
+ $$BASEDIR/src/SimplePushClient.hpp
+
+CONFIG += precompile_header
+PRECOMPILED_HEADER = $$BASEDIR/precompiled.h
+
+lupdate_inclusion {
+ SOURCES += \
+ $$BASEDIR/../assets/*.qml
+}
+
+TRANSLATIONS = \
+ $${TARGET}.ts
+
View
2 SimplePushClient/precompiled.h
@@ -0,0 +1,2 @@
+// This file is used to store precompiled headers.
+// It is intentionally left blank. It is up to you to decide which headers should be included here.
View
47 SimplePushClient/readme.txt
@@ -0,0 +1,47 @@
+SimplePushClient
+
+========================================================================
+Sample Description.
+
+This sample provides 2 basic functions of a BlackBerry Push Initiator. Namely it
+will support:
+1) Send a message to one or more recipients
+2) Request a list of currently active push subscribers
+
+This sample makes use of pre-defined template files which follow the conventions
+expected by the push service. As a developer you should be able to add extra
+functionality by adding additional templates then following the same flow used
+by the app to swap out information to make the request relevant to the desired
+call.
+
+Note: This sample was designed to work in tandem with the SimplePushServer app
+ though it could easily be modified to push to any client.
+
+========================================================================
+Requirements:
+
+BlackBerry 10 Native SDK Gold
+
+========================================================================
+Running the example:
+
+1. Download the source code
+2. Launch BlackBerry 10 Native SDK, and from the File menu, select Import.
+3. Expand General, and select Existing Projects into Workspace. Click Next.
+4. Browse to the location of the source code project, and then click OK.
+5. The sample project should display in the the Projects section.
+ Click Finish to import the project into your workspace.
+6. Open the bar-descriptor.xml file and modify the invoke-target element's id
+ value to be something specific to your app:
+ ex com.yourcompany.myfirstpushapp
+7. Open src/PushManager.cpp and modify the 3 QString variables at the top by
+ replacing with your Push Service account values and the invoke-target id
+ specified in step 6.
+8. In the Project Explorer pane, Right-click the the project and select Build
+ Project.
+9. In the Project Explorer pane, Right-click the the project and select
+ Run As > BlackBerry C/C++ Application.
+10. The application will now install and launch on your device if not you might
+ have to set up your environment:
+ http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html
+
View
BIN SimplePushClient/simplePushClient.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
72 SimplePushClient/src/CoverManager.cpp
@@ -0,0 +1,72 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "CoverManager.hpp"
+
+#include <bb/cascades/QmlDocument>
+
+/**
+ * This class extends SceneCover so we can display information on the tiled/
+ * thumbnailed application.
+ */
+
+CoverManager::CoverManager(PushManager *pushManager) :
+ SceneCover(this), m_pushManager(pushManager) {
+
+ //Whenever a push is received we want to update the cover, this will listen for data changes
+ connect(m_pushManager, SIGNAL(pushListChanged(const QVariantList &)), this,
+ SLOT(pushListUpdated(const QVariantList &)));
+
+ //Create a new Container based off LastPushSceneCover.qml
+ QmlDocument *qml =
+ QmlDocument::create("asset:///LastPushSceneCover.qml").parent(this);
+ m_pushMessageCover = qml->createRootObject<Container>();
+
+ //This call sets the Container to be the displayable for the SceneCover
+ setContent (m_pushMessageCover);
+
+}
+
+CoverManager::~CoverManager() {
+}
+
+//If the data store changes this method updates the SceneCover with the latest push message
+void CoverManager::pushListUpdated(const QVariantList &pushList) {
+ if (!pushList.isEmpty()) {
+ //Read in the last message from the list
+ QVariant lastReceivedPushMessageVariant = pushList.last();
+ QString lastReceivedPushMessage;
+ QStringList messageParts;
+ lastReceivedPushMessage = lastReceivedPushMessageVariant.toString();
+ qDebug() << "Last push received: " << lastReceivedPushMessage;
+ messageParts = lastReceivedPushMessage.split('|');
+ if (messageParts.size() != 4) {
+ qDebug() << "Invalid list length. Expected 4, received: "
+ << messageParts.size();
+
+ } else {
+ m_pushMessageCover->setProperty("priority", messageParts[0].toInt());
+ m_pushMessageCover->setProperty("title", messageParts[1]);
+ m_pushMessageCover->setProperty("body", messageParts[2]);
+ setDescription(messageParts[3]);
+ }
+ return;
+ } else { //If the list is empty let's display some data to let the user know
+ m_pushMessageCover->setProperty("priority", 13013);
+ m_pushMessageCover->setProperty("title", "");
+ m_pushMessageCover->setProperty("body", "");
+ setDescription("-");
+ }
+}
View
39 SimplePushClient/src/CoverManager.hpp
@@ -0,0 +1,39 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef COVERMANAGER_HPP_
+#define COVERMANAGER_HPP_
+
+#include "PushManager.hpp"
+
+#include <bb/cascades/Application>
+#include <bb/cascades/SceneCover>
+#include <bb/cascades/Container>
+
+using namespace bb::cascades;
+
+class CoverManager: public SceneCover {
+ Q_OBJECT
+public:
+ CoverManager(PushManager *pushManager);
+ virtual ~CoverManager();
+ Q_SLOT void pushListUpdated(const QVariantList &pushList);
+
+private:
+ PushManager *m_pushManager;
+ Container *m_pushMessageCover;
+};
+
+#endif /* COVERMANAGER_HPP_ */
View
257 SimplePushClient/src/PushManager.cpp
@@ -0,0 +1,257 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "PushManager.hpp"
+#include <bb/network/PushPayload>
+#include <bb/system/SystemUiButton>
+#include <bb/system/ApplicationStartupMode>
+#include <bb/IconBadge>
+
+using namespace bb::cascades;
+using namespace bb::platform;
+using namespace bb::network;
+using namespace bb::system;
+
+// The following strings must be updated to use the values for your Push Services account
+const QString PushManager::BLACKBERRY_PUSH_APPLICATION_ID =
+ "Application ID";
+const QString PushManager::BLACKBERRY_PUSH_URL =
+ "http://pushapi.eval.blackberry.com";
+
+//Update this value as well as the invoke-target id in the bar-descriptor.xml file
+const QString PushManager::BLACKBERRY_INVOKE_TARGET_ID = "com.samples.push.simple";
+
+PushManager::PushManager(Application *app) :
+ app(app) {
+
+ hasBeenFullScreened = false; //This bool tracks when the app has been fullscreened
+
+ //Create a push service so the device knows how to invoke our app when a push arrives
+ m_pushService = new PushService(BLACKBERRY_PUSH_APPLICATION_ID,
+ BLACKBERRY_INVOKE_TARGET_ID);
+
+ //Set up our NotificationDialog with a button to dismiss
+ notificationDialog.appendButton(new SystemUiButton("OK"));
+
+ //The InvokeManager will handle the invocation where the push data is received
+ invokeManager = new InvokeManager(this);
+ connect(invokeManager,
+ SIGNAL(invoked(const bb::system::InvokeRequest&)), this,
+ SLOT(invoked(const bb::system::InvokeRequest&)));
+
+ //createSession is asynchronous so once completed we can proceed with creating the channel
+ connect(m_pushService,
+ SIGNAL(createSessionCompleted (const bb::network::PushStatus &)),
+ this,
+ SLOT(createSessionCompleted(const bb::network::PushStatus&)));
+
+ //createChannel is asynchronous so once completed can reister to launch
+ connect(m_pushService,
+ SIGNAL(createChannelCompleted (const bb::network::PushStatus&,
+ const QString &)), this,
+ SLOT(createChannelCompleted(const bb::network::PushStatus&,
+ const QString &)));
+
+ //Connect to the app's fullscreen() method so we know if the app has been used by the user yet
+ connect(app, SIGNAL(fullscreen()), this, SLOT(appFullScreened()));
+
+ //Initiate the session creation so we can start reciving push messages
+ m_pushService->createSession();
+}
+
+PushManager::~PushManager() {
+}
+
+/**
+ * Once the session is created successfully we can then create the channel (register
+ * with the BlackBerry Push Service)
+ */
+void PushManager::createSessionCompleted(
+ const bb::network::PushStatus& status) {
+ if (!status.isError() && m_pushService) {
+ log("Session creation completed successfully");
+
+ //If the app was launched by a push incoming then we know the channel is already created
+ if (appWasLaunchedFromRibbon()) {
+ m_pushService->createChannel(
+ QUrl(BLACKBERRY_PUSH_URL));
+ }
+ } else {
+ log("Session creation failed: " + status.errorDescription());
+ }
+}
+
+/**
+ * If the channel was created successfully we can then register to launch the app
+ * so the app opens when a push arrives.
+ */
+void PushManager::createChannelCompleted(const bb::network::PushStatus& status,
+ const QString& token) {
+ Q_UNUSED(token);
+ if (!status.isError() && m_pushService) {
+ log("Channel creation completed successfully");
+ m_pushService->registerToLaunch();
+ } else {
+ log("Channel creation failed: " + status.errorDescription());
+ }
+}
+
+/**
+ * When the app gets invoked this method will be called and passed the InvokeRequest
+ */
+void PushManager::invoked(const InvokeRequest& request) {
+ //Check whether the app was invoked via a push
+ if (request.action().compare("bb.action.PUSH") != 0) {
+ log("Not a push invocation :("); //Nope, so we return
+ return;
+ }
+ //If the app is here we know the InvokeRequest contains push data
+ PushPayload payload(request);
+ if (payload.isValid()) {
+ log("payload is valid, processing now");
+ if (payload.isAckRequired()) { //This section is only useful for Push Plus
+ log("ACK required, sending");
+ m_pushService->acceptPush(payload.id());
+ }
+ //Read all the push data from the payload
+ QString message = payload.data();
+ //Pass it to our method which will store the push in a nice format
+ logPush(message);
+
+ //For the purposes of this sample only we are expecting that all push data
+ // is formatted into 3 parts using a '|' character as a delimiter.
+ QStringList messageParts = message.split('|');
+ if (messageParts.size() != 3) {
+ log(
+ "Invalid list length. Expected 3, received "
+ + messageParts.size());
+ return;
+ }
+
+ //The first part of the push denotes the priority of the message
+ switch (messageParts.at(0).toInt()) {
+ case PushManager::Low:
+ handleLowPriorityPush();
+ break;
+ case PushManager::Medium:
+ handleMediumPriorityPush(messageParts.at(1), messageParts.at(2));
+ break;
+ case PushManager::High:
+ handleHighPriorityPush(messageParts.at(1), messageParts.at(2));
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+//Check whether the app was launched by the user of via invocation
+bool PushManager::appWasLaunchedFromRibbon() {
+ // If the application was launched after receiving a push then we know the channel
+ // is already created and our application is already registered to launch, otherwise
+ // we should likely create these.
+ return (invokeManager->startupMode()
+ == ApplicationStartupMode::LaunchApplication);
+}
+
+// Split the push into its various parts then store to QSettings
+void PushManager::logPush(const QString & pushMessage) {
+ pushList = settings.value("pushList").toList();
+ QString pushMessageWithDate = pushMessage;
+ pushMessageWithDate = pushMessageWithDate.append(
+ "|" + QDateTime::currentDateTime().toString("h:mm:ss ap"));
+ pushList.append(pushMessageWithDate);
+ settings.setValue("pushList", pushList);
+
+ //This 'emit' lets anyone listening know that the DataModel has been updated
+ emit pushListChanged(pushList);
+}
+
+/**
+ * Low priority messages will:
+ *- Add a splat to the app icon
+ *- Closes the app if it has not yet been fullscreened by the user
+ */
+
+void PushManager::handleLowPriorityPush() {
+ app->setIconBadge(bb::IconBadge::Splat);
+ if (!appWasLaunchedFromRibbon() && !hasBeenFullScreened) {
+ app->requestExit();
+ }
+}
+
+/**
+ * Medium priority messages will:
+ *- Fires off a system notification
+ * o Adds a splat to the app
+ * o Does whatever the system specifies (sounds, LED, vibration)
+ *- Closes the app if it has not yet been fullscreened by the user
+ */
+void PushManager::handleMediumPriorityPush(const QString & title,
+ const QString & body) {
+ Q_UNUSED(title);
+ Q_UNUSED(body);
+ notification.notify();
+ if (!appWasLaunchedFromRibbon() && !hasBeenFullScreened) {
+ app->requestExit();
+ }
+}
+
+/**
+ * High priority messages will:
+ * Fire off a repeating system notification via a NotificationDialog (global)
+ * o Adds a splat to the app
+ * o Does whatever the system specifies (sounds, LED, vibration)
+ * + Repeats the set action non-stop until the user dismisses the dialog
+ *- App stays open
+ */
+
+void PushManager::handleHighPriorityPush(const QString & title,
+ const QString & body) {
+ notificationDialog.cancel();
+ notificationDialog.setTitle(title);
+ notificationDialog.setBody(body);
+ notificationDialog.setRepeat(true);
+ notificationDialog.show();
+}
+
+//When the app goes full screen let's clear the notificiations and toggle
+// the tracking variable
+void PushManager::appFullScreened() {
+ notification.clearEffectsForAll();
+ app->setIconBadge(bb::IconBadge::None);
+ hasBeenFullScreened = true;
+}
+
+//Wipe out the data store erasing all existing push messages
+void PushManager::clearPushList() {
+ log("Clearing push list from cache");
+ settings.clear();
+ pushList = settings.value("pushList").toList();
+ emit pushListChanged(pushList);
+}
+
+//This method retrieves all push messages, updating the list, then notifies
+// all listeners of the new list.
+void PushManager::updatePushList() {
+ pushList = settings.value("pushList").toList();
+ emit pushListChanged(pushList);
+}
+
+//A log method to output to the console
+void PushManager::log(const QString &toLog) {
+ qDebug() << toLog;
+}
+
View
82 SimplePushClient/src/PushManager.hpp
@@ -0,0 +1,82 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef PUSHMANAGER_HPP_
+#define PUSHMANAGER_HPP_
+
+#include <QObject>
+
+#include <bb/system/InvokeRequest>
+#include <bb/network/PushService>
+#include <bb/network/PushStatus>
+#include <bb/system/InvokeManager>
+#include <bb/platform/NotificationDialog>
+#include <bb/platform/Notification>
+#include <bb/cascades/Application>
+
+using namespace bb::network;
+using namespace bb::system;
+using namespace bb::platform;
+using namespace bb::cascades;
+
+class PushManager: public QObject {
+Q_OBJECT
+public:
+ PushManager(Application *app);
+ virtual ~PushManager();
+
+ enum PushPriority {
+ Low = 0, Medium = 1, High = 2
+ };
+
+ void updatePushList();
+
+signals:
+ void pushListChanged(const QVariantList &pushList);
+
+public slots:
+ void clearPushList();
+
+private slots:
+ void createSessionCompleted(const bb::network::PushStatus&);
+ void createChannelCompleted(const bb::network::PushStatus&, const QString&);
+ void invoked(const bb::system::InvokeRequest&);
+ void appFullScreened();
+
+private:
+
+ static const QString BLACKBERRY_PUSH_APPLICATION_ID;
+ static const QString BLACKBERRY_PUSH_URL;
+ static const QString BLACKBERRY_INVOKE_TARGET_ID;
+
+ PushService* m_pushService; //The service that will handle push registration/reception
+ InvokeManager* invokeManager; //Created to handle only push invocations
+ NotificationDialog notificationDialog; //Notify the user for high priority push messages
+ Notification notification; //Used to notify the user via the app notification settings
+ Application *app; //App instance used tio listen for when the app enters full screen
+ QSettings settings; //Persistent store for the app
+ bool hasBeenFullScreened; //Track whether the app has ever been full screened
+ QVariantList pushList; //Handle to a usable list of all push messages
+
+ void log(const QString &);
+ bool appWasLaunchedFromRibbon();
+ void logPush(const QString &);
+ void handleLowPriorityPush();
+ void handleMediumPriorityPush(const QString &, const QString &);
+ void handleHighPriorityPush(const QString &, const QString &);
+
+};
+
+#endif /* PUSHMANAGER_HPP_ */
View
92 SimplePushClient/src/SimplePushClient.cpp
@@ -0,0 +1,92 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "SimplePushClient.hpp"
+#include "CoverManager.hpp"
+
+#include <bb/cascades/Application>
+#include <bb/cascades/QmlDocument>
+#include <bb/cascades/AbstractPane>
+
+using namespace bb::cascades;
+
+SimplePushClient::SimplePushClient(bb::cascades::Application *app)
+: QObject(app)
+{
+ // create scene document from main.qml asset
+ // set parent to created document to ensure it exists for the whole application lifetime
+ QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
+
+ // create root object for the UI
+ AbstractPane *root = qml->createRootObject<AbstractPane>();
+ // set created root object as a scene
+ app->setScene(root);
+
+ //Create an instance of our PushManager class. This class will handle all push interactions.
+ m_pushManager = new PushManager(app);
+ //Whenever the push data is changed (new push received, data store cleared) we need to update the UI
+ // this connection allows us to be notified so we can do just that.
+ connect(m_pushManager, SIGNAL(pushListChanged(const QVariantList &)), this, SLOT(pushListUpdated(const QVariantList &)));
+
+ //Here we get a handle to our QML Button and provide a way to clear the push data store
+ m_clearPushListButton = root->findChild<Button*>("clearPushList");
+ connect(m_clearPushListButton, SIGNAL(clicked()), m_pushManager, SLOT(clearPushList()));
+ m_pushListView = root->findChild<ListView*>("pushListView");
+
+ //Create our DataModel with the appropriate keys to store the received push messages
+ m_pushGroupDataModel = new GroupDataModel(QStringList() << "priority" << "title" << "body" << "timeReceived" );
+ m_pushListView->setDataModel(m_pushGroupDataModel);
+
+ //If a push arrives when the app is closed or thumbnailed we may still want to display
+ // some of the data to the end-user; for that we use a custom SceneCover implementation
+ app->setCover(new CoverManager(m_pushManager));
+
+ //This call triggers a refresh of the push messages pulled from QSettings
+ m_pushManager->updatePushList();
+
+}
+
+/** The below method is a Signal that gets triggered any time the push data changes.
+ * This method will iterate through all received pieces of data then format them
+ * into the GroupDataModel instantiated above.
+ */
+
+void SimplePushClient::pushListUpdated(const QVariantList &pushList){
+ qDebug() << "pushListUpdated. New size: " << pushList.length();
+ QString pushMessage;
+ QVariantMap pushMessageMap;
+ QStringList messageParts;
+ m_pushListView->setVisible(pushList.length() > 0);
+ m_pushGroupDataModel->clear();
+ foreach(QVariant pushMessageVariant, pushList){
+ pushMessage = pushMessageVariant.toString();
+ qDebug() << "Data from list: " << pushMessage;
+
+ //For the purposes of this sample only we are expecting that all push data
+ // is formatted into 3 parts using a '|' character as a delimiter.
+ messageParts = pushMessage.split('|');
+ if (messageParts.size() != 4){
+ qDebug() << "Invalid list length. Expected 4, received: " << messageParts.size() << "\nSkipping this item";
+ continue;
+ }
+
+ //These next lines populate the QVariantMap then insert to the DataModel
+ pushMessageMap["priority"] = messageParts[0];
+ pushMessageMap["title"] = messageParts[1];
+ pushMessageMap["body"] = messageParts[2];
+ pushMessageMap["timeReceived"] = messageParts[3];
+ m_pushGroupDataModel->insert(pushMessageMap);
+ }
+}
View
55 SimplePushClient/src/SimplePushClient.hpp
@@ -0,0 +1,55 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef SimplePushClient_HPP_
+#define SimplePushClient_HPP_
+
+#include <QObject>
+
+#include <bb/cascades/Button>
+#include <bb/cascades/ListView>
+#include <bb/cascades/GroupDataModel>
+
+#include "PushManager.hpp"
+
+using namespace bb::cascades;
+
+namespace bb {
+namespace cascades {
+class Application;
+}
+}
+
+class SimplePushClient: public QObject {
+Q_OBJECT
+public:
+ SimplePushClient(bb::cascades::Application *app);
+ virtual ~SimplePushClient() {
+ }
+
+private slots:
+ void pushListUpdated(const QVariantList &pushList);
+
+private:
+ PushManager *m_pushManager; //Handle all push interactions
+ Button *m_clearPushListButton; //Button to clear the push data store
+ ListView *m_pushListView; //ListView that displays all push data to the user
+ GroupDataModel *m_pushGroupDataModel; //This DataModel stores all received push data
+
+ void populatePushGroupDataModel();
+
+};
+
+#endif /* SimplePushClient_HPP_ */
View
50 SimplePushClient/src/main.cpp
@@ -0,0 +1,50 @@
+/* Copyright (c) 2012 Research In Motion Limited.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+#include <bb/cascades/Application>
+#include <bb/cascades/QmlDocument>
+#include <bb/cascades/AbstractPane>
+
+#include <QLocale>
+#include <QTranslator>
+#include <Qt/qdeclarativedebug.h>
+#include "SimplePushClient.hpp"
+
+using namespace bb::cascades;
+
+void myMessageOutput(QtMsgType type, const char* msg){
+ fprintf(stdout, "%s\n", msg);
+ fflush(stdout);
+}
+
+Q_DECL_EXPORT int main(int argc, char **argv)
+{
+ Application app(argc, argv);
+
+ //Register a message handler so we can output to the console
+ qInstallMsgHandler(myMessageOutput);
+
+ QTranslator translator;
+ QString locale_string = QLocale().name();
+ QString filename = QString( "SimplePushClient_%1" ).arg( locale_string );
+ if (translator.load(filename, "app/native/qm")) {
+ app.installTranslator( &translator );
+ }
+
+ new SimplePushClient(&app);
+
+ return Application::exec();
+}
View
12 SimplePushClient/translations/Makefile
@@ -0,0 +1,12 @@
+QMAKE_TARGET = SimplePushClient
+LUPDATE = $(QNX_HOST)/usr/bin/lupdate
+LRELEASE = $(QNX_HOST)/usr/bin/lrelease
+
+update: $(QMAKE_TARGET).pro FORCE
+ $(LUPDATE) $(QMAKE_TARGET).pro
+
+release: $(QMAKE_TARGET).pro $(QMAKE_TARGET).ts
+ $(LRELEASE) $(QMAKE_TARGET).pro
+
+FORCE:
+
View
1 SimplePushClient/translations/SimplePushClient.pro
@@ -0,0 +1 @@
+include (../SimplePushClient.pro)
View
4 SimplePushClient/translations/SimplePushClient.ts
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+</TS>
View
178 SimplePushServer/.cproject
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="com.qnx.qcc.toolChain.103909944">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.103909944" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.103909944" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.103909944.753589654" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.255648362" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1469526827" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1553931134" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.1648585923" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1397689917" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1404579768" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.103909944.835525207" incrementalBuildTarget="Device-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.45240284" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.110272371" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.61267504" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1666230749" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1563083174" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1441470609" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1781671019" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.1780589531">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1780589531" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.1780589531" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.1780589531.20861748" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.494526103" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.135618465" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.331185002" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.721427507" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1884588409" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1993667734" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1780589531.1997998370" incrementalBuildTarget="Device-Release" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.723593985" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.351554282" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.1491393558" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1218854040" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1349004423" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1091306242" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.281425100" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.466079369">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.466079369" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.466079369" name="Device-Profile" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.466079369.567107207" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.537953889" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1629571595" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.1906997945" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.1941192183" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.1653908139" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2045677272" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Device-Profile" enableAutoBuild="true" id="com.qnx.qcc.toolChain.466079369.1241537318" incrementalBuildTarget="Device-Profile" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1559093093" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.140436319" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.411624475" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1424124711" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1546476671" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.184926969" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.709394380" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.toolChain.414510415">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.414510415" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
+ <externalSettings/>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildProperties="" id="com.qnx.qcc.toolChain.414510415" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.414510415.1188996341" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.1592433380" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.620064770" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.208178207" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
+ <option id="com.qnx.qcc.option.compiler.1519413175" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.994152508" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2128279451" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.414510415.1862273499" incrementalBuildTarget="Simulator-Debug" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.675753709" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.733186578" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.930514867" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1483092409" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.1601437994" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1639664197" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.1535862305" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="SimplePushServer.null.1572615036" name="SimplePushServer"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.466079369">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.414510415">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1780589531">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.103909944">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope"/>
+</cproject>
View
96 SimplePushServer/.project
<
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SimplePushServer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>Device-Debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>Device-Debug</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.rim.tad.tools.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>