Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #87 from timwindsor/master

Sample BB10 Extension for use as a Template
  • Loading branch information...
commit 39c46f9b755588b5e474735c646c398d85b49015 2 parents cd258ac + 5d5ff3a
Tim Windsor timwindsor authored
Showing with 2,945 additions and 0 deletions.
  1. +3 −0  BB10/README.md
  2. +279 −0 BB10/TEMPLATE/README.md
  3. +3 −0  BB10/TEMPLATE/TestApplication/README.md
  4. +15 −0 BB10/TEMPLATE/TestApplication/config.xml
  5. +34 −0 BB10/TEMPLATE/TestApplication/index.htm
  6. +30 −0 BB10/TEMPLATE/javascript_src/client.js
  7. +87 −0 BB10/TEMPLATE/javascript_src/index.js
  8. +5 −0 BB10/TEMPLATE/javascript_src/manifest.json
  9. +320 −0 BB10/TEMPLATE/native_src/public/plugin.cpp
  10. +70 −0 BB10/TEMPLATE/native_src/public/plugin.h
  11. +222 −0 BB10/TEMPLATE/native_src/public/tokenizer.cpp
  12. +55 −0 BB10/TEMPLATE/native_src/public/tokenizer.h
  13. +172 −0 BB10/TEMPLATE/native_src/src/memory_js.cpp
  14. +50 −0 BB10/TEMPLATE/native_src/src/memory_js.hpp
  15. +30 −0 BB10/TEMPLATE/output/example.memory/client.js
  16. BIN  BB10/TEMPLATE/output/example.memory/device/memoryJnext.so
  17. +87 −0 BB10/TEMPLATE/output/example.memory/index.js
  18. +5 −0 BB10/TEMPLATE/output/example.memory/manifest.json
  19. BIN  BB10/TEMPLATE/output/example.memory/simulator/memoryJnext.so
  20. +512 −0 BB10/TEMPLATE/project/memoryJnext/.cproject
  21. +77 −0 BB10/TEMPLATE/project/memoryJnext/.project
  22. +320 −0 BB10/TEMPLATE/project/memoryJnext/public/plugin.cpp
  23. +70 −0 BB10/TEMPLATE/project/memoryJnext/public/plugin.h
  24. +222 −0 BB10/TEMPLATE/project/memoryJnext/public/tokenizer.cpp
  25. +55 −0 BB10/TEMPLATE/project/memoryJnext/public/tokenizer.h
  26. +172 −0 BB10/TEMPLATE/project/memoryJnext/src/memory_js.cpp
  27. +50 −0 BB10/TEMPLATE/project/memoryJnext/src/memory_js.hpp
