Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating js app model #327

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
14 changes: 7 additions & 7 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ development:
offline_eb: 'eb/en/edge/export/offline/'
offline_eb_mapping: 'eb/en/edge/export/offline/offlineDocs/docs/docs.js'

index: 'rhodocs_edge'
index: 'rhodocs'
pdfkithost: 'localhost:9393'
current_version: '4.1.0'
current_version: '5.5'
jenkins:
api_sources:
- '../../rhodes/workspace/lib/commonAPI/'
Expand All @@ -28,9 +28,9 @@ jenkins:
launchpad_eb_mapping: 'index.hash'
offline_eb: 'eb/en/edge/export/offline/'
offline_eb_mapping: 'index.json'
index: 'rhodocs_edge'
index: 'rhodocs'
pdfkithost: 'localhost:9393'
current_version: '4.1.0'
current_version: '5.5'
edge:
api: 'docs/en/edge/api/'
api_eb: 'eb/en/edge/api/'
Expand All @@ -39,9 +39,9 @@ edge:
launchpad_eb_mapping: 'index.hash'
offline_eb: 'eb/en/edge/export/offline/'
offline_eb_mapping: 'index.json'
index: 'rhodocs_edge'
index: 'rhodocs'
pdfkithost: 'edgedocs.rhomobile.com'
current_version: '4.1.0'
current_version: '5.5'
production:
api: 'docs/en/edge/api/'
api_eb: 'eb/en/edge/api/'
Expand All @@ -52,4 +52,4 @@ production:
offline_eb_mapping: 'index.json'
index: 'rhodocs'
pdfkithost: 'docs.rhomobile.com'
current_version: '4.1.0'
current_version: '5.5'
49 changes: 49 additions & 0 deletions docs/en/5.5/api/Adapter.md

Large diffs are not rendered by default.

273 changes: 273 additions & 0 deletions docs/en/5.5/api/Adapter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
<?xml version = "1.0"?>
<?xml-stylesheet type="text/xsl" href="pb_help.xsl"?>
<API>
<MODULE name="Adapter" parent="Rho.NFC" productException='eb'>
<HELP_OVERVIEW>NFC Adapter</HELP_OVERVIEW>
<MORE_HELP>NFC Adapter provides access to the NFC device to perform device related operations.
All properties and methods should be used after activate. Besides supported and isActive.
## Enabling the API
In order to use this API you must include the following extension in your `build.yml`
:::ruby
extensions: ["nfc"]

