<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Client-side Plugins</title>
        <description></description>
        <link>http://www.mupe.net/documents/client_script_reference-html/plugins/</link>
        <lastBuildDate>Tue, 06 Jan 2009 09:09:06 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <item>
            <title>Client-side Plugins</title>
            <link>http://www.mupe.net/documents/client_script_reference-html/plugins/index/</link>
            <description>&lt;p&gt;Client side has support for third party plugins, which are software modules that can for instance&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Communicate with hardware or sensor connected to the device&lt;/li&gt;
&lt;li&gt;Implement support for optional MIDP APIs&lt;/li&gt;
&lt;li&gt;Parse large amounts of data into suitable form for the client and creates events with data parameters in the content&lt;/li&gt;
&lt;li&gt;Extract metadata from the images and other media files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The plugins can either be passive or active. Passive plugins do nothing but wait for the client to call it and then immediately create event in the content for the call result. Active plugins are started and left running in the background. They can create events at any time when for instance the data input changes in the sensors.&lt;/p&gt;

&lt;p&gt;The content can then parse the data further or trigger functionality in the content according to the plugin parameters. The events plugins create have certain format:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“on_”pluginname”_”processname”_”state”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt; All plugins are used through plugin API described in the &lt;span class=&quot;wiki_missing_nouser&quot; title=&quot;Login to create this missing page&quot;&gt;Common Script Language&lt;/span&gt; &lt;span class=&quot;wiki_missing_nouser&quot; title=&quot;Login to create this missing page&quot;&gt;1&lt;/span&gt;. There are three methods that are used to manipulate plugins:&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Method &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; load &lt;/td&gt;
&lt;td&gt; Loading and starting the plugin. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; unload &lt;/td&gt;
&lt;td&gt; Stopping and unloading the plugin. &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; call &lt;/td&gt;
&lt;td&gt; Calling the plugins API. &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt; Lets say we have plugin called &lt;em&gt;calculator&lt;/em&gt; and it has method called &lt;em&gt;sum&lt;/em&gt; that takes a two integer parameters and sums them together. First we have to load the plugin using &lt;em&gt;load&lt;/em&gt; method:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;load plugin=&quot;calculator&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The call creates event &lt;em&gt;on_calculator_loaded_status&lt;/em&gt; which has parameter &lt;em&gt;calculator_loaded_status&lt;/em&gt;. If plugin loading was successful, the parameter has value &lt;em&gt;yes&lt;/em&gt;. If there was an error while loading the plugin, the parameter has value &lt;em&gt;no&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt; After loading the plugin successfully, the plugin can be called as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;call plugin=&quot;calculator&quot; method=&quot;sum&quot; a=&quot;5&quot; b=&quot;3&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After the call the plugin creates &lt;em&gt;on_calculator_sum_result&lt;/em&gt; event and the result is given as parameter for the event.&lt;/p&gt;

&lt;p&gt;The result of the sum method is saved in an attribute same name as the event, except without the &lt;em&gt;on_&lt;/em&gt; prefix. In this case the attribute will be called &lt;em&gt;calculator_sum_result&lt;/em&gt;. The script can handle the event by hooking it at the template&quot;s global level as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;template&amp;gt;
   &amp;lt;hook name=&quot;on_calculator_sum_result&quot;&amp;gt;
      &amp;lt;debug text=&quot;result is $(global.calculator_sum_result)&quot; /&amp;gt;
   &amp;lt;/hook&amp;gt;
   &amp;lt;call plugin=&quot;calculator&quot; method=&quot;sum&quot; a=&quot;5&quot; b=&quot;3&quot; /&amp;gt;
&amp;lt;/template&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt; Each plugin can have its own API for &lt;em&gt;call&lt;/em&gt; method, which are described in the following chapters.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;Plugin: bluetooth&lt;/h1&gt;

&lt;p&gt;Bluetooth plugin implements device discovery using MIDP Bluetooth API. At it's current state it does not implement service discovery or data transfers. However, it can be used to detect devices in the close proximity of the MUPE device.&lt;/p&gt;

&lt;p&gt;The bluetooth IDs that are obtained from the device discovery can for instance be resolved to detect if the other device nearby is a MUPE device as well (using server).&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;devicediscovery&lt;/h2&gt;

