ext David Woodhouse wrote:
>On Mon, 2006-01-09 at 19:01 -0500, Roland Krikava wrote:
>
>
>>Can anyone suggest a way to open a URL using the
native browser on the
>>770? I noticed that someone posted earlier about
attempting to use
>>dbus to accomplish this..
>>
>>
>
>I just hacked up a shell script to make this work for
viewing images and
>URLs from pine (http://david.
woodhou.se/maemo-pine.html) ...
>
>#!/bin/sh
>
>if ! dbus-send --system --type=method_call
--dest="com.nokia.osso_browser" --print-reply
/com/nokia/osso_browser/request
com.nokia.osso_browser.load_url string:"$1" ; then
> DISPLAY=:0 run-standalone.sh /usr/bin/browser
&>/dev/null &
> sleep 5
> dbus-send --system --type=method_call
--dest="com.nokia.osso_browser" --print-reply
/com/nokia/osso_browser/request
com.nokia.osso_browser.load_url string:"$1"
>fi
># give it a while to access local files before they're
deleted
>if echo "$1" | grep ^/ ; then
> sleep 10
>fi
>
>
>(Btw, please could we have the Subject line mangling on
this mailing
>list removed or at _least_ reduced to a sane number of
characters.
>Removing it completely would be best -- there are much
better ways to
>filter mail, and people who really want it there can
always _add_ it for
>themselves; adding it locally is much easier than trying
to remove it
>again once it's been added).
>
>
>
There is a file (part of maemo):
https://stage.maemo.org/viewcvs.cgi/maem
o/projects/browser/browser/trunk
/osso-browser-interface/osso-browser-interface.h?rev=1344&am
p;view=markup
And there is a d-bus interface described in this file.
You need one of these functions:
/* URL loading service */
/**
* Open new browser window. n
* b url: The URL to load in new browser windown
* b Example: Open new window with home page
* code
* ret = osso_rpc_run_with_defaults(app_ctx,
"osso_browser",
* OSSO_BROWSER_OPEN_NEW_WINDOW_REQ,
NULL,
* DBUS_TYPE_STRING,
"new_window",
DBUS_TYPE_INVALID);
* endcode
* b Example: Open new window with url
* code
* ret = osso_rpc_run_with_defaults(app_ctx,
"osso_browser",
* OSSO_BROWSER_OPEN_NEW_WINDOW_REQ,
NULL,
* DBUS_TYPE_STRING, url,
DBUS_TYPE_INVALID);
* endcode
*
*/
#define OSSO_BROWSER_OPEN_NEW_WINDOW_REQ
"open_new_window"
/**
* Load URL in current browser window.n
* b url: The URL to loadn
* b Example: Load Home page in currently open browser
window
* code
* ret = osso_rpc_run_with_defaults(app_ctx,
"osso_browser",
* OSSO_BROWSER_LOAD_URL_REQ, NULL,
* DBUS_TYPE_STRING,
"new_window",
DBUS_TYPE_INVALID);
* endcode
* b Example: Load URL in the currently open browser
window.
* code
* ret = osso_rpc_run_with_defaults(app_ctx,
"osso_browser",
* OSSO_BROWSER_LOAD_URL_REQ, NULL,
* DBUS_TYPE_STRING, url,
DBUS_TYPE_INVALID);
* endcode
*
*/
#define OSSO_BROWSER_LOAD_URL_REQ "load_url"
_______________________________________________
maemo-developers mailing list
maemo-developers maemo.org
h
ttps://maemo.org/mailman/listinfo/maemo-developers
|