NOTE: If you are building a Windows Mobile or Windows CE app with this API, you must set your app_type as "rhoelements" in your build.yml as shown [here](../guide/build_config#other-build-time-settings).
</MORE_HELP>

<MORE_HELP_EB>
## Enabling the API
There are two methods of enabling the Adapter API:

* Include all ebapi modules or
* Include only the API modules you need

For either of these methods, you'll need to include files from the `/Enterprise Browser/JavaScript Files/Enterprise Browser` directory on the computer that you installed the Enterprise Browser.

### Include all JS API modules
To include all JS APIs, you must copy the ebapi-modules.js file to a location accessible by your app's files and include the JavaScript file in your app. For instance, to include the modules file in your index.html, with the file in the same directory as your index.html, you would add the following line to the &lt;head&gt; section of your index.html:

:::html
&lt;script type="text/javascript" charset="utf-8" src="ebapi-modules.js"&gt;&lt;/script&gt;

> Note: that the pathing for this file is relative to the current page.

This will define the EB class within the page. Any page you need to use the modules will need to have the .js file included in this fashion.

### Include only the modules you need
To include single APIs, you must first include the `ebapi.js` in your HTML as well as the API file you want to use. For instance, to use the Adapter API, I would add the following code to my HTML file(s), assuming the API files have been copied to the same directory as the HTML.

:::html
&lt;script type="text/javascript" charset="utf-8" src="ebapi.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" charset="utf-8" src="eb.adapter.js"&gt;&lt;/script&gt;

The ebapi.js file is necessary for all single API inclusions.

</MORE_HELP_EB>

<TEMPLATES>
</TEMPLATES>

<PROPERTIES access="STATIC" generateAccessors="true">
<DESC>List of properties supported by class.</DESC>
<PROPERTY name="supported" type="BOOLEAN" readOnly="true">
<DESC>Return true if NFC supported on this device.</DESC>
<PLATFORM>WM</PLATFORM>
</PROPERTY>
<PROPERTY name="isActive" type="BOOLEAN" readOnly="true">
<DESC>Gets a value indicating whether or not the NFC device is currently active.</DESC>
<PLATFORM>WM</PLATFORM>
</PROPERTY>
<PROPERTY name="version" type="STRING" readOnly="true">
<DESC>Gets the version of the NFC stack.</DESC>
<PLATFORM>WM</PLATFORM>
</PROPERTY>
<PROPERTY name="pollingTimeout" type="INTEGER">
<DESC>Polling timeout in seconds of the NFC device. 0 - timeout disabled, default: 90. The property is enabled after NFC engine activation.</DESC>
<PLATFORM>WM</PLATFORM>
</PROPERTY>
<PROPERTY name="passkey" type="STRING">
<DESC>Bluetooth device pass key. Max of 6 characters, empty string is no Passkey (Default is No Passkey). The property is enabled after NFC engine activation.</DESC>
<PLATFORM>WM</PLATFORM>
</PROPERTY>
</PROPERTIES>

<METHODS>
<METHOD name="activate" access="STATIC">
<DESC>Activates the NFC device so that all the NFC operations will be executed.</DESC>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="reset" access="STATIC">
<DESC>Resets the NFC device to default configuration. Pollingtime will set to 90, passkey to empty string.</DESC>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="stop" access="STATIC" hasCallback="optional">
<DESC>Stops the NFC device.</DESC>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="setTagDetectionHandler" access="STATIC" hasCallback="mandatory">
<DESC>Register callback for Tag detection.</DESC>
<PARAMS>
<PARAM name="tagsToBeDetected" type="ARRAY">
<DESC>Array with tag types - only those tags will be detected. If empty array - all types. See below tagsSupported parameter in getDeviceInfo method.</DESC>
<PARAM type="INTEGER">
</PARAM>
</PARAM>
</PARAMS>
<CALLBACK type="HASH">
<DESC></DESC>
<PARAMS>
<PARAM name="tagId" type="STRING">
<DESC>Tag Id.</DESC>
</PARAM>
</PARAMS>
</CALLBACK>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="setMessageHandler" access="STATIC" hasCallback="mandatory">
<DESC>Register callback for Message receive.</DESC>
<CALLBACK type="HASH">
<DESC></DESC>
<PARAMS>
<PARAM name="messageId" type="STRING">
<DESC>Message Id.</DESC>
</PARAM>
</PARAMS>
</CALLBACK>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="setConfigChangeHandler" access="STATIC" hasCallback="mandatory">
<DESC>Register callback for config change. If you change properties like pollingTimeout, passkey then callback will fire.</DESC>
<CALLBACK type="HASH">
<DESC></DESC>
<PARAMS>
<PARAM name="passKey" type="STRING">
<DESC>Bluetooth device pass key.</DESC>
</PARAM>
<PARAM name="pollingTimeout" type="INTEGER">
<DESC>Polling timeout in seconds of the NFC device.</DESC>
</PARAM>
</PARAMS>
</CALLBACK>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="btConnect" access="STATIC" hasCallback="mandatory">
<DESC>Connects the Bluetooth device to obtain device properties.</DESC>
<CALLBACK type="HASH">
<DESC></DESC>
<PARAMS>
<PARAM name="btName" type="STRING">
<DESC>Device name.</DESC>
</PARAM>
<PARAM name="btAddress" type="STRING">
<DESC>Device MAC address.</DESC>
</PARAM>
</PARAMS>
</CALLBACK>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="btDisconnect" access="STATIC">
<DESC>Disconnects the Bluetooth device.</DESC>
<PLATFORM>WM</PLATFORM>
</METHOD>
<METHOD name="getDeviceInfo" access="STATIC">
<DESC>Gets the NFC device capabilities.</DESC>
<RETURN type="HASH">
<DESC>Return hash with capabilities.</DESC>
<PARAMS>
<PARAM name="operatingModesSupported" type="ARRAY">
<DESC></DESC>
<PARAM type="STRING">
<VALUES>
<VALUE constName="NFC_P2P" type="STRING" value = "1">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_Reader_Writer" type="STRING" value = "2">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_CE" type="STRING" value = "3">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_CE_UICC" type="STRING" value = "4">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_CE_SE" type="STRING" value = "5">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_CE_Host" type="STRING" value = "6">
<DESC></DESC>
</VALUE>
<VALUE constName="Multiple_NDEFMessages" type="STRING" value = "7">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_LLCP" type="STRING" value = "8">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_SNEP" type="STRING" value = "9">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_NPP" type="STRING" value = "10">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_BT_StaticHandover" type="STRING" value = "11">
<DESC></DESC>
</VALUE>
<VALUE constName="NFC_BT_DynamicHandover" type="STRING" value = "12">
<DESC></DESC>
</VALUE>
</VALUES>
</PARAM>
</PARAM>
<PARAM name="tagsSupported" type="ARRAY">
<DESC>Array with tag types - only those tags will be detected.</DESC>
<PARAM type="STRING">
<VALUES>
<VALUE constName="MiFareUL" type="STRING" value = "1">
<DESC></DESC>
</VALUE>
<VALUE constName="MiFareStd" type="STRING" value = "2">
<DESC></DESC>
</VALUE>
<VALUE constName="MifareULC" type="STRING" value = "3">
<DESC></DESC>
</VALUE>
<VALUE constName="ISO14443_4A" type="STRING" value = "4">
<DESC></DESC>
</VALUE>
<VALUE constName="ISO14443_4B" type="STRING" value = "5">
<DESC></DESC>
</VALUE>
<VALUE constName="ISO15693" type="STRING" value = "6">
<DESC></DESC>
</VALUE>
<VALUE constName="FeliCa" type="STRING" value = "7">
<DESC></DESC>
</VALUE>
<VALUE constName="Jewel" type="STRING" value = "8">
<DESC></DESC>
</VALUE>
<VALUE constName="Desfire" type="STRING" value = "9">
<DESC></DESC>
</VALUE>
<VALUE constName="MiFarePlus" type="STRING" value = "10">
<DESC></DESC>
</VALUE>
<VALUE constName="NXPIcode" type="STRING" value = "11">
<DESC></DESC>
</VALUE>
<VALUE constName="Topaz" type="STRING" value = "12">
<DESC></DESC>
</VALUE>
<VALUE constName="Calypso" type="STRING" value = "13">
<DESC></DESC>
</VALUE>
<VALUE constName="TITagIt" type="STRING" value = "14">
<DESC></DESC>
</VALUE>
</VALUES>
</PARAM>
</PARAM>
<PARAM name="formattingTagsSupported" type="ARRAY">
<DESC>Array with tag types - only those tags will be detected. See above tagsSupported parameter.</DESC>
<PARAM type="STRING"/>
</PARAM>
<PARAM name="writeProtectedTagsSupported" type="ARRAY">
<DESC>Array with tag types - only those tags will be detected. See see above tagsSupported parameter.</DESC>
<PARAM type="STRING"/>
</PARAM>
<PARAM name="firmwareVersion" type="STRING">
<DESC>This array has only one element.</DESC>
<PARAM type="STRING"/>
</PARAM>
</PARAMS>
</RETURN>
<PLATFORM>WM</PLATFORM>
</METHOD>
</METHODS>

<USER_OVERVIEW>
</USER_OVERVIEW>

<VER_INTRODUCED>1.0.0</VER_INTRODUCED>
<PLATFORM>
</PLATFORM>
</MODULE>
</API>
Loading