&lt;p&gt;Starts a bluetooth device discovery. The device discovery is a non-blocking process, which will send &lt;em&gt;on_bluetooth_devicediscovery_progress&lt;/em&gt; events for each device the discovery finds.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_bluetooth_devicediscovery_progress&lt;/td&gt;
&lt;td&gt;bluetooth_devicediscovery_progress&lt;/td&gt;
&lt;td&gt;Bluetooth ID and name of found device. Called for each found device furing discovery.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_bluetooth_devicediscovery_result&lt;/td&gt;
&lt;td&gt;bluetooth_devicediscovery_result&lt;/td&gt;
&lt;td&gt;Bluetooth IDs and names of all found devices. Called when the discovery is complete.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;getaddress&lt;/h2&gt;

&lt;p&gt;Gets Bluetooth address of the device MUPE is running in.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_bluetooth_getaddress_result&lt;/td&gt;
&lt;td&gt;bluetooth_getaddress_result&lt;/td&gt;
&lt;td&gt;Bluetooth ID and name of user's device&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;stop&lt;/h2&gt;

&lt;p&gt;Stops the device discovery if it is running currently.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;Plugin: gps&lt;/h1&gt;

&lt;p&gt;GPS plugin implements support for external bluetooth GPS devices. Currently the Nokia GPS devices, Navigore Gps and Clip On GPS modules are supported. The GPS plugin is asynchronous plugin, which operates in the background and sends events to the UI when something interesting happens.&lt;/p&gt;

&lt;p&gt;The idea of the plugin is that service can define a set of location triggers (geometrical areas) and the plugin notifies the UI when user enters or exists those areas.&lt;/p&gt;

&lt;p&gt;While running in the background the plugin creates following events:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_enter_location&lt;/td&gt;
&lt;td&gt;location_enter_location&lt;/td&gt;
&lt;td&gt;User enters a location trigger area. The parameter contains the name of the trigger.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_leave_location&lt;/td&gt;
&lt;td&gt;location_leave_location&lt;/td&gt;
&lt;td&gt;User leaves a location trigger area. The parameter contains the name of the trigger.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_gps_progress_error&lt;/td&gt;
&lt;td&gt;gps_progress_error&lt;/td&gt;
&lt;td&gt;Connection to the GPS module has failed, while the plugin is trying to receive data.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;start&lt;/h2&gt;

&lt;p&gt;Starts the GPS plugin if it has been stopped. The plugin needs to be started after loading.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_gps_init_status&lt;/td&gt;
&lt;td&gt;gps_init_status&lt;/td&gt;
&lt;td&gt;Status of the starting proccess: &lt;br /&gt;
searching = plugin is searching for gps module. &lt;br /&gt;
examining = plugin is examining the device it has found. &lt;br /&gt;
ok = plugin has found a GPS module and is ready to be used.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_gps_init_error&lt;/td&gt;
&lt;td&gt;gps_init_error&lt;/td&gt;
&lt;td&gt;Starting GPS plugin failed. Parameter contains an error code.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;stop&lt;/h2&gt;

&lt;p&gt;Stops the GPS plugin.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;addtrigger&lt;/h2&gt;

&lt;p&gt;Adds a geometrical area as location trigger in the plugin.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lat&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Latitude of the area center point.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lon&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Longitude of the area center point.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;width&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;west-east &quot;width&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;height&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;north-south &quot;height&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;addcurrent&lt;/h2&gt;

&lt;p&gt;Adds the current location as a location trigger using given geometry.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;width&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;west-east &quot;width&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;height&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;north-south &quot;height&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;removetrigger&lt;/h2&gt;

&lt;p&gt;Removes a location trigger.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;removeall&lt;/h2&gt;

&lt;p&gt;Removes all location triggers.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;getlocation&lt;/h2&gt;

&lt;p&gt;Returns current location.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_gps_getlocation_result&lt;/td&gt;
&lt;td&gt;gps_getlocation_result&lt;/td&gt;
&lt;td&gt;The parameter contains the current location in format &quot;lat,lon&quot; 
or string &quot;n/a&quot; if the location information is not available.
&lt;/td&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h1&gt;Plugin: location&lt;/h1&gt;

&lt;p&gt;Location plugin implements XML api for MIDP location API. The Location API is only implemented for CLDC 1.1 and some older phones cannot support the feature. The main difference between the &lt;em&gt;location&lt;/em&gt; and &lt;em&gt;gps&lt;/em&gt; plugins are that the &lt;em&gt;location&lt;/em&gt; API also works with build-in location devices and possibly also locationing methods other than GPS (yet to see this). Also it is possible to calculate distances between the triggers and user, which might come handy in location based services.&lt;/p&gt;

