Permalink
Browse files

Added BBMbpsRegistration and removed BBMBaseSampleRegistration

  • Loading branch information...
1 parent 3c67b66 commit 4d023fd4c08e5b7c8ad70dcae76ba9b1d5159f94 @pelegri pelegri committed Dec 7, 2012
Showing with 887 additions and 1,174 deletions.
  1. +0 −230 BBMBaseSampleRegistration/.cproject
  2. +0 −25 BBMBaseSampleRegistration/.settings/org.eclipse.cdt.core.prefs
  3. +0 −53 BBMBaseSampleRegistration/BBMBaseSampleRegistration.pro
  4. +0 −35 BBMBaseSampleRegistration/Makefile
  5. BIN BBMBaseSampleRegistration/arm/o.le-v7-g/BBMBaseSampleRegistration.bar
  6. +0 −25 BBMBaseSampleRegistration/assets/.preview-8028436732316202201qml~
  7. +0 −53 BBMBaseSampleRegistration/assets/registration.qml
  8. +0 −4 BBMBaseSampleRegistration/device-assets.xml
  9. +0 −114 BBMBaseSampleRegistration/src/EventHandler.cpp
  10. +0 −51 BBMBaseSampleRegistration/src/EventHandler.hpp
  11. +0 −177 BBMBaseSampleRegistration/src/RegistrationHandler.cpp
  12. +0 −57 BBMBaseSampleRegistration/src/RegistrationHandler.hpp
  13. +0 −56 BBMBaseSampleRegistration/src/main.cpp
  14. +0 −1 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.pro
  15. +0 −1 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.qm
  16. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.ts
  17. BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_de.qm
  18. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_de.ts
  19. BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_en_GB.qm
  20. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_en_GB.ts
  21. BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_es.qm
  22. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_es.ts
  23. BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_fr.qm
  24. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_fr.ts
  25. BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_it.qm
  26. +0 −4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_it.ts
  27. +0 −12 BBMBaseSampleRegistration/translations/Makefile
  28. +67 −0 BBMbpsRegistration/.cproject
  29. +5 −12 {BBMBaseSampleRegistration → BBMbpsRegistration}/.project
  30. +247 −0 BBMbpsRegistration/BbmRegistration.c
  31. +86 −0 BBMbpsRegistration/BbmRegistration.h
  32. +203 −176 {BBMBaseSampleRegistration → BBMbpsRegistration}/LICENSE
  33. +8 −0 BBMbpsRegistration/Makefile
  34. +5 −0 BBMbpsRegistration/NOTICE
  35. +8 −0 BBMbpsRegistration/arm/Makefile
  36. +1 −0 BBMbpsRegistration/arm/o.le-v7-g/Makefile
  37. +1 −0 BBMbpsRegistration/arm/o.le-v7/Makefile
  38. +38 −56 {BBMBaseSampleRegistration → BBMbpsRegistration}/bar-descriptor.xml
  39. +49 −0 BBMbpsRegistration/common.mk
  40. 0 {BBMBaseSampleRegistration → BBMbpsRegistration}/icon.png
  41. +96 −0 BBMbpsRegistration/main.c
  42. +56 −0 BBMbpsRegistration/manifest.properties
  43. +8 −12 {BBMBaseSampleRegistration → BBMbpsRegistration}/readme.txt
  44. +8 −0 BBMbpsRegistration/x86/Makefile
  45. +1 −0 BBMbpsRegistration/x86/o-g/Makefile