3  BB10/README.md
View
@@ -0,0 +1,3 @@
+# Contributing A BlackBerry 10 Extension
+
+This content will be updated shortly, but for now, take a look at the [TEMPLATE](https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/TEMPLATE) sample and use that for your starting point.
279 BB10/TEMPLATE/README.md
View
@@ -0,0 +1,279 @@
+# WebWorks Extension Example (Memory Extension)
+
+This document describes how to generate a WebWorks Extension.
+The implementation is split into two parts: [Native](#native) and [JavaScript](#JavaScript)
+
+The _ext_sample_ folder includes the implementation of an example
+extension that retrieves the current amount of free memory on the device.
+
+The resources in the _ext_sample_ folder include:
+
+* TestApplication/ - Resources for a WebWorks application that uses the Memory
+Extension to get the amount of free memory on the device.
+* javascript_src/ - The JavaScript source files of the example Memory Extension.
+* native_src/ - The native source files for the Memory Extension.
+* output/ - An example file structure of a completed extension that can
+be copied into a WebWorks Installation extension folder.
+* project/ - An example file structure of a native extension project that can
+build the native portion of an extension.
+
+The Memory Extension implementation should be used in conjunction with this
+read me file to understand how to create a WebWorks extension.
+
+## How to add an WebWorks Extension to your WebWorks Installation
+
+1. Navigate to the Framework/ext folder of your WebWorks Installation and
+create a folder for your extension.
+2. Copy you JavaScript files to the root folder of your extension folder.
+3. Create a device and a simulator folder in the root of your extension folder.
+4. Build the native portion of your native extension. One shared library for
+the device and another for the simulator.
+5. Copy the shared library for the device into the device folder.
+6. Copy the shared library for the simulator into the simulator folder.
+
+After completing the above steps you should be able to build WebWorks
+applications that can use your memory extension. If done correctly, the file
+structure of your extension should match the file structure of the output
+folder in the _ext_sample_ folder.
+
+IMPORTANT: Make sure that your WebWorks applications whitelist the extension
+otherwise the application will not be able to use the extension.
+
+### <a name="native">Native Part - Overview</a>
+
+This part of the document will describe:
+
+1. How to setup a native extension project in eclipse.
+2. The steps needed to implement a JNEXT extension on the native side.
+3. How to build your native extension project.
+
+### How to create an Extension Project with the [Native SDK](https://developer.blackberry.com/native/)
+
+1. Open the Momentics IDE. Navigate to the workbench and from the program menu
+select File -> New -> BlackBerry C/C++ Project.
+2. Enter a name for your project in the window that appears and click next.
+3. In the following window, choose C++ for the language, Managed Build for the
+Build Style and an empty shared library project for the project type.
+When you're done click next.
+4. Select the active configuration you want to use for this project then click
+next.
+5. If you wish to use a Native SDK that is different from the workspace SDK then
+uncheck the option to use the workspace SDK selection and select a different
+SDK. When you are done, click Finish. You should see your new project appear in
+the Project Explorer window.
+6. In order to build an extension you'll need to import
+[extension resources](#import) into your new project.
+
+### <a name="import">How to import extension resources</a>
+
+1. Right click on your project and select the import menu item. In the window
+that appears select the file system as an import source and click next.
+2. The next window will prompt you to provide a path to a folder. Select the
+public and src folders located in the native_src folder of the extension
+template folder. Import both of the folders and their contents. Then click
+finish. Your project should now have a public folder and a source folder which
+contains source and header files. If done correctly, the file structure of your
+project should match the file structure of the project folder in the extension
+template folder.
+
+After following the instructions below to implement an extension you should
+[build your extension](#buildExtension) for both the device and the simulator.
+
+### How to implement a JNEXT extension on the native side
+
+The native and JavaScript portion of a WebWorks extension communicate with each
+other through the use of an extension framework provided by JNEXT. The native
+interface for the JNEXT extension can be viewed in the plugin header file
+located in the public folder of your project. It also contains constants and
+utility functions that can be used in your native code. Your native extension
+must be derived from JSExt which is defined in plugin.h. Therefore your
+extension should include this header file.
+
+The MemoryExtension sample code included in the _ext&#95;sample_ folder
+implements the native extension interface to JNEXT.
+
+Each native extension must implement the following callback functions:
+
+```cpp
+extern char* onGetObjList( void );
+extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
+```
+
+The onGetObjList function returns a comma separated list of classes supported by
+this JNEXT extension. It is used by JNEXT to determine the set of classes that
+can be instantiated by this JNEXT extension.
+
+The onCreateObject function is the other callback that must be implemented by
+the native JNEXT extension. It takes two parameters. The first parameter is the
+name of the class requested to be created from the JavaScript side. Valid names
+are those that are returned in onGetObjList. The second parameter is the unique
+object id for the class. This method returns a pointer to the created extension
+object.
+
+The native extension must also implement the following class:
+
+```cpp
+class JSExt
+{
+public:
+ virtual ~JSExt() {};
+ virtual string InvokeMethod( const string& strCommand ) = 0;
+ virtual bool CanDelete( void ) = 0;
+private:
+ std::string m_id;
+};
+```
+
+The m_id is an attribute that contains the JNEXT id for this object. The id is
+passed to the class as an argument to the constructor. It is needed to trigger
+events on the JavaScript side from native.
+
+The CanDelete method is used by JNEXT to determine whether your native object
+can be deleted.
+
+The InvokeMethod function is called as a result from a request from JavaScript
+to invoke a method of this particular object. The only argument to this
+function is a string passed from JavaScript that this method should parse in
+order to determine which method of the native object should be executed.
+
+If you want the native code to be able to trigger an event on the JavaScript
+side then you'll need to call the SendPluginEvent function which has the
+following signature:
+
+```cpp
+void SendPluginEvent( const char* szEvent, void* pContext );
+```
+
+The first parameter is a space delimited string consisting of
+the m_id (inherited attribute from JSExt) followed by the arguments you wish to
+pass to the JavaScript on event function. The second parameter is the
+m_pContext (inherited attribute from JSExt).
+
+### <a name="buildExtension">How to build your native Extension</a>
+
+1. Right click your project and select the Clean Project option.
+2. Right click your project again and select Build Configurations -> Build Selected... .
+3. A window will appear that shows all the available build configurations
+for the project. Depending on the profile you wish to use select the Device and
+corresponding Simulator build profiles and click ok.
+4. You should see the shared libraries generated in the folders for each Build
+Configuration that you selected.
+
+### How to change the name of the build artifact.
+
+1. Right click on your project and selecting properties.
+2. Expand the C/C++ Build option and select the Settings option.
+3. In the main window select the build configuration you wish to configure and
+select the build artifact tab.
+4. You should see fields for the type, name, extension and prefix of the
+artifact tab which you can modify to change the build artifact that is
+generated. When you have completed your changes then select ok.
+
+Please note that each modification of the build artifact corresponds to a
+single configuration. If you wish to modify the build artifacts of all the build
+configurations you will need to modify each build configuration.
+
+## <a name="JavaScript">JavaScript Part - Overview</a>
+Under the javascript_src folder there are following JavaScript files:
+
+* __client.js__ - Considered to be a client side, exports APIs that are
+accessible from the client's application. _client.js_ file name is mandatory.
+* __index.js__ - Considered to be a server side, exports APIs that are
+accessible from the _client.js_ and able to communicate with _native_ side.
+_index.js_ file name is mandatory.
+* __manifest.json__ - Descriptor defines Whitelisting flag, ID and Dependencies
+for the extension.
+
+__example.memory__ is the extension ID as it defined in __manifest.js__ and
+serves as a prefix to all methods and fields defined in the __client.js__
+
+__example.memory__._getMemory_ - Call this method to get free memory bytes
+__example.memory__._monitorMemory_ - Call this method to register and be
+notified of memory events.
+
+####See sample code below:
+
+```javascript
+
+ function memoryUsageCallback(memoryInByte) {
+ alert("Event Callback. Free memory: " + memoryInByte);
+ }
+
+ var freeMemory = example.memory.getMemory();
+ alert("Free memory: " + freeMemory);
+
+ example.memory.monitorMemory(memoryUsageCallback);
+```
+
+## JavaScript Part - In Depth
+The interaction between __client.js__ and __index.js__ is made by using APIs of
+__webworks__ object.
+
+The client side can make synchronous or asynchronous calls to the server side.
+When making a call to server side, each method in __client.js__ should provide
+the ID, method name and arguments to _execSync_ to get a synchronized call or to
+_execAsync_ when the request is asynchronous. This will result in the invocation
+of a corresponding method name in __index.js__.
+
+The __webworks__ object has an event API that can be used to communicate between
+the client and server side. The client registers a callback against the event
+API which the server side can trigger. An example of this functionality is the
+monitor memory function which registers a callback on the client side:
+
+```javascript
+ window.webworks.event.add(_ID, "example.memory.memoryEvent", cb);
+```
+
+Where the arguments to the function are the feature id, event id and the
+callback. Once the event is registered on the client side it can be triggered
+by the server side whenever the memory usage changes:
+
+```javascript
+ _event.trigger("example.memory.memoryEvent", arg);
+```
+
+The server side uses the event id to trigger the client side callback and passes
+the new memory usage as an argument for the callback.
+
+### JNEXT Interface
+The interaction between __index.js__ and the _native_ side is made by using
+APIs of JNEXT interface. To accomplish this a constructor function
+_MemoryJNext_ is attached to __JNEXT__. The object is expected to have a
+following structure:
+
+ * _onEvent_ - Events from the _native_ side are passed as a __String__ to
+ this method. _onEvent_ is a mandatory name.
+ * _init_ - It performs several key operations:
+ 1. Requires the module exported by _native_ side -
+ JNEXT.require("memoryJnext"). The name of required module _memoryJnext_ should match the name of a shared library .so file.
+ 2. Creates an object using acquired module and saves the _id_ returned by the
+ call - _self.&#95;id_ = JNEXT.createObject("memoryJnext.Memory").
+ 3. Registers itself to be notified on events so _onEvent_ will be called -
+ JNEXT.registerEvents(_self).
+ * _getId_ - Returns the _id_ previously saved - return _self.&#95;id_.
+ * Methods and fields used by __index.js__ to redirect, when required, calls
+ that initially came from __client.js__ to the _native_ side. This example
+ has two: _getMemoryJNext_ and _monitorMemoryJNext_
+
+__index.js__ creates a _MemoryJNext_ object and save its instance in variable, then
+redirects calls to methods in __index.js__ to the corresponding _MemoryJNext_ method.
+
+```javascript
+
+ //Code in user's app.
+ var freeMemory = example.memory.getMemory();
+
+ //Code in user app trigger this code in client.js
+ return window.webworks.execSync(_ID, "getMemoryServer", null);
+
+ //Code in client.js trigger this code in index.js
+ getMemoryServer: function (success, fail, args, env) {
+ ....
+ }
+
+ //Finally in index.js code that belongs to MemoryJNext object is triggered where
+ //call to native side takes place and returned value is passed back to the user.
+ _self.getMemoryJNext = function () {
+ return JNEXT.invoke(_self._id, "getMemoryNative");
+ };
+```
3  BB10/TEMPLATE/TestApplication/README.md
View
@@ -0,0 +1,3 @@
+# Where to find the missing file webworks-1.0.0.7.js
+
+You will find it under Framework/clientFiles/webworks-1.0.0.7.js in your WebWorks SDK installation folder and copy it to this folder.
15 BB10/TEMPLATE/TestApplication/config.xml
View
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets"
+ xmlns:rim="http://www.blackberry.com/ns/widgets"
+ version="1.0.0"
+ id="ExampleMemoryExtension">
+ <name>MemoryExtension</name>
+ <content src="index.htm"/>
+ <author>
+ Research In Motion Ltd.
+ </author>
+ <description>The example to show how to develop and use memory extension</description>
+ <feature id="example.memory" required="true" version="1.0.0.0"/>
+ <access uri="*"/>
+ <license href="http://www.apache.org/licenses/LICENSE-2.0">My License</license>
+</widget>
34 BB10/TEMPLATE/TestApplication/index.htm
View
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <title>Example of Memory Extension</title>
+ <script type="text/javascript" src="webworks-1.0.0.7.js"></script>
+ <script type="text/javascript">
+ function getFreeMemory() {
+ var freeMemory = example.memory.getMemory();
+ alert("Free memory: " + freeMemory);
+ }
+
+ function memoryUsageCallback(memoryInByte) {
+ document.getElementById("memoryUsage").innerHTML = "Free memory: " + memoryInByte;
+ }
+
+ function monitorMemoryUsage() {
+ var ret = example.memory.monitorMemory(memoryUsageCallback);
+ alert(ret);
+ }
+ </script>
+ </head>
+ <body bgcolor="#FF9900">
+ <div align="center">
+ <button style="width:280px; height: 240px; font-size: 200%; background-color: lightgreen" onclick="getFreeMemory()">
+ Get current free memory
+ </button>
+ <button style="width:280px; height: 240px; font-size: 200%; background-color: lightgreen" onclick="monitorMemoryUsage()">
+ Start monitoring memory
+ </button>
+ <br />
+ </div>
+ <div id="memoryUsage" style="font-size: 200%; background-color: lightblue">
+ </div>
+ </body>
+</html>
30 BB10/TEMPLATE/javascript_src/client.js
View
@@ -0,0 +1,30 @@
+/*
+* Copyright 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.
+*/
+
+var _self = {},
+ _ID = require("./manifest.json").namespace;
+
+_self.getMemory = function () {
+ return window.webworks.execSync(_ID, "getMemoryServer", null);
+};
+
+_self.monitorMemory = function (cb) {
+ window.webworks.event.add(_ID, "example.memory.memoryEvent", cb);
+
+ return window.webworks.execSync(_ID, "monitorMemoryServer", null);
+};
+
+module.exports = _self;
87 BB10/TEMPLATE/javascript_src/index.js
View
@@ -0,0 +1,87 @@
+/*
+ * Copyright 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.
+ */
+var memoryJNext,
+ _event = require("../../lib/event");
+
+module.exports = {
+ getMemoryServer: function (success, fail, args, env) {
+ try {
+ success(memoryJNext.getMemoryJNext());
+ } catch (e) {
+ fail(-1, e);
+ }
+ },
+
+ monitorMemoryServer: function (success, fail, args, env) {
+ try {
+ success(memoryJNext.monitorMemoryJNext());
+ } catch (e) {
+ fail(-1, e);
+ }
+ }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.MemoryJNext = function ()
+{
+ var _self = this;
+
+ _self.getMemoryJNext = function () {
+ return JNEXT.invoke(_self._id, "getMemoryNative");
+ };
+
+ _self.monitorMemoryJNext = function () {
+ return JNEXT.invoke(_self._id, "monitorMemoryNative");
+ };
+
+ _self.getId = function () {
+ return _self._id;
+ };
+
+ _self.init = function () {
+ if (!JNEXT.require("memoryJnext")) {
+ return false;
+ }
+
+ _self._id = JNEXT.createObject("memoryJnext.Memory");
+
+ if (!_self._id || _self._id === "") {
+ return false;
+ }
+
+ JNEXT.registerEvents(_self);
+ };
+
+ _self.onEvent = function (strData) {
+ var arData = strData.split(" "),
+ strEventId = arData[0],
+ arg = arData[1];
+
+ // Trigger the event handler of specific Push events
+ if (strEventId === "FreeMemory") {
+ _event.trigger("example.memory.memoryEvent", arg);
+ }
+ };
+
+ _self._id = "";
+
+ _self.init();
+};
+
+memoryJNext = new JNEXT.MemoryJNext();
5 BB10/TEMPLATE/javascript_src/manifest.json
View
@@ -0,0 +1,5 @@
+{
+ "global": false,
+ "namespace": "example.memory",
+ "dependencies": []
+}
320 BB10/TEMPLATE/native_src/public/plugin.cpp
View
@@ -0,0 +1,320 @@
+#include "plugin.h"
+#include "tokenizer.h"
+
+#ifdef _WINDOWS
+#include <windows.h>
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved )
+{
+ return TRUE;
+}
+#else
+#include <errno.h>
+#include <string.h>
+
+extern int errno;
+#endif
+
+SendPluginEv SendPluginEvent;
+
+string g_GetSysErrMsg( void )
+{
+ string strError = "Unknown";
+ // Problem loading
+#ifdef _WINDOWS
+ int nErrorCode = GetLastError();
+ LPTSTR s;
+ if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
+ {
+ strError = s;
+ }
+ else
+ {
+ char szBuf[ 20 ];
+ _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
+ strError = szBuf;
+ }
+#else
+ char szError[80];
+ if ( strerror_r( errno, szError, sizeof(szError) ) )
+ {
+ strError = "no description found";
+ }
+ else
+ {
+ strError = szError;
+ }
+#endif
+ return strError;
+}
+
+void g_sleep( unsigned int mseconds )
+{
+#ifdef _WINDOWS
+ Sleep( mseconds );
+#else
+ usleep( mseconds * 1000 );
+#endif
+}
+
+string& g_trim( string& str )
+{
+ // Whitespace characters
+ char whspc[] = " \t\r\n\v\f";
+
+ // Whack off first part
+ size_t pos = str.find_first_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( 0, pos, "" );
+
+ // Whack off trailing stuff
+ pos = str.find_last_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( pos + 1, str.length() - pos, "" );
+
+ return str;
+}
+
+void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
+{
+ tokenize( str, tokens, delimiters );
+}
+
+char* SetEventFunc( SendPluginEv funcPtr )
+{
+ static char * szObjList = onGetObjList();
+ SendPluginEvent = funcPtr;
+ return szObjList;
+}
+
+
+const int nMAXSIZE = 512;
+char* g_pszRetVal = NULL;
+
+//-----------------------------------------------------------
+// Map from an object Id to an object instance
+//-----------------------------------------------------------
+typedef std::map<string, JSExt*> StringToJExt_T;
+
+//-----------------------------------------------------------
+// Map from a browser context to an id mapping
+//-----------------------------------------------------------
+typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
+
+VoidToMap_T g_context2Map;
+
+class GlobalSharedModule
+{
+
+public:
+ GlobalSharedModule( void )
+ {
+ g_pszRetVal = new char[ nMAXSIZE ];
+ }
+
+ ~GlobalSharedModule()
+ {
+ delete [] g_pszRetVal;
+
+ VoidToMap_T::iterator posMaps;
+
+ for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
+ {
+ StringToJExt_T& id2Obj = *posMaps->second;
+ StringToJExt_T::iterator posMap;
+
+ for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
+ {
+ JSExt* pJSExt = posMap->second;
+
+ if ( pJSExt->CanDelete() )
+ {
+ delete pJSExt;
+ }
+ }
+
+ id2Obj.erase( id2Obj.begin(), id2Obj.end() );
+ }
+
+ g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
+ }
+};
+
+GlobalSharedModule g_sharedModule;
+
+char* g_str2global( const string& strRetVal )
+{
+ int nLen = strRetVal.size();
+
+ if ( nLen >= nMAXSIZE )
+ {
+ delete [] g_pszRetVal;
+ g_pszRetVal = new char[ nLen + 1 ];
+ }
+
+ else
+ {
+ // To minimaize the number of memory reallocations, the assumption
+ // is that in most times this will be the case
+ delete [] g_pszRetVal;
+ g_pszRetVal = new char[ nMAXSIZE ];
+ }
+
+ strcpy( g_pszRetVal, strRetVal.c_str() );
+ return g_pszRetVal;
+}
+
+bool g_unregisterObject( const string& strObjId, void* pContext )
+{
+ // Called by the plugin extension implementation
+ // if the extension handles the deletion of its object
+
+ StringToJExt_T * pID2Obj = NULL;
+
+ VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+ if ( iter != g_context2Map.end() )
+ {
+ pID2Obj = iter->second;
+ }
+ else
+ {
+ return false;
+ }
+
+ StringToJExt_T& mapID2Obj = *pID2Obj;
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ return false;
+ }
+
+ mapID2Obj.erase( strObjId );
+ return true;
+}
+
+char* InvokeFunction( const char* szCommand, void* pContext )
+{
+ StringToJExt_T * pID2Obj = NULL;
+
+ VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+ if ( iter != g_context2Map.end() )
+ {
+ pID2Obj = iter->second;
+ }
+ else
+ {
+ pID2Obj = new StringToJExt_T;
+ g_context2Map[ pContext ] = pID2Obj;
+ }
+
+ StringToJExt_T& mapID2Obj = *pID2Obj;
+
+ string strFullCommand = szCommand;
+ vector<string> arParams;
+ g_tokenize( strFullCommand, " ", arParams );
+ string strCommand = arParams[ 0 ];
+ string strRetVal = szERROR;
+
+ if ( strCommand == szCREATE )
+ {
+ string strClassName = arParams[ 1 ];
+ string strObjId = arParams[ 2 ];
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r != mapID2Obj.end() )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Object already exists.";
+ return g_str2global( strRetVal );
+ }
+
+ JSExt* pJSExt = onCreateObject( strClassName, strObjId );
+
+ if ( pJSExt == NULL )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Unknown object type ";
+ strRetVal += strClassName;
+ return g_str2global( strRetVal );
+ }
+
+ pJSExt->m_pContext = pContext;
+ mapID2Obj[ strObjId ] = pJSExt;
+
+ strRetVal = szOK;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+ else
+ if ( strCommand == szINVOKE )
+ {
+ string strObjId = arParams[ 1 ];
+ string strMethod = arParams[ 2 ];
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :No object found for id.";
+ return g_str2global( strRetVal );
+ }
+
+ JSExt* pJSExt = r->second;
+
+ size_t nLoc = strFullCommand.find( strObjId );
+
+ if ( nLoc == string::npos )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Internal InvokeMethod error.";
+ return g_str2global( strRetVal );
+ }
+
+ if ( strMethod == szDISPOSE )
+ {
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ strRetVal = szERROR;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+
+ JSExt * pJSExt = mapID2Obj[ strObjId ];
+
+ if ( pJSExt->CanDelete() )
+ {
+ delete pJSExt;
+ }
+
+ mapID2Obj.erase( strObjId );
+ strRetVal = szOK;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+
+ size_t nSuffixLoc = nLoc + strObjId.size();
+ string strInvoke = strFullCommand.substr( nSuffixLoc );
+ strInvoke = g_trim( strInvoke );
+ strRetVal = pJSExt->InvokeMethod( strInvoke );
+ return g_str2global( strRetVal );
+ }
+
+ strRetVal += " :Unknown command ";
+ strRetVal += strCommand;
+ return g_str2global( strRetVal );
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
70 BB10/TEMPLATE/native_src/public/plugin.h
View
@@ -0,0 +1,70 @@
+#ifndef _PLUGIN_H
+#define _PLUGIN_H
+
+#include <map>
+#include <string>
+#include <vector>
+#include <unistd.h>
+//#include "tokenizer.h"
+
+using namespace std;
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+//%% Functions exported by this DLL
+//%% Should always be only SetEventFunc and InvokeFunction
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
+// are mangled C++ style. MS Visual Studio doesn't seem to care though.
+extern "C"
+{
+ typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
+ char* SetEventFunc(SendPluginEv funcPtr);
+ char* InvokeFunction( const char* szCommand, void* pContext );
+}
+
+// JNEXT Framework function of the form:
+// typedef void (*SendPluginEv)( const char* szEvent );
+// used to notify JavaScript of an asynchronous event
+extern SendPluginEv SendPluginEvent;
+
+/////////////////////////////////////////////////////////////////////////
+// Constants and methods common to all JNEXT extensions types
+/////////////////////////////////////////////////////////////////////////
+#define szERROR "Error "
+#define szOK "Ok "
+
+#define szDISPOSE "Dispose"
+#define szINVOKE "InvokeMethod"
+#define szCREATE "CreateObj"
+
+/////////////////////////////////////////////////////////////////////////
+// Utility functions
+/////////////////////////////////////////////////////////////////////////
+string& g_trim( string& str );
+void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
+char* g_str2static( const string& strRetVal );
+void g_sleep( unsigned int mseconds );
+bool g_unregisterObject( const string& strObjId, void* pContext );
+
+
+/////////////////////////////////////////////////////////////////////////
+// Abstract extension object
+/////////////////////////////////////////////////////////////////////////
+class JSExt
+{
+public:
+ virtual ~JSExt() {};
+ virtual string InvokeMethod( const string& strCommand ) = 0;
+ virtual bool CanDelete( void ) = 0;
+ virtual void TryDelete( void ) {}
+public:
+ void* m_pContext;
+};
+
+/////////////////////////////////////////////////////////////////////////
+// Callback functions to be implemented by the plugin implementation
+/////////////////////////////////////////////////////////////////////////
+extern char* onGetObjList( void );
+extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
+
+#endif
222 BB10/TEMPLATE/native_src/public/tokenizer.cpp
View
@@ -0,0 +1,222 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+you must not claim that you wrote the original software.
+If you use this software in a product, an acknowledgment
+in the product documentation would be appreciated but is
+not required.
+
+2. Altered source versions must be plainly marked as such,
+and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+ created: 2006-01-28
+ filename: tokenizer.cpp
+ author: Jörg Wiedenmann
+
+ purpose: A tokenizer function which provides a very
+ customizable way of breaking up strings.
+
+ history: 2006-01-28, Original version
+ 2006-03-04, Fixed a small parsing bug, thanks Elias.
+*********************************************************************/
+
+#include "tokenizer.h"
+
+using namespace std;
+
+void tokenize ( const string& str, vector<string>& result,
+ const string& delimiters, const string& delimiters_preserve,
+ const string& quote, const string& esc )
+{
+ // clear the vector
+ if ( false == result.empty() )
+ {
+ result.clear();
+ }
+
+ string::size_type pos = 0; // the current position (char) in the string
+ char ch = 0; // buffer for the current character
+ char delimiter = 0; // the buffer for the delimiter char which
+ // will be added to the tokens if the delimiter
+ // is preserved
+ char current_quote = 0; // the char of the current open quote
+ bool quoted = false; // indicator if there is an open quote
+ string token; // string buffer for the token
+ bool token_complete = false; // indicates if the current token is
+ // read to be added to the result vector
+ string::size_type len = str.length(); // length of the input-string
+
+ // for every char in the input-string
+ while ( len > pos )
+ {
+ // get the character of the string and reset the delimiter buffer
+ ch = str.at(pos);
+ delimiter = 0;
+
+ // assume ch isn't a delimiter
+ bool add_char = true;
+
+ // check ...
+
+ // ... if the delimiter is an escaped character
+ bool escaped = false; // indicates if the next char is protected
+ if ( false == esc.empty() ) // check if esc-chars are provided
+ {
+ if ( string::npos != esc.find_first_of(ch) )
+ {
+ // get the escaped char
+ ++pos;
+ if ( pos < len ) // if there are more chars left
+ {
+ // get the next one
+ ch = str.at(pos);
+
+ // add the escaped character to the token
+ add_char = true;
+ }
+ else // cannot get any more characters
+ {
+ // don't add the esc-char
+ add_char = false;
+ }
+
+ // ignore the remaining delimiter checks
+ escaped = true;
+ }
+ }
+
+ // ... if the delimiter is a quote
+ if ( false == quote.empty() && false == escaped )
+ {
+ // if quote chars are provided and the char isn't protected
+ if ( string::npos != quote.find_first_of(ch) )
+ {
+ // if not quoted, set state to open quote and set
+ // the quote character
+ if ( false == quoted )
+ {
+ quoted = true;
+ current_quote = ch;
+
+ // don't add the quote-char to the token
+ add_char = false;
+ }
+ else // if quote is open already
+ {
+ // check if it is the matching character to close it
+ if ( current_quote == ch )
+ {
+ // close quote and reset the quote character
+ quoted = false;
+ current_quote = 0;
+
+ // don't add the quote-char to the token
+ add_char = false;
+ }
+ } // else
+ }
+ }
+
+ // ... if the delimiter isn't preserved
+ if ( false == delimiters.empty() && false == escaped &&
+ false == quoted )
+ {
+ // if a delimiter is provided and the char isn't protected by
+ // quote or escape char
+ if ( string::npos != delimiters.find_first_of(ch) )
+ {
+ // if ch is a delimiter and the token string isn't empty
+ // the token is complete
+ if ( false == token.empty() ) // BUGFIX: 2006-03-04
+ {
+ token_complete = true;
+ }
+
+ // don't add the delimiter to the token
+ add_char = false;
+ }
+ }
+
+ // ... if the delimiter is preserved - add it as a token
+ bool add_delimiter = false;
+ if ( false == delimiters_preserve.empty() && false == escaped &&
+ false == quoted )
+ {
+ // if a delimiter which will be preserved is provided and the
+ // char isn't protected by quote or escape char
+ if ( string::npos != delimiters_preserve.find_first_of(ch) )
+ {
+ // if ch is a delimiter and the token string isn't empty
+ // the token is complete
+ if ( false == token.empty() ) // BUGFIX: 2006-03-04
+ {
+ token_complete = true;
+ }
+
+ // don't add the delimiter to the token
+ add_char = false;
+
+ // add the delimiter
+ delimiter = ch;
+ add_delimiter = true;
+ }
+ }
+
+
+ // add the character to the token
+ if ( true == add_char )
+ {
+ // add the current char
+ token.push_back( ch );
+ }
+
+ // add the token if it is complete
+ if ( true == token_complete && false == token.empty() )
+ {
+ // add the token string
+ result.push_back( token );
+
+ // clear the contents
+ token.clear();
+
+ // build the next token
+ token_complete = false;
+ }
+
+ // add the delimiter
+ if ( true == add_delimiter )
+ {
+ // the next token is the delimiter
+ string delim_token;
+ delim_token.push_back( delimiter );
+ result.push_back( delim_token );
+
+ // REMOVED: 2006-03-04, Bugfix
+ }
+
+ // repeat for the next character
+ ++pos;
+ } // while
+
+ // add the final token
+ if ( false == token.empty() )
+ {
+ result.push_back( token );
+ }
+}
55 BB10/TEMPLATE/native_src/public/tokenizer.h
View
@@ -0,0 +1,55 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+ you must not claim that you wrote the original software.
+ If you use this software in a product, an acknowledgment
+ in the product documentation would be appreciated but is
+ not required.
+
+2. Altered source versions must be plainly marked as such,
+ and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+ created: 2006-01-28
+ filename: tokenizer.cpp
+ author: Jörg Wiedenmann
+
+ purpose: A tokenizer function which provides a very
+ customizable way of breaking up strings.
+*********************************************************************/
+
+#include <vector>
+#include <string>
+using namespace std;
+
+// Function to break up a string into tokens
+//
+// Parameters:
+//-----------
+// str = the input string that will be tokenized
+// result = the tokens for str
+// delimiters = the delimiter characters
+// delimiters preserve = same as above, but the delimiter characters
+// will be put into the result as a token
+// quote = characters to protect the enclosed characters
+// esc = characters to protect a single character
+//
+
+void tokenize ( const string& str, vector<string>& result,
+ const string& delimiters, const string& delimiters_preserve = "",
+ const string& quote = "\"", const string& esc = "\\" );
172 BB10/TEMPLATE/native_src/src/memory_js.cpp
View
@@ -0,0 +1,172 @@
+/*
+* Copyright 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 <string>
+#include <sstream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "memory_js.hpp"
+
+using namespace std;
+
+/**
+ * Default constructor.
+ */
+Memory::Memory(const std::string& id) : m_id(id) {
+ m_thread = 0;
+}
+
+/**
+ * Memory destructor.
+ */
+Memory::~Memory() {
+}
+
+/**
+ * This method returns the list of objects implemented by this native
+ * extension.
+ */
+char* onGetObjList() {
+ static char name[] = "Memory";
+ return name;
+}
+
+/**
+ * This method is used by JNext to instantiate the Memory object when
+ * an object is created on the JavaScript server side.
+ */
+JSExt* onCreateObject(const string& className, const string& id) {
+ if (className == "Memory") {
+ return new Memory(id);
+ }
+
+ return NULL;
+}
+
+/**
+ * Method used by JNext to determine if the object can be deleted.
+ */
+bool Memory::CanDelete() {
+ return true;
+}
+
+/**
+ * It will be called from JNext JavaScript side with passed string.
+ * This method implements the interface for the JavaScript to native binding
+ * for invoking native code. This method is triggered when JNext.invoke is
+ * called on the JavaScript side with this native objects id.
+ */
+string Memory::InvokeMethod(const string& command) {
+ // Determine which function should be executed
+ if (command == "getMemoryNative") {
+ return convertLongToString(getMemory());
+ } else if (command == "monitorMemoryNative") {
+ return MonitorMemoryNative();
+ } else {
+ return "Unsupported Method";
+ }
+}
+
+/**
+ * Thread that retrieves the current amount of free memory every second and
+ * sends it to the JavaScript side using an event. The thread shall continue
+ * to retrieve the memory usage until the native object is destroyed on the
+ * JavaScript side.
+ */
+void* MemoryThread(void* parent) {
+ Memory *pParent = static_cast<Memory *>(parent);
+
+ // Endless loop that collect memory information and send it to JNext JavaScript side
+ while (true) {
+ pParent->SendMemoryInfo();
+ sleep(1);
+ }
+
+ return NULL;
+}
+
+/**
+ * Method responsible for starting the thread to get memory usage. Only one
+ * thread can be created per native JavaScript instance. This method returns
+ * true if the thread was created successfully and false othrewise.
+ */
+bool Memory::StartThread() {
+ if (!m_thread) {
+ pthread_attr_t thread_attr;
+ pthread_attr_init(&thread_attr);
+ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
+
+ pthread_create(&m_thread, &thread_attr, MemoryThread,
+ static_cast<void *>(this));
+ pthread_attr_destroy(&thread_attr);
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/**
+ * Method used to start the get memory usage thread. The method shall return a
+ * string to the JavaScript side indicating whether or not the memory
+ * monitoring was initialized.
+ */
+string Memory::MonitorMemoryNative() {
+ if (StartThread()) {
+ return "Memory monitored";
+ } else {
+ return "Memory already being monitored";
+ }
+}
+
+/**
+ * Method used by the getMemoryUsage thread to pass the amount of free memory
+ * on the JavaScript side by firing an event.
+ */
+void Memory::SendMemoryInfo() {
+ std::string eventString = "FreeMemory " + convertLongToString(getMemory());
+ NotifyEvent(eventString);
+}
+
+// Notifies JavaScript of an event
+void Memory::NotifyEvent(const std::string& event) {
+ std::string eventString = m_id + " ";
+ eventString.append(event);
+ SendPluginEvent(eventString.c_str(), m_pContext);
+}
+
+/**
+ * Method that retreives the current free memory of OS.
+ */
+long Memory::getMemory() {
+ struct stat statbuf;
+ paddr_t freemem;
+
+ stat("/proc", &statbuf);
+ freemem = (paddr_t) statbuf.st_size;
+
+ return freemem;
+}
+
+/**
+ * Utility function to convert a long into a string.
+ */
+string Memory::convertLongToString(long l) {
+ stringstream ss;
+ ss << l;
+ return ss.str();
+}
50 BB10/TEMPLATE/native_src/src/memory_js.hpp
View
@@ -0,0 +1,50 @@
+/*
+* Copyright 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 MEMORY_JS_HPP_
+#define MEMORY_JS_HPP_
+
+#include <string>
+#include <pthread.h>
+#include "../public/plugin.h"
+
+class Memory: public JSExt {
+
+public:
+ explicit Memory(const std::string& id);
+ virtual ~Memory();
+
+// Interfaces of JSExt
+ virtual bool CanDelete();
+ virtual std::string InvokeMethod(const std::string& command);
+
+// Methods for the memory thread
+ void SendMemoryInfo();
+ void NotifyEvent(const std::string& event);
+
+private:
+// Utility functions relate to memory function
+ long getMemory();
+ string convertLongToString(long l);
+
+// Memory monitoring thread function
+ string MonitorMemoryNative();
+ bool StartThread();
+
+ std::string m_id;
+ pthread_t m_thread;
+};
+
+#endif /* MEMORY_JS_HPP_ */
30 BB10/TEMPLATE/output/example.memory/client.js
View
@@ -0,0 +1,30 @@
+/*
+* Copyright 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.
+*/
+
+var _self = {},
+ _ID = require("./manifest.json").namespace;
+
+_self.getMemory = function () {
+ return window.webworks.execSync(_ID, "getMemoryServer", null);
+};
+
+_self.monitorMemory = function (cb) {
+ window.webworks.event.add(_ID, "example.memory.memoryEvent", cb);
+
+ return window.webworks.execSync(_ID, "monitorMemoryServer", null);
+};
+
+module.exports = _self;
BIN  BB10/TEMPLATE/output/example.memory/device/memoryJnext.so
View
Binary file not shown
87 BB10/TEMPLATE/output/example.memory/index.js
View
@@ -0,0 +1,87 @@
+/*
+ * Copyright 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.
+ */
+var memoryJNext,
+ _event = require("../../lib/event");
+
+module.exports = {
+ getMemoryServer: function (success, fail, args, env) {
+ try {
+ success(memoryJNext.getMemoryJNext());
+ } catch (e) {
+ fail(-1, e);
+ }
+ },
+
+ monitorMemoryServer: function (success, fail, args, env) {
+ try {
+ success(memoryJNext.monitorMemoryJNext());
+ } catch (e) {
+ fail(-1, e);
+ }
+ }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.MemoryJNext = function ()
+{
+ var _self = this;
+
+ _self.getMemoryJNext = function () {
+ return JNEXT.invoke(_self._id, "getMemoryNative");
+ };
+
+ _self.monitorMemoryJNext = function () {
+ return JNEXT.invoke(_self._id, "monitorMemoryNative");
+ };
+
+ _self.getId = function () {
+ return _self._id;
+ };
+
+ _self.init = function () {
+ if (!JNEXT.require("memoryJnext")) {
+ return false;
+ }
+
+ _self._id = JNEXT.createObject("memoryJnext.Memory");
+
+ if (!_self._id || _self._id === "") {
+ return false;
+ }
+
+ JNEXT.registerEvents(_self);
+ };
+
+ _self.onEvent = function (strData) {
+ var arData = strData.split(" "),
+ strEventId = arData[0],
+ arg = arData[1];
+
+ // Trigger the event handler of specific Push events
+ if (strEventId === "FreeMemory") {
+ _event.trigger("example.memory.memoryEvent", arg);
+ }
+ };
+
+ _self._id = "";
+
+ _self.init();
+};
+
+memoryJNext = new JNEXT.MemoryJNext();
5 BB10/TEMPLATE/output/example.memory/manifest.json
View
@@ -0,0 +1,5 @@
+{
+ "global": false,
+ "namespace": "example.memory",
+ "dependencies": []
+}
BIN  BB10/TEMPLATE/output/example.memory/simulator/memoryJnext.so
View
Binary file not shown
512 BB10/TEMPLATE/project/memoryJnext/.cproject
View
@@ -0,0 +1,512 @@
+<?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.configuration.sharedLib.debug.125035711">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.debug.125035711" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Device-Debug"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="" id="com.qnx.qcc.configuration.sharedLib.debug.125035711" name="Device-Debug" parent="com.qnx.qcc.configuration.sharedLib.debug">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.debug.125035711." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.debug.353520242" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.cpu.491029821" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1275584474" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Device-Debug}" id="com.qnx.nto.1864301038" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.1327890545" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.455049759" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.1934550955" 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.compile.debug.341015609" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.160608157" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.1159840403" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.1406076333" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1935973102" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1784665987" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.265653256" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.1852973446" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.955898350" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.2145099088" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.2069746516" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.1150249018" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.809098864" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.910973133" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.2123459601" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ <outputType id="com.qnx.qcc.outputType.linker.sharedLib.123674749" outputPrefix="" superClass="com.qnx.qcc.outputType.linker.sharedLib"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.1727305086" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.release.202015619">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.release.202015619" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Device-Release"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="" id="com.qnx.qcc.configuration.sharedLib.release.202015619" name="Device-Release" parent="com.qnx.qcc.configuration.sharedLib.release">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.release.202015619." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.release.441257790" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.cpu.695582029" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1984878818" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Device-Release}" id="com.qnx.nto.1755973016" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.1149643904" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.117317922" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.810859033" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.2" valueType="enumerated"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.1127228400" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.1581182630" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.305871840" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.qccoptions.1307581909" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+ <listOptionValue builtIn="false" value="-frecord-gcc-switches"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1652586544" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1230240106" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <inputType id="com.qnx.qcc.inputType.assembler.967995327" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.841954742" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.shared.1119901783" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.322659806" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.1727154652" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.1656434097" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.1514995513" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.1719660809" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.profile.1614208761">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.profile.1614208761" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Device-Profile"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="Build for Profiling" id="com.qnx.qcc.configuration.sharedLib.profile.1614208761" name="Device-Profile" parent="com.qnx.qcc.configuration.sharedLib.profile">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.profile.1614208761." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.profile.961058618" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.cpu.3440724" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.418399923" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Device-Profile}" id="com.qnx.nto.245705047" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.1437491560" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.2087356629" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.89489568" 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.compile.debug.1817310045" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.profile2.1379193389" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.491638834" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.5206437" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.1418722160" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1563207767" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.661728997" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.1847430122" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.1168865001" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1468584822" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.1963242566" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.profile2.2117370607" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.566192174" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.352793962" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.340423170" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.974753716" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.1108879179" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.1713815467" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.coverage.658200853">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.coverage.658200853" moduleId="org.eclipse.cdt.core.settings" name="Device-Coverage">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Device-Coverage"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="Build with Code Coverage" id="com.qnx.qcc.configuration.sharedLib.coverage.658200853" name="Device-Coverage" parent="com.qnx.qcc.configuration.sharedLib.coverage">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.coverage.658200853." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.coverage.1428616410" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <option id="com.qnx.qcc.option.cpu.1985897665" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1710685464" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Device-Coverage}" id="com.qnx.nto.2073331078" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.1174394044" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.783197862" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.321390943" 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.compile.debug.610606219" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.coverage.1546014619" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.1993124147" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.593963329" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.2143258986" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1591482619" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1019446592" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.2084335877" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.1854621246" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1484840880" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.488461239" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.coverage.1630307765" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.973891241" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.853027828" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.2037789194" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.1906786075" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.371753046" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.491839287" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.debug.1686388255">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.debug.1686388255" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Simulator-Debug"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="" id="com.qnx.qcc.configuration.sharedLib.debug.1686388255" name="Simulator-Debug" parent="com.qnx.qcc.configuration.sharedLib.debug">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.debug.1686388255." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.debug.171281672" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.355276991" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Simulator-Debug}" id="com.qnx.nto.314884623" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.749421311" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.1948280058" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.956699579" 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.compile.debug.767259141" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.1338009094" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.1936896901" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.416951630" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1591461996" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.802075220" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.152571405" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.866177880" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.1433158553" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.1568426676" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.1597061245" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.725701434" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.1037355355" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.1964097131" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.1258218331" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.730535209" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.profile.577203162">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.profile.577203162" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Profile">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Simulator-Profile"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="Build for Profiling" id="com.qnx.qcc.configuration.sharedLib.profile.577203162" name="Simulator-Profile" parent="com.qnx.qcc.configuration.sharedLib.profile">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.profile.577203162." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.profile.1449318257" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2060032972" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Simulator-Profile}" id="com.qnx.nto.1335395873" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.793423723" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.962303380" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.1236315777" 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.compile.debug.1499287522" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.profile2.1870282455" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.927124502" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.133729898" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.1697734031" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.1667556058" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.541147178" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.1849293168" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.895768544" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.2045933329" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.794487167" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.profile2.379173578" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.1189927162" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.1686324064" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.934656800" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.909082804" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.1854065201" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.1510783071" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="com.qnx.qcc.configuration.sharedLib.coverage.2037488127">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.sharedLib.coverage.2037488127" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Coverage">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/memoryJnext/public"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/memoryJnext/Simulator-Coverage"/>
+ <entry flags="" kind="libraryFile" name="memoryJnext"/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" description="Build with Code Coverage" id="com.qnx.qcc.configuration.sharedLib.coverage.2037488127" name="Simulator-Coverage" parent="com.qnx.qcc.configuration.sharedLib.coverage">
+ <folderInfo id="com.qnx.qcc.configuration.sharedLib.coverage.2037488127." name="/" resourcePath="">
+ <toolChain id="com.qnx.qcc.toolChain.sharedLib.coverage.1467354384" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+ <targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1781419128" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+ <builder buildPath="${workspace_loc:/memoryJnext/Simulator-Coverage}" id="com.qnx.nto.1902648464" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
+ <tool id="com.qnx.qcc.tool.compiler.336038301" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+ <option id="com.qnx.qcc.option.compiler.shared.1561939248" name="Shared (-shared)" superClass="com.qnx.qcc.option.compiler.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.optlevel.1596778797" 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.compile.debug.1380074635" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.coverage.1685801289" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.includePath.1260471937" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+ <listOptionValue builtIn="false" value="${workspace_loc:/${ProjName}/public}"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+ </option>
+ <option id="com.qnx.qcc.option.compiler.security.1256316884" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.compiler.defines.1874431730" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+ </option>
+ <inputType id="com.qnx.qcc.inputType.compiler.162395236" superClass="com.qnx.qcc.inputType.compiler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.assembler.1062678331" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+ <option id="com.qnx.qcc.option.assembler.debug.1849848683" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.assembler.225128870" superClass="com.qnx.qcc.inputType.assembler"/>
+ </tool>
+ <tool id="com.qnx.qcc.tool.linker.663399821" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+ <option id="com.qnx.qcc.option.linker.debug.1832530384" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.coverage.1707942318" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.shared.1882052002" name="Shared (-shared)" superClass="com.qnx.qcc.option.linker.shared" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.langcpp.329188492" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.libraryPaths.333389657" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
+ </option>
+ <option id="com.qnx.qcc.option.linker.security.1526470150" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+ <inputType id="com.qnx.qcc.inputType.linker.575580154" superClass="com.qnx.qcc.inputType.linker">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="com.qnx.qcc.tool.archiver.855829307" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="public"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="memoryJnext.null.433618383" name="memoryJnext"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.profile.577203162">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.debug.125035711">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.coverage.2037488127">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.debug.1686388255">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.release.202015619">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.profile.1614208761">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.sharedLib.coverage.658200853">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="1">
+ <resource resourceType="PROJECT" workspacePath="/memoryJnext"/>
+ </storageModule>
+</cproject>
77 BB10/TEMPLATE/project/memoryJnext/.project
View
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>memoryJnext</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>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/memoryJnext/Device-Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <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>
+ </natures>
+</projectDescription>
320 BB10/TEMPLATE/project/memoryJnext/public/plugin.cpp
View
@@ -0,0 +1,320 @@
+#include "plugin.h"
+#include "tokenizer.h"
+
+#ifdef _WINDOWS
+#include <windows.h>
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved )
+{
+ return TRUE;
+}
+#else
+#include <errno.h>
+#include <string.h>
+
+extern int errno;
+#endif
+
+SendPluginEv SendPluginEvent;
+
+string g_GetSysErrMsg( void )
+{
+ string strError = "Unknown";
+ // Problem loading
+#ifdef _WINDOWS
+ int nErrorCode = GetLastError();
+ LPTSTR s;
+ if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
+ {
+ strError = s;
+ }
+ else
+ {
+ char szBuf[ 20 ];
+ _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
+ strError = szBuf;
+ }
+#else
+ char szError[80];
+ if ( strerror_r( errno, szError, sizeof(szError) ) )
+ {
+ strError = "no description found";
+ }
+ else
+ {
+ strError = szError;
+ }
+#endif
+ return strError;
+}
+
+void g_sleep( unsigned int mseconds )
+{
+#ifdef _WINDOWS
+ Sleep( mseconds );
+#else
+ usleep( mseconds * 1000 );
+#endif
+}
+
+string& g_trim( string& str )
+{
+ // Whitespace characters
+ char whspc[] = " \t\r\n\v\f";
+
+ // Whack off first part
+ size_t pos = str.find_first_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( 0, pos, "" );
+
+ // Whack off trailing stuff
+ pos = str.find_last_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( pos + 1, str.length() - pos, "" );
+
+ return str;
+}
+
+void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
+{
+ tokenize( str, tokens, delimiters );
+}
+
+char* SetEventFunc( SendPluginEv funcPtr )
+{
+ static char * szObjList = onGetObjList();
+ SendPluginEvent = funcPtr;
+ return szObjList;
+}
+
+
+const int nMAXSIZE = 512;
+char* g_pszRetVal = NULL;
+
+//-----------------------------------------------------------
+// Map from an object Id to an object instance
+//-----------------------------------------------------------
+typedef std::map<string, JSExt*> StringToJExt_T;
+
+//-----------------------------------------------------------
+// Map from a browser context to an id mapping
+//-----------------------------------------------------------
+typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
+
+VoidToMap_T g_context2Map;
+
+class GlobalSharedModule
+{
+
+public:
+ GlobalSharedModule( void )
+ {
+ g_pszRetVal = new char[ nMAXSIZE ];
+ }
+
+ ~GlobalSharedModule()
+ {
+ delete [] g_pszRetVal;
+
+ VoidToMap_T::iterator posMaps;
+
+ for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
+ {
+ StringToJExt_T& id2Obj = *posMaps->second;
+ StringToJExt_T::iterator posMap;
+
+ for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
+ {
+ JSExt* pJSExt = posMap->second;
+
+ if ( pJSExt->CanDelete() )
+ {
+ delete pJSExt;
+ }