&lt;p&gt;The idea of the plugin is that service can define a set of location triggers (geometrical areas) and the plugin notifies the UI when user enters or exists those areas.&lt;/p&gt;

&lt;p&gt;Unlike the gps plugin location plugin does not need to be explicitly started. It starts automatically right after loading.&lt;/p&gt;

&lt;p&gt;The plugin loading takes a set of parameters:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;haccuracy&lt;/td&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Preferred horisontal accuracy in meters.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;vaccuracy&lt;/td&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;Preferred vertical (altitude) accuracy in meters.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;responsetime&lt;/td&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Preferred response time. Zero means no requirement and positive integer is a response time in seconds.
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;powerconsumption&lt;/td&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Power consumtion requirement: &lt;br /&gt;
0 = no requirement &lt;br /&gt;
1 = low &lt;br /&gt;
2 = medium &lt;br /&gt;
3 = high
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;costallowed&lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;td&gt;Set to false if the location service should be free of charge.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needorientation&lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Set to true if the locationing method must extract user orientation information.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needaltitude&lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Set to true if the locationing method must extract user altitude.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;needaddress&lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Set to true if the locationing method must know the street address where the user is at.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;While running in the background the plugin creates following events:&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_coordinate_update&lt;/td&gt;
&lt;td&gt;location_coordinate_update&lt;/td&gt;
&lt;td&gt;The parameter contains the current location in format &quot;lat,lon&quot;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_enter_location&lt;/td&gt;
&lt;td&gt;location_enter_location&lt;/td&gt;
&lt;td&gt;User enters a location trigger area. The parameter contains the name of the trigger.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_leave_location&lt;/td&gt;
&lt;td&gt;location_leave_location&lt;/td&gt;
&lt;td&gt;User leaves a location trigger area. The parameter contains the name of the trigger.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_provider_state&lt;/td&gt;
&lt;td&gt;location_provider_state&lt;/td&gt;
&lt;td&gt;State of the location service has chanced &lt;br /&gt;
&quot;Available&quot; = location service is available. &lt;br /&gt;
&quot;Out of service&quot; = location service is unavailable. &lt;br /&gt;
&quot;Temporarily unavailable&quot; = location service is temporarily unavailable.
&lt;/td&gt;
&lt;/tr&gt;

&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;addtrigger&lt;/h2&gt;

&lt;p&gt;Adds a geometrical area as location trigger in the plugin.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lat&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Latitude of the area center point.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;lon&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Longitude of the area center point.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;radius&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;west-east &quot;width&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;addcurrent&lt;/h2&gt;

&lt;p&gt;Adds the current location as a location trigger using given geometry.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;width&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;west-east &quot;width&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;height&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;north-south &quot;height&quot; of the area in WSG82 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;removetrigger&lt;/h2&gt;

&lt;p&gt;Removes a location trigger.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of the trigger&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;getlocation&lt;/h2&gt;

&lt;p&gt;Returns current location.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_getlocation_result&lt;/td&gt;
&lt;td&gt;location_getlocation_result&lt;/td&gt;
&lt;td&gt;The parameter contains the current location in format &quot;lat,lon&quot; 
or string &quot;n/a&quot; if the location information is not available.
&lt;/td&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;removeall&lt;/h2&gt;

&lt;p&gt;Removes all location triggers.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;distance&lt;/h2&gt;

&lt;p&gt;Calculates a distance between two location triggers or user and a location trigger.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Parameters&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Param &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Type &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Default &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Meaning &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;origin&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Location origin is either a name of a location trigger or the user if the parameter is left unspecified.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;destination&lt;/td&gt;
&lt;td&gt;String&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Name of a location trigger where to the distance is calculated.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;border&lt;/td&gt;
&lt;td&gt;Bool&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Set to true if you want to calculate the distance between the area borders instead of are center points. &lt;b&gt;Note:&lt;b/&gt; distance can become negative, which means the location triggers are overlapping.&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;em&gt;Callback(s)&lt;/em&gt;&lt;/p&gt;

&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;
&lt;tr&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Event &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Attribute &lt;/th&gt;
&lt;th bgcolor=&quot;#efefef&quot;&gt;Function &lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;on_location_distance_result&lt;/td&gt;
&lt;td&gt;location_distance_result&lt;/td&gt;
&lt;td&gt;Parameter contains the calculated distance.
&lt;/td&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
</description>
            <author>Eero Räsänen</author>
            <pubDate>Wed, 20 Jun 2007 23:21:38 +0000</pubDate>
        </item>
    </channel>
</rss>