View
230 BBMBaseSampleRegistration/.cproject
@@ -1,230 +0,0 @@
-<?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.1733727329">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1733727329" moduleId="org.eclipse.cdt.core.settings" name="Default">
- <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="" description="" id="com.qnx.qcc.toolChain.1733727329" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.1733727329.39859940" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.410394583" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1496199563" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.1180414379" 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.185306332" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.480058680" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.279521169" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1733727329.648939901" incrementalBuildTarget="Device-Debug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1025790005" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.2071197398" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.1782027565" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/bbmsp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.2035615393" superClass="com.qnx.qcc.inputType.compiler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.assembler.1603595635" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1975743782" superClass="com.qnx.qcc.inputType.assembler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.linker.1415517786" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
- <option id="com.qnx.qcc.option.linker.libraries.800403572" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
- <listOptionValue builtIn="false" value="bbmsp"/>
- </option>
- </tool>
- <tool id="com.qnx.qcc.tool.archiver.2110657974" 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.1816859020">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1816859020" 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="" description="" id="com.qnx.qcc.toolChain.1816859020" name="Device-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.1816859020.1330184848" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.470547155" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.236378520" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.1289378052" 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.1139655060" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1709174537" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1564270835" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1816859020.333879421" incrementalBuildTarget="Device-Debug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1444141982" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.1468960765" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.379116514" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/bbmsp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.910927535" superClass="com.qnx.qcc.inputType.compiler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.assembler.2012596861" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1821052538" superClass="com.qnx.qcc.inputType.assembler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.linker.1830887829" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
- <option id="com.qnx.qcc.option.linker.libraries.752892699" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
- <listOptionValue builtIn="false" value="bbmsp"/>
- </option>
- </tool>
- <tool id="com.qnx.qcc.tool.archiver.1503462539" 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.151137367">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.151137367" 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="" description="" id="com.qnx.qcc.toolChain.151137367" name="Device-Release" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.151137367.1901788882" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.1106273257" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1715664168" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.749824275" 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.832229760" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1305509396" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1075678633" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Device-Release" enableAutoBuild="true" id="com.qnx.qcc.toolChain.151137367.1684068449" incrementalBuildTarget="Device-Release" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1159698483" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.441370441" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.1585899327" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/bbmsp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.1725551162" superClass="com.qnx.qcc.inputType.compiler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.assembler.1073772364" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.75371126" superClass="com.qnx.qcc.inputType.assembler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.linker.239257201" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
- <option id="com.qnx.qcc.option.linker.libraries.1623076370" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
- <listOptionValue builtIn="false" value="bbmsp"/>
- </option>
- </tool>
- <tool id="com.qnx.qcc.tool.archiver.2028539425" 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.1992352498">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1992352498" 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="" description="" id="com.qnx.qcc.toolChain.1992352498" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
- <folderInfo id="com.qnx.qcc.toolChain.1992352498.145415676" name="/" resourcePath="">
- <toolChain id="com.qnx.qcc.toolChain.1902712672" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
- <option id="com.qnx.qcc.option.os.1408173466" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
- <option id="com.qnx.qcc.option.cpu.2026594981" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
- <option id="com.qnx.qcc.option.compiler.1090430437" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
- <option id="com.qnx.qcc.option.runtime.1728614907" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
- <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1233624856" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
- <builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.1992352498.505842835" incrementalBuildTarget="Simulator-Debug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="com.qnx.qcc.tool.compiler.1674464414" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
- <option id="com.qnx.qcc.option.compiler.optlevel.1069755558" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
- <option id="com.qnx.qcc.option.compiler.includePath.1081404825" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/bbmsp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/qt4/QtCore"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/c"/>
- <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/cpp/embedded"/>
- </option>
- <inputType id="com.qnx.qcc.inputType.compiler.1806642588" superClass="com.qnx.qcc.inputType.compiler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.assembler.995356743" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
- <inputType id="com.qnx.qcc.inputType.assembler.1783072503" superClass="com.qnx.qcc.inputType.assembler"/>
- </tool>
- <tool id="com.qnx.qcc.tool.linker.1365045998" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
- <option id="com.qnx.qcc.option.linker.libraries.570677779" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
- <listOptionValue builtIn="false" value="bbmsp"/>
- </option>
- </tool>
- <tool id="com.qnx.qcc.tool.archiver.441269741" 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="BBMBaseSampleRegistration.null.1276649001" name="BBMBaseSampleRegistration"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.151137367">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1733727329">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1992352498">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1816859020">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="refreshScope"/>
-</cproject>
View
25 BBMBaseSampleRegistration/.settings/org.eclipse.cdt.core.prefs
@@ -1,25 +0,0 @@
-eclipse.preferences.version=1
-environment/project/com.qnx.qcc.toolChain.151137367/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.151137367/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.151137367/CPULIST/value=arm
-environment/project/com.qnx.qcc.toolChain.151137367/EXCLUDE_VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.151137367/EXCLUDE_VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.151137367/EXCLUDE_VARIANTLIST/value=r
-environment/project/com.qnx.qcc.toolChain.151137367/append=true
-environment/project/com.qnx.qcc.toolChain.151137367/appendContributed=true
-environment/project/com.qnx.qcc.toolChain.1816859020/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1816859020/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1816859020/CPULIST/value=arm
-environment/project/com.qnx.qcc.toolChain.1816859020/VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1816859020/VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1816859020/VARIANTLIST/value=g
-environment/project/com.qnx.qcc.toolChain.1816859020/append=true
-environment/project/com.qnx.qcc.toolChain.1816859020/appendContributed=true
-environment/project/com.qnx.qcc.toolChain.1992352498/CPULIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1992352498/CPULIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1992352498/CPULIST/value=x86
-environment/project/com.qnx.qcc.toolChain.1992352498/VARIANTLIST/delimiter=,
-environment/project/com.qnx.qcc.toolChain.1992352498/VARIANTLIST/operation=append
-environment/project/com.qnx.qcc.toolChain.1992352498/VARIANTLIST/value=g
-environment/project/com.qnx.qcc.toolChain.1992352498/append=true
-environment/project/com.qnx.qcc.toolChain.1992352498/appendContributed=true
View
53 BBMBaseSampleRegistration/BBMBaseSampleRegistration.pro
@@ -1,53 +0,0 @@
-TEMPLATE = app
-TARGET = BBMBaseSampleRegistration
-
-CONFIG += qt warn_on debug_and_release cascades
-
-
-LIBS += -lbbmsp
-INCLUDEPATH += ../src ${QNX_TARGET}/usr/include/bbmsp
-SOURCES += ../src/*.cpp
-HEADERS += ../src/*.hpp ../src/*.h
-DEPENDPATH += ../src ${QNX_TARGET}/usr/include/bbmsp
-
-lupdate_inclusion {
- SOURCES += ../assets/*.qml
-}
-
-device {
- CONFIG(release, debug|release) {
- DESTDIR = o.le-v7
- }
- CONFIG(debug, debug|release) {
- DESTDIR = o.le-v7-g
- }
-}
-
-simulator {
- CONFIG(release, debug|release) {
- DESTDIR = o
- }
- CONFIG(debug, debug|release) {
- DESTDIR = o-g
- }
-}
-
-OBJECTS_DIR = $${DESTDIR}/.obj
-MOC_DIR = $${DESTDIR}/.moc
-RCC_DIR = $${DESTDIR}/.rcc
-UI_DIR = $${DESTDIR}/.ui
-
-suredelete.target = sureclean
-suredelete.commands = $(DEL_FILE) $${MOC_DIR}/*; $(DEL_FILE) $${RCC_DIR}/*; $(DEL_FILE) $${UI_DIR}/*
-suredelete.depends = distclean
-
-QMAKE_EXTRA_TARGETS += suredelete
-
-TRANSLATIONS = \
- $${TARGET}_en_GB.ts \
- $${TARGET}_fr.ts \
- $${TARGET}_it.ts \
- $${TARGET}_de.ts \
- $${TARGET}_es.ts \
- $${TARGET}.ts
-
View
35 BBMBaseSampleRegistration/Makefile
@@ -1,35 +0,0 @@
-QMAKE_TARGET = BBMBaseSampleRegistration
-QMAKE = $(QNX_HOST)/usr/bin/qmake
-TARGET = $(QMAKE_TARGET)
-
-
-all: Makefile $(QMAKE_TARGET)
-
-clean:
- $(MAKE) -C ./arm -f Makefile sureclean
- $(MAKE) -C ./x86 -f Makefile sureclean
-
-
-Makefile: FORCE
- $(QMAKE) -spec unsupported/blackberry-armv7le-g++ -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device
- $(QMAKE) -spec unsupported/blackberry-x86-g++ -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator
- $(MAKE) -C ./translations -f Makefile update release
-
-FORCE:
-
-$(QMAKE_TARGET): device simulator
-
-device:
- $(MAKE) -C ./arm -f Makefile all
-
-Device-Debug: Makefile
- $(MAKE) -C ./arm -f Makefile debug
-
-Device-Release: Makefile
- $(MAKE) -C ./arm -f Makefile release
-
-simulator:
- $(MAKE) -C ./x86 -f Makefile all
-
-Simulator-Debug: Makefile
- $(MAKE) -C ./x86 -f Makefile debug
View
BIN BBMBaseSampleRegistration/arm/o.le-v7-g/BBMBaseSampleRegistration.bar
Binary file not shown.
View
25 BBMBaseSampleRegistration/assets/.preview-8028436732316202201qml~
@@ -1,25 +0,0 @@
-import bb.cascades 1.0
-
-Container {
- layout: StackLayout {
- }
- background: Color.create("#c6f66f")
- Container {
- horizontalAlignment: HorizontalAlignment.Center
- TextArea {
- id: statusText
- objectName: "statusText"
- text: "Please wait while the application registers with BBM SP."
- editable: false
- }
- Button {
- id: continueButton
- objectName: "continueButton"
- visible: false
- text: "Continue"
- layoutProperties: StackLayoutProperties {
- }
- horizontalAlignment: HorizontalAlignment.Center
- }
- }
-}
View
53 BBMBaseSampleRegistration/assets/registration.qml
@@ -1,53 +0,0 @@
-/* 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
-
-Container {
- layout: StackLayout {
- }
- background: Color.create("#c6f66f")
- Container {
- horizontalAlignment: HorizontalAlignment.Center
- TextArea {
- id: statusText
- objectName: "statusText"
- text: "Please wait while the application registers with BBM SP."
- editable: false
- }
- Button {
- id: continueButton
- objectName: "continueButton"
- visible: false
- text: "Continue"
- layoutProperties: StackLayoutProperties {
- }
- horizontalAlignment: HorizontalAlignment.Center
- onClicked: {
- nextLabel.visible = true;
- }
- }
- TextArea {
- id: nextLabel
- text: "Now you would display your application's main screen."
- visible: false
- backgroundVisible: false
- textStyle {
- color: Color.Black
- fontWeight: FontWeight.Bold
- }
- }
- }
-}
View
4 BBMBaseSampleRegistration/device-assets.xml
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<assets>
- <target-device width="768" height="1280" ppi="356" class="phone"/>
-</assets>
View
114 BBMBaseSampleRegistration/src/EventHandler.cpp
@@ -1,114 +0,0 @@
-/* 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 "EventHandler.hpp"
-
-#include <bbmsp/bbmsp_presence.h>
-#include <QtCore/QDebug>
-#include <bps/navigator.h>
-#include <errno.h>
-
-EventHandler* EventHandler::m_BPSEventHandlerInstance = NULL;
-static const QString logPrefix("EventHandler::");
-EventHandler*
-EventHandler::getInstance()
-{
- if (!m_BPSEventHandlerInstance) {
- m_BPSEventHandlerInstance = new EventHandler();
- }
- return m_BPSEventHandlerInstance;
-}
-
-EventHandler::EventHandler()
-{
- // These two calls must be made in this order: bps_initialize() must precede
- // bbmsp_request_events().
- qDebug() << logPrefix << "EventHandler(): bps initialize" << bps_initialize();
-
- // Prepare the library for listening to its events; 0 indicates that we wish
- // to listen for all events.
- qDebug() << logPrefix << "EventHandler(): request events ->" << bbmsp_request_events(0);
-
- // Start listening for events which come from the domain ID for the BBM Social
- // Platform.
- subscribe(bbmsp_get_domain());
-}
-
-
-void
-EventHandler::event(bps_event_t *event)
-{
- // This method listens for events and, based on the category of each event,
- // marshals it.
- qDebug() << logPrefix
- << "************************************** EVENT RECEIVED **************************************";
- int eventCategory = 0;
- bbmsp_event_type_t eventType;
- bbmsp_event_t* bbmspEvent = 0;
-
- // We know that \a event it is a bbmsp event because we've registered only for
- // events coming from the BBM Social Platform, so we can extract the category
- // and the type.
- bbmsp_event_get_category(event, &eventCategory);
- bbmsp_event_get_type(event, (int*) (&eventType));
- bbmsp_event_get(event, &bbmspEvent);
-
- switch (eventCategory) {
- case BBMSP_REGISTRATION:
- qDebug() << logPrefix << "event(): Registration Event on thread:"
- << (int) QThread::currentThreadId();
-
- handleRegistrationEvent(bbmspEvent, eventType);
- break;
-
- case BBMSP_USER_PROFILE:
- // This event will occur upon successful registration of the application
- // with the BBM SP Server, or when profile information has changed.
- qDebug() << logPrefix << "event(): Profile List Event on thread:"
- << (int) QThread::currentThreadId();
- //Not used in this sample.
- break;
-
- case BBMSP_CONNECTION:
- qDebug() << logPrefix << "event(): Connection List Event on thread:"
- << (int) QThread::currentThreadId();
- //Not used in this sample.
- break;
-
- case BBMSP_CONTACT_LIST:
- qDebug() << logPrefix << "event(): Contact List Event on thread:"
- << (int) QThread::currentThreadId();
- //Not used in this sample.
- break;
-
- default:
- break;
- }
-}
-
-void
-EventHandler::handleRegistrationEvent(bbmsp_event_t* event,
- bbmsp_event_type_t eventType)
-{
- // We have only one type of action for a registration event.
- if (eventType == BBMSP_SP_EVENT_ACCESS_CHANGED) {
- qDebug() << logPrefix << "handleRegistrationEvent(): BBMSP_SP_EVENT_ACCESS_CHANGED";
- emit bbmsp_register_callback(event);
- }
-}
-
-
-
-
View
51 BBMBaseSampleRegistration/src/EventHandler.hpp
@@ -1,51 +0,0 @@
-/* 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 EVENTHANDLER_HPP_
-#define EVENTHANDLER_HPP_
-
-#include <bb/AbstractBpsEventHandler>
-
-#include <QtCore/QObject>
-#include <QtCore/QThread>
-
-#include <bbmsp/bbmsp.h>
-#include <bbmsp/bbmsp_events.h>
-#include <bbmsp/bbmsp_context.h>
-
-class EventHandler : public QObject, public bb::AbstractBpsEventHandler
-{
- Q_OBJECT
-
-signals:
- void bbmsp_register_callback(bbmsp_event_t* event);
-
-public:
- void event(bps_event_t *event);
- static EventHandler* getInstance();
- void newAvatarSelected(QString imagePath);
- void getContactList();
-
-private:
- EventHandler();
- virtual ~EventHandler(){}
- void handleRegistrationEvent(bbmsp_event_t* event,
- bbmsp_event_type_t eventType);
-
-private:
- static EventHandler* m_BPSEventHandlerInstance;
-};
-
-#endif /* EVENTHANDLER_HPP_ */
View
177 BBMBaseSampleRegistration/src/RegistrationHandler.cpp
@@ -1,177 +0,0 @@
-/* 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 "RegistrationHandler.hpp"
-#include "EventHandler.hpp"
-
-#include <bbmsp/bbmsp.h>
-#include <bbmsp/bbmsp_events.h>
-#include <bbmsp/bbmsp_context.h>
-#include <bps/bps.h>
-
-#include <bb/cascades/QmlDocument>
-#include <bb/cascades/Application>
-
-
-using namespace bb::cascades;
-
-RegistrationHandler::RegistrationHandler()
-{
-
- // Create the UI for the registration page and its components.
- QmlDocument* qmlContent = QmlDocument::create("asset:///registration.qml");
- if (qmlContent) {
- Control* content = qmlContent->createRootObject<Control>();
- this->setContent(content);
- }
-
- // Console Setup -- link BbmspBpsEventHandler to registrationCallback().
- m_statusText = this->findChild<TextArea*>("statusText");
-
- // Retrieve the button
- m_continueButton = this->findChild<Button*>("continueButton");
-
- // Connect the callback for the button.
- QObject::connect(m_continueButton,
- SIGNAL(clicked()),
- this,
- SLOT(continueToMainAppScreen()));
-
- //Setup the registration callback.
- QObject ::connect(EventHandler::getInstance(),
- SIGNAL(bbmsp_register_callback(bbmsp_event_t*)),
- this,
- SLOT(registrationCallback(bbmsp_event_t*)));
-
- this->appRegister();
-}
-
-void RegistrationHandler::checkRegistrationAccess(bbmsp_access_error_codes_t accessErrorCode)
-{
- qDebug() << "Access error code = " << accessErrorCode;
-
- // This retrieves the registration status of the application. This determines
- // what level of access we have to the BBM Social Platform library.
-
- switch(accessErrorCode) {
- // The application has not yet registered with the BBM Social Platform
- // server.
-
- case BBMSP_ACCESS_ALLOWED:
- qDebug() << "Access allowed";
- m_statusText->setText("BBM SP registration succeeded.");
- m_continueButton->setVisible(true);
- break;
-
- case BBMSP_ACCESS_UNREGISTERED:
- qDebug() << "Unregistered";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_UNKNOWN:
- qDebug() << "Access failed: access unknown";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_PENDING:
- qDebug() << "Access failed: access pending";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_BLOCKED_BY_USER:
- qDebug() << "Access failed: blocked by user";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_BLOCKED_BY_RIM:
- qDebug() << "Access failed: blocked by RIM";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_UNEXPECTED_ERROR:
- qDebug() << "Access failed: unexpected error";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_INVALID_UUID:
- qDebug() << "Access failed: invalid UUID";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_TEMPORARY_ERROR:
- qDebug() << "Access failed: temporary error";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_MAX_DOWNLOADS_REACHED:
- qDebug() << "Access failed: max downloads reached";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_EXPIRED:
- qDebug() << "Access failed: access expired";
- this->registrationFailed();
- break;
-
- case BBMSP_ACCESS_CANCELLED_BY_USER:
- qDebug() << "Access failed: cancelled by user";
- this->registrationFailed();
- break;
-
- default:
- qDebug() << "Access failed: unknown error";
- this->registrationFailed();
- break;
- }
-
-}
-
-void RegistrationHandler::registrationFailed()
-{
- //A generic error message is provided here.
- //You could provide a different error for each failure code to instruct the
- //user on how to continue.
- m_statusText->setText("BBM SP registration failed. Registration is required connect with BlackBerry Messenger. Please restart the application to try again.");
- m_continueButton->setVisible(false);
-}
-
-void RegistrationHandler::appRegister()
-{
-
- // Attempt to register the application with the following UUID.
- // Every application is required to have its own unique UUID.
- //TODO: YOU MUST CHANGE THIS UUID!
- //Change this when creating your own application.
- //const std::string UUID = "4c4fad00-ebba-11e1-aff1-0800200c9a66";
-
- // The attempt to register will trigger another set of events, the first of
- // which is the Registration response. The other events are the Profile event
- // and an event which indicates that the library has received a list of
- // contacts.
- bbmsp_result_t rc = bbmsp_register(UUID.c_str());
- qDebug() << "registered -> " << rc;
-
-}
-
-void RegistrationHandler::registrationCallback(bbmsp_event_t* event)
-{
- this->checkRegistrationAccess(bbmsp_event_access_changed_get_access_error_code(event));
-}
-
-void RegistrationHandler::continueToMainAppScreen()
-{
- //TODO: Your applications main screen would be displayed here:
-
-}
View
57 BBMBaseSampleRegistration/src/RegistrationHandler.hpp
@@ -1,57 +0,0 @@
-/* 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 REGISTRATIONHANDLER_H_
-#define REGISTRATIONHANDLER_H_
-
-#include <QtCore/QObject>
-#include <QtCore/QMetaType>
-#include <QDebug>
-
-#include <bbmsp/bbmsp.h>
-#include <bbmsp/bbmsp_events.h>
-#include <bbmsp/bbmsp_context.h>
-#include <bps/bps.h>
-
-#include <bb/cascades/Button>
-#include <bb/cascades/Page>
-#include <bb/cascades/ActivityIndicator>
-#include <bb/cascades/TextArea>
-
-
-
-
-class RegistrationHandler: public bb::cascades::Page
-{
-
- Q_OBJECT
-
-public slots:
- void appRegister();
- void registrationCallback(bbmsp_event_t* event);
- void continueToMainAppScreen();
-
-public:
- RegistrationHandler();
- virtual ~RegistrationHandler(){};
-
-private:
- void checkRegistrationAccess(bbmsp_access_error_codes_t errorCode);
- void registrationFailed();
- bb::cascades::TextArea* m_statusText;
- bb::cascades::Button* m_continueButton;
-};
-
-#endif /* REGISTRATIONHANDLER_H_ */
View
56 BBMBaseSampleRegistration/src/main.cpp
@@ -1,56 +0,0 @@
-/* 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/NavigationPane>
-#include <bb/cascades/Page>
-
-#include <RegistrationHandler.hpp>
-
-#include <QLocale>
-#include <QTranslator>
-
-/*
- * A base sample that registers with the BBM Social Platform.
- * Other samples will extend this to demonstrate specific features of the BBM SP.
- */
-
-using namespace bb::cascades;
-
-int main(int argc, char **argv)
-{
- // this is where the server is started etc
- Application app(argc, argv);
-
- // 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(&app);
- // create root object for the UI
-// NavigationPane *root = qml->createRootObject<NavigationPane>();
- // set created root object as a scene
-// app.setScene(root);
-
- RegistrationHandler* page;
- page = new RegistrationHandler();
- app.setScene(page);
-
-// root->push(page);
-
- // we complete the transaction started in the app constructor and start the client event loop here
- return Application::exec();
- // when loop is exited the Application deletes the scene which deletes all its children (per qt rules for children)
-}
View
1 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.pro
@@ -1 +0,0 @@
-include (../BBMBaseSampleRegistration.pro)
View
1 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.qm
@@ -1 +0,0 @@
-<�d��!�`���
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0">
-</TS>
View
BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_de.qm
Binary file not shown.
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_de.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="de_DE">
-</TS>
View
BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_en_GB.qm
Binary file not shown.
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_en_GB.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="en_GB">
-</TS>
View
BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_es.qm
Binary file not shown.
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_es.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="es_ES">
-</TS>
View
BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_fr.qm
Binary file not shown.
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_fr.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
-</TS>
View
BIN BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_it.qm
Binary file not shown.
View
4 BBMBaseSampleRegistration/translations/BBMBaseSampleRegistration_it.ts
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="it_IT">
-</TS>
View
12 BBMBaseSampleRegistration/translations/Makefile
@@ -1,12 +0,0 @@
-QMAKE_TARGET = BBMBaseSampleRegistration
-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
67 BBMbpsRegistration/.cproject
@@ -0,0 +1,67 @@
+<?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.68175328">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.68175328" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <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="" description="" id="com.qnx.qcc.toolChain.68175328" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="com.qnx.qcc.toolChain.68175328.594603181" name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.390616832" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.os.1274541435" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
+ <option id="com.qnx.qcc.option.cpu.65704708" 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.1562967365" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
+ <option id="com.qnx.qcc.option.runtime.552242249" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.778907704" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder id="com.qnx.qcc.toolChain.68175328.492680704" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="com.qnx.qcc.tool.compiler.1399883724" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.optlevel.1253586629" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
+ <inputType id="com.qnx.qcc.inputType.compiler.786073443" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1876884407" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.247656400" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1485907331" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
+ <tool id="com.qnx.qcc.tool.archiver.2017086251" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="HelloWorldConsole.null.984246" name="HelloWorldConsole"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1864283463">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.68175328">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.241773269">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.296664683">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.2133515247">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1418667674">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope"/>
+</cproject>
View
17 BBMBaseSampleRegistration/.project → BBMbpsRegistration/.project
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>BBMBaseSampleRegistration</name>
+ <name>BBMbpsRegistration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
@@ -18,7 +19,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
- <value>Device-Debug</value>
+ <value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
@@ -38,7 +39,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>true</value>
+ <value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
@@ -50,7 +51,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>Device-Debug</value>
+ <value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
@@ -69,23 +70,15 @@
</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
247 BBMbpsRegistration/BbmRegistration.c
@@ -0,0 +1,247 @@
+/*
+ * 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 "BbmRegistration.h"
+
+#include <bps/bps.h>
+#include <bbmsp/bbmsp.h>
+
+#include <stdio.h>
+#include <string.h>
+
+// Keep track of whether the application needs to register.
+bbm_progress_t progress = BBM_PROGRESS_NOT_STARTED;
+
+void start_connecting_to_bbm() {
+ progress = BBM_PROGRESS_STARTED;
+ // Initialize the BBM Social Platform. bbmsp_request_events() must be called
+ // only once in your application.
+ if (bbmsp_request_events(0) == BBMSP_FAILURE) {
+ fprintf(stderr, "bbmsp_request_events(0) failed\n");
+ // Fatal error. Cannot use BBM APIs. Restarting the application may produce
+ // a different result. Check that you are using the BlackBerry Messenger
+ // permission in your bar-descriptor.xml file.
+ progress = BBM_PROGRESS_FINISHED;
+ bbm_registration_finished();
+ return;
+ }
+ // Process the initial access status.
+ process_bbm_registration_event(bbmsp_get_access_code());
+}
+
+void process_bbm_registration_event(const bbmsp_access_error_codes_t status)
+{
+ // Got a registration access status event. Based on the status, decide whether
+ // we need to register. If we already registered successfully once (i.e. on a
+ // previous application run), then we will not call bbmsp_register() again.
+ fprintf(stdout, "BBMSP access status=%d\n", status);
+
+ // Determine what to do based on the progress.
+ switch (progress) {
+ case BBM_PROGRESS_PENDING:
+ // Registration is in progress. Check the status to see if it finished.
+ if (status == BBMSP_ACCESS_PENDING) {
+ // Ignore. This means the registration is in progress.
+ return;
+ }
+ // Registration is done.
+ progress = BBM_PROGRESS_FINISHED;
+ fprintf(stdout, "Finished BBM registration, success=%d\n",
+ bbmsp_is_access_allowed());
+ bbm_registration_finished();
+ return;
+
+ case BBM_PROGRESS_STARTED:
+ if (bbmsp_is_access_allowed()) {
+ // Access is allowed, the application is registered.
+ progress = BBM_PROGRESS_FINISHED;
+ fprintf(stdout, "Successfully connected to BBM\n");
+ bbm_registration_finished();
+ return;
+ }
+ // Need to register.
+ if (status == BBMSP_ACCESS_UNKNOWN) {
+ // Status is not yet known. Wait for an event that will deliver the
+ // status.
+ fprintf(stdout, "BBMSP access status is UNKNOWN; waiting for initial "
+ "status\n");
+ return;
+ }
+ // Start registration.
+ // Attempt to register the application with the following UUID.
+ // Every application is required to have its own unique UUID. You should
+ // keep using the same UUID when you release a new version of your
+ // application.
+ // TODO: YOU MUST CHANGE THIS UUID!
+ // Change this when creating your own application.
+ // You can generate one here: http://www.guidgenerator.com/
+ //const char* const UUID = "";
+
+ if (bbmsp_register(UUID)) {
+ // Registration started. The user will see a dialog informing them that
+ // your application is connecting to BBM.
+ progress = BBM_PROGRESS_PENDING;
+ fprintf(stdout, "BBMSP registration started\n");
+ fprintf(stdout, "Verify that you are specifying a valid UUID\n");
+ return;
+ }
+ // Could not start registration. No dialogs were shown.
+ progress = BBM_PROGRESS_FINISHED;
+ fprintf(stdout, "BBMSP registration could not be started\n");
+ bbm_registration_finished();
+ return;
+
+ default:
+ // Ignoring these cases.
+ fprintf(stdout, "BBMSP access status ignored, progress=%d\n", progress);
+ return;
+ }
+}
+
+int get_bbm_registration_progress()
+{
+ return progress;
+}
+
+void bbm_registration_finished()
+{
+ if (bbmsp_is_access_allowed()) {
+ // Insert your code here to retrieve the user's profile or
+ // add profile box items.
+ } else {
+ // Insert your code here.
+ }
+}
+
+void get_bbm_registration_text(char* status,
+ const size_t status_size,
+ char* description,
+ const size_t description_size)
+{
+ // You can use the following code to update your UI component to indicate
+ // whether your application is connected to BBM.
+ // TODO: MODIFY FOR YOUR APPLICATION
+ switch (bbmsp_get_access_code()) {
+ case BBMSP_ACCESS_ALLOWED:
+ strlcpy(status, "Connected", status_size);
+ strlcpy(description, "BBM functionality is available", description_size);
+ return;
+
+ case BBMSP_ACCESS_UNKNOWN:
+ strlcpy(status, "Unknown", status_size);
+ strlcpy(description, "Wait for the status to refresh", description_size);
+ return;
+
+ case BBMSP_ACCESS_UNREGISTERED: {
+ strlcpy(status, "Not Connected", status_size);
+ // The application should be registering on start up. You can also allow
+ // the user to trigger registration by clicking a button.
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+ }
+ case BBMSP_ACCESS_PENDING: {
+ strlcpy(status, "Connecting...", status_size);
+ // The user will never see this. The BBM Social Platform already displays
+ // a "Connecting" dialog.
+ strlcpy(description, "Connecting to BBM. Please wait.", description_size);
+ return;
+ }
+ case BBMSP_ACCESS_BLOCKED_BY_USER:
+ strlcpy(status, "Disconnected", status_size);
+ strlcpy(description, "Go to Settings -> Security and Privacy -> "
+ "Application Permissions and connect this application to BBM",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_BLOCKED_BY_RIM:
+ strlcpy(status, "Disconnected by RIM", status_size);
+ strlcpy(description, "RIM is preventing this application from connecting to"
+ " BBM", description_size);
+ return;
+
+ case BBMSP_ACCESS_NO_DATA_CONNECTION:
+ strlcpy(status, "Not Connected", status_size);
+ // The application should be registering on start up. You can also allow
+ // the user to trigger registration by clicking a button.
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_UNEXPECTED_ERROR:
+ strlcpy(status, "Not Connected", status_size);
+ // The application should be registering on start up. You can also allow
+ // the user to trigger registration by clicking a button.
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_INVALID_UUID:
+ // You should be resolving this error at development time.
+ strlcpy(status, "Not Connected", status_size);
+ strlcpy(description, "Invalid UUID. Report this error to the vendor.",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_TEMPORARY_ERROR:
+ strlcpy(status, "Not Connected", status_size);
+ // The application should be registering on start up. You can also allow
+ // the user to trigger registration by clicking a button.
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_MAX_DOWNLOADS_REACHED:
+ strlcpy(status, "Not Connected", status_size);
+ strlcpy(description, "Cannot connect to BBM. Download this application from"
+ " AppWorld to keep using it.", description_size);
+ return;
+
+ case BBMSP_ACCESS_EXPIRED:
+ strlcpy(status, "Not Connected", status_size);
+ strlcpy(description, "Cannot connect to BBM. Download this application from"
+ " AppWorld to keep using it.", description_size);
+ return;
+
+ case BBMSP_ACCESS_CANCELLED_BY_USER:
+ strlcpy(status, "Not Connected", status_size);
+ // The application should be registering on start up. You can also allow
+ // the user to trigger registration by clicking a button.
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+
+ case BBMSP_ACCESS_MAX_APPS_REACHED:
+ strlcpy(status, "Not Connected", status_size);
+ strlcpy(description, "Too many applications are connected to BBM. Uninstall"
+ " one or more applications and try again.", description_size);
+ return;
+
+// This error code will be available in the next NDK release.
+// case BBMSP_ACCESS_BLOCKED_BBM_DISABLED:
+// strlcpy(status, "Not Connected", status_size);
+// strlcpy(description, "BBM is not setup. Open BBM to set it up and try again.",
+// description_size);
+// return;
+
+ default:
+ // New codes may be added in the future.
+ strlcpy(status, "Not Connected", status_size);
+ strlcpy(description, "Would you like to connect the application to BBM?",
+ description_size);
+ return;
+ }
+}
View
86 BBMbpsRegistration/BbmRegistration.h
@@ -0,0 +1,86 @@
+/*
+ * 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 BBM_REGISTRATION_HH_20121117010101
+#define BBM_REGISTRATION_HH_20121117010101
+
+#include <bbmsp/bbmsp_context.h>
+
+#include <stdlib.h>
+
+
+// Typical usage:
+//
+// application starts
+//
+// bps_initialize();
+//
+// start_connecting_to_bbm();
+//
+// use get_bbm_registration_progress() to see if registration is done
+//
+// inside the BPS event loop:
+//
+// if the event is a BBM Social Platform registration event,
+// call process_bbm_registration_event(status);
+// use get_bbm_registration_progress() to see if registration is done
+//
+
+// BBM registration progress enumeration.
+typedef enum
+{
+ // Registration has not started and has never been attempted since the
+ // application started.
+ BBM_PROGRESS_NOT_STARTED = 1,
+ // Registration has started.
+ BBM_PROGRESS_STARTED = 2,
+ // Registration is in progress.
+ BBM_PROGRESS_PENDING = 3,
+ // Registration is done. Use bbmsp_is_access_allowed() to check if it
+ // finished successfully.
+ BBM_PROGRESS_FINISHED = 4
+} bbm_progress_t;
+
+// Initiate connecting to BBM. Assumes that BPS is already initialized.
+void start_connecting_to_bbm();
+
+// Process a registration event.
+// \a status is the registration status carried by a BPS event.
+void process_bbm_registration_event(const bbmsp_access_error_codes_t status);
+
+// Return the registration progress.
+int get_bbm_registration_progress();
+
+// Placeholder to insert code when BBM registration is done (successful or
+// otherwise).
+void bbm_registration_finished();
+
+// Updates the \a status buffer with a short description of the registration
+// status (Connected, Not Connected, Connecting..., etc). Updates the
+// \a description buffer with a longer description of what the status means and
+// what the user can do next to connect the application to BBM.
+//
+// The \a status_size is the size of the \a status buffer. This should be 256.
+//
+// The \a description_size is the size of the \a description buffer. This should
+// be 512.
+//
+void get_bbm_registration_text(char* status,
+ const size_t status_size,
+ char* description,
+ const size_t description_size);
+
+#endif
View
379 BBMBaseSampleRegistration/LICENSE → BBMbpsRegistration/LICENSE
@@ -1,176 +1,203 @@
-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
+
+ 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
8 BBMbpsRegistration/Makefile
@@ -0,0 +1,8 @@
+LIST=CPU
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
View
5 BBMbpsRegistration/NOTICE
@@ -0,0 +1,5 @@
+BBMbpsRegistration
+Copyright (c) 2011-2012 Research In Motion Limited.
+
+This product includes software developed at
+Research In Motion Limited (http://www.rim.com/).
View
8 BBMbpsRegistration/arm/Makefile
@@ -0,0 +1,8 @@
+LIST=VARIANT
+ifndef QRECURSE
+QRECURSE=recurse.mk
+ifdef QCONFIG
+QRDIR=$(dir $(QCONFIG))
+endif
+endif
+include $(QRDIR)$(QRECURSE)
View
1 BBMbpsRegistration/arm/o.le-v7-g/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
View
1 BBMbpsRegistration/arm/o.le-v7/Makefile
@@ -0,0 +1 @@
+include ../../common.mk
View
94 BBMBaseSampleRegistration/bar-descriptor.xml → BBMbpsRegistration/bar-descriptor.xml
@@ -1,21 +1,4 @@
<?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.
@@ -26,78 +9,77 @@
<!-- 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.BBMBaseSampleRegistration</id>
+ <id>com.example.BpsBbmRegistration</id>
- <!-- The name that is displayed in the BlackBerry Tablet OS application installer.
+ <!-- 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>BBMBaseSampleRegistration</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.
+ <name>BpsBBMReg</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
+ <!-- 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 BBMBaseSampleRegistration application</description>
+ <description>BPS BBM Social Platform Registration</description>
<!-- Copyright information. Optional. -->
<!-- <copyright></copyright> -->
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
- <author>Mark Sohm</author>
- <authorId>gYAAgNhsdnlPot6ah1v6J-aKEjY</authorId>
-
+ <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>
- <configuration id="com.qnx.qcc.toolChain.1733727329" name="Default">
- <platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7-g/BBMBaseSampleRegistration" entry="true" type="Qnx/Elf">BBMBaseSampleRegistration</asset>
- </configuration>
- <configuration id="com.qnx.qcc.toolChain.1816859020" name="Device-Debug">
- <platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7-g/BBMBaseSampleRegistration" entry="true" type="Qnx/Elf">BBMBaseSampleRegistration</asset>
- </configuration>
- <configuration id="com.qnx.qcc.toolChain.151137367" name="Device-Release">
+ <asset path="icon.png">icon.png</asset>
+ <asset path="LICENSE">LICENSE</asset>
+ <asset path="NOTICE">NOTICE</asset>
+ <asset path="${QNX_TARGET}/armle-v7/usr/lib/qt4/lib/libQtCore.so" type="Qnx/Elf">lib/libQtCore.so.4</asset>
+ <configuration id="com.qnx.qcc.toolChain.68175328" name="Default">
<platformArchitecture>armle-v7</platformArchitecture>
- <asset path="arm/o.le-v7/BBMBaseSampleRegistration" entry="true" type="Qnx/Elf">BBMBaseSampleRegistration</asset>
+ <asset path="arm/o.le-v7-g/BBMbpsRegistration" entry="true" type="Qnx/Elf">BBMbpsRegistration</asset>
</configuration>
- <configuration id="com.qnx.qcc.toolChain.1992352498" name="Simulator-Debug">
- <platformArchitecture>x86</platformArchitecture>
- <asset path="x86/o-g/BBMBaseSampleRegistration" entry="true" type="Qnx/Elf">BBMBaseSampleRegistration</asset>
- </configuration>
-
+
<!-- The icon for the application, which should be 86x86. -->
<icon>
- <image>icon.png</image>
+ <image>icon.png</image>
</icon>
- <asset path="icon.png">icon.png</asset>
- <asset path="assets">assets</asset>
-
- <!-- Locale support -->
- <asset path="translations" dest="qm">
- <include name="*.qm"/>
- </asset>
-
+ <!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
+ <!-- <splashscreen></splashscreen> -->
+
<!-- Request permission to execute native code. Required for native applications. -->
<permission system="true">run_native</permission>
- <permission system="true">bbm_connect</permission>
- <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
+ <permission>bbm_connect</permission>
+
+ <!-- The permissions requested by your application. -->
+ <!-- <action>access_shared</action> -->
+ <!-- <action>record_audio</action> -->
+ <!-- <action>read_geolocation</action> -->
+ <!-- <action>use_camera</action> -->
+ <!-- <action>access_internet</action> -->
+ <!-- <action>play_audio</action> -->
+ <!-- <action>post_notification</action> -->
+ <!-- <action>set_audio_volume</action> -->
+ <!-- <action>read_device_identifying_information</action> -->
+
+ <!-- Ensure that shared libraries in the package are found at run-time. -->
+ <env var="LD_LIBRARY_PATH" value="app/native/lib"/>
</qnx>
View
49 BBMbpsRegistration/common.mk
@@ -0,0 +1,49 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+USEFILE=
+
+include $(MKFILES_ROOT)/qmacros.mk
+
+# Suppress the _g suffix from the debug variant
+BUILDNAME=$(IMAGE_PREF_$(BUILD_TYPE))$(NAME)$(IMAGE_SUFF_$(BUILD_TYPE))
+
+# Extra include path libfreetype and for target overrides and patches
+EXTRA_INCVPATH+=$(QNX_TARGET)/usr/include/freetype2 \
+ $(QNX_TARGET)/../target-override/usr/include
+
+# Extra library search path for target overrides and patches
+EXTRA_LIBVPATH+=$(QNX_TARGET)/../target-override/$(CPUVARDIR)/lib \
+ $(QNX_TARGET)/../target-override/$(CPUVARDIR)/usr/lib
+
+EXTRA_LIBVPATH += $(QNX_TARGET)/$(CPU)/usr/lib/qt4/lib
+EXTRA_LIBVPATH += $(QNX_TARGET)/armle-v7/usr/lib/qt4/lib
+
+# Compiler options for enhanced security
+CCFLAGS+=-fstack-protector-all -D_FORTIFY_SOURCE=2 \
+ $(if $(filter g so shared,$(VARIANTS)),,-fPIE)
+
+CCFLAGS += -Wformat -Wformat-security -Werror=format-security
+
+# And, of course, enable all normal warnings
+CCFLAGS += -Wall
+
+CCFLAGS += -Werror
+
+CCFLAGS += -fno-strict-aliasing
+
+# Linker options for enhanced security
+LDFLAGS+=-Wl,-z,relro -Wl,-z,now $(if $(filter g so shared,$(VARIANTS)),,-pie)
+
+# Basic libraries required by most native applications
+
+include $(MKFILES_ROOT)/qtargets.mk
+
+LIBS+=bps bbmsp QtCore cpp
+
+OPTIMIZE_TYPE_g=none
+OPTIMIZE_TYPE=$(OPTIMIZE_TYPE_$(filter g, $(VARIANTS)))
+
+-include $(PROJECT_ROOT)/../samples.mk
View
0 BBMBaseSampleRegistration/icon.png → BBMbpsRegistration/icon.png
File renamed without changes
View
96 BBMbpsRegistration/main.c
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+#include "BbmRegistration.h"
+
+#include <bps/bps.h>
+#include <bps/event.h>
+#include <bbmsp/bbmsp_events.h>
+#include <bbmsp/bbmsp.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+// Log the registration status and description if registration is done (failed
+// or finished successfully).
+void log_bbm_registration()
+{
+ const bbm_progress_t progress = get_bbm_registration_progress();
+ if (progress == BBM_PROGRESS_FINISHED) {
+ // TODO: Change this to suit your application.
+ char status[256];
+ char description[512];
+ get_bbm_registration_text(status, 256, description, 512);
+ fprintf(stdout, "BBM registration success=%d, status=%s, description=%s\n",
+ bbmsp_is_access_allowed(), status, description);
+ }
+}
+
+// Process BPS events.
+void handle_events() {
+ for(;;) {
+ bps_event_t *event = NULL;
+ // Need to flush stdout and stderr to make them appear in the sandbox
+ // log file.
+ fflush(stdout);
+ fflush(stderr);
+ bps_get_event(&event, -1);
+ if (!event) {
+ fprintf(stderr, "BPS event is NULL\n");
+ return;
+ }
+ if (bps_event_get_domain(event) != bbmsp_get_domain()) {
+ fprintf(stdout, "Received an event which is not handled